Java Doc for TinyTree.java in  » XML » saxonb » net » sf » saxon » tinytree » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » XML » saxonb » net.sf.saxon.tinytree 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   net.sf.saxon.tinytree.TinyTree

TinyTree
final public class TinyTree (Code)
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  CharSequence[]attValue
    
protected  int[]beta
    
protected  char[]charBuffer
    
protected  intcharBufferLength
    
protected  FastStringBuffercommentBuffer
    
protected  short[]depth
    
protected  intdocumentNumber
    
protected  int[]nameCode
    
protected  int[]namespaceCode
    
protected  int[]namespaceParent
    
protected  int[]next
    
public  byte[]nodeKind
    
protected  intnumberOfAttributes
    
protected  intnumberOfNamespaces
    
protected  intnumberOfNodes
    
protected  int[]prior
    
protected  int[]typeCodeArray
    
protected  booleanusesNamespaces
    

Constructor Summary
public  TinyTree()
    
public  TinyTree(int nodes, int attributes, int namespaces, int characters)
    

Method Summary
 voidaddAttribute(NodeInfo root, int parent, int nameCode, int typeCode, CharSequence attValue, int properties)
    
 voidaddDocumentNode(TinyDocumentImpl doc)
     Add a document node to the tree.
 voidaddNamespace(int parent, int nscode)
    
 intaddNode(short kind, int depth, int alpha, int beta, int nameCode)
     Add a node to the tree
Parameters:
  kind - The kind of the node.
 voidappendChars(CharSequence chars)
    
protected  voidcondense()
     Condense the tree: release unused memory.
public  voiddiagnosticDump()
    
 voidensurePriorIndex()
    
public  int[]getAlphaArray()
    
 intgetAttributeAnnotation(int nr)
     Get the type annotation of an attribute node.
public  int[]getAttributeNameCodeArray()
    
 TinyAttributeImplgetAttributeNode(int nr)
    
public  int[]getAttributeParentArray()
    
public  int[]getAttributeTypeCodeArray()
    
public  CharSequence[]getAttributeValueArray()
    
public  int[]getBetaArray()
    
public  CharSequencegetCharacterBuffer()
    
public  CharSequencegetCommentBuffer()
    
public  ConfigurationgetConfiguration()
    
public  intgetDocumentNumber()
    
 intgetLineNumber(int sequence)
     Get the line number for an element.
public  intgetNameCode(int nodeNr)
    
public  int[]getNameCodeArray()
    
public  NamePoolgetNamePool()
    
public  int[]getNamespaceCodeArray()
    
public  int[]getNamespaceParentArray()
    
public  int[]getNextPointerArray()
    
public  TinyNodeImplgetNode(int nr)
    
public  short[]getNodeDepthArray()
    
public  intgetNodeKind(int nodeNr)
    
public  byte[]getNodeKindArray()
    
public  intgetNumberOfAttributes()
    
public  intgetNumberOfNamespaces()
    
public  intgetNumberOfNodes()
    
 intgetRootNode(int nodeNr)
    
 StringgetSystemId(int seq)
    
public  intgetTypeAnnotation(int nodeNr)
     Get the type annotation of a node.
public  int[]getTypeCodeArray()
    
 UntypedAtomicValuegetUntypedAtomicValue(int nodeNr)
     Get the typed value of a node whose type is known to be untypedAtomic.
public  voidindexIDElement(NodeInfo root, int nodeNr, NameChecker checker)
    
public  booleanisIDCode(int typeCode)
    
 booleanisIdref(int nr)
     Determine whether an attribute is an IDREF/IDREFS attribute.
public  booleanisNilled(int nodeNr)
    
public  voidsetConfiguration(Configuration config)
    
 voidsetElementAnnotation(int nodeNr, int typeCode)
    
 voidsetLineNumber(int sequence, int line)
     Set the line number for an element.
public  voidsetLineNumbering()
    
 voidsetSystemId(int seq, String uri)
     Set the system id of an element in the document.
public  voidshowSize()
    

Field Detail
alpha
protected int[] alpha(Code)



attCode
protected int[] attCode(Code)



attParent
protected int[] attParent(Code)



attTypeCode
protected int[] attTypeCode(Code)



attValue
protected CharSequence[] attValue(Code)



beta
protected int[] beta(Code)



charBuffer
protected char[] charBuffer(Code)



charBufferLength
protected int charBufferLength(Code)



commentBuffer
protected FastStringBuffer commentBuffer(Code)



depth
protected short[] depth(Code)



documentNumber
protected int documentNumber(Code)



nameCode
protected int[] nameCode(Code)



namespaceCode
protected int[] namespaceCode(Code)



namespaceParent
protected int[] namespaceParent(Code)



next
protected int[] next(Code)



nodeKind
public byte[] nodeKind(Code)



numberOfAttributes
protected int numberOfAttributes(Code)



numberOfNamespaces
protected int numberOfNamespaces(Code)



numberOfNodes
protected int numberOfNodes(Code)



prior
protected int[] prior(Code)



typeCodeArray
protected int[] typeCodeArray(Code)



usesNamespaces
protected boolean usesNamespaces(Code)




Constructor Detail
TinyTree
public TinyTree()(Code)



TinyTree
public TinyTree(int nodes, int attributes, int namespaces, int characters)(Code)




Method Detail
addAttribute
void addAttribute(NodeInfo root, int parent, int nameCode, int typeCode, CharSequence attValue, int properties)(Code)



addDocumentNode
void addDocumentNode(TinyDocumentImpl doc)(Code)
Add a document node to the tree. The data structure can contain any number of document (or element) nodes as top-level nodes. The document node is retained in the documentList list, and its offset in that list is held in the alpha array for the relevant node number.



addNamespace
void addNamespace(int parent, int nscode)(Code)
Add a namespace node to the current element
Parameters:
  parent - the node number of the element
Parameters:
  nscode - namespace code identifying the prefix and uri



addNode
int addNode(short kind, int depth, int alpha, int beta, int nameCode)(Code)
Add a node to the tree
Parameters:
  kind - The kind of the node. This must be a document, element, text, comment,or processing-instruction node (not an attribute or namespace)
Parameters:
  depth - The depth in the tree
Parameters:
  alpha - Pointer to attributes or text
Parameters:
  beta - Pointer to namespaces or text
Parameters:
  nameCode - The name of the node the node number of the node that was added



appendChars
void appendChars(CharSequence chars)(Code)



condense
protected void condense()(Code)
Condense the tree: release unused memory. This is done after the full tree has been built. The method makes a pragmatic judgement as to whether it is worth reclaiming space; this is only done when the constructed tree is very small compared with the space allocated.



diagnosticDump
public void diagnosticDump()(Code)
Produce diagnostic print of main tree arrays



ensurePriorIndex
void ensurePriorIndex()(Code)
On demand, make an index for quick access to preceding-sibling nodes



getAlphaArray
public int[] getAlphaArray()(Code)



getAttributeAnnotation
int getAttributeAnnotation(int nr)(Code)
Get the type annotation of an attribute node. The bit NodeInfo.IS_DTD_TYPE (1<<30) will be set in the case of an attribute node if the type annotation is one of ID, IDREF, or IDREFS and this is derived from DTD rather than schema validation. Type.UNTYPED_ATOMIC if there is no annotation



getAttributeNameCodeArray
public int[] getAttributeNameCodeArray()(Code)



getAttributeNode
TinyAttributeImpl getAttributeNode(int nr)(Code)
Make a (transient) attribute node from the array of attributes



getAttributeParentArray
public int[] getAttributeParentArray()(Code)



getAttributeTypeCodeArray
public int[] getAttributeTypeCodeArray()(Code)



getAttributeValueArray
public CharSequence[] getAttributeValueArray()(Code)



getBetaArray
public int[] getBetaArray()(Code)



getCharacterBuffer
public CharSequence getCharacterBuffer()(Code)



getCommentBuffer
public CharSequence getCommentBuffer()(Code)



getConfiguration
public Configuration getConfiguration()(Code)
Get the configuration previously set using setConfiguration



getDocumentNumber
public int getDocumentNumber()(Code)
Get the document number (actually, the tree number)



getLineNumber
int getLineNumber(int sequence)(Code)
Get the line number for an element. Return -1 if line numbering is off.



getNameCode
public int getNameCode(int nodeNr)(Code)
Get the nameCode for a given node, which must be a document, element, text, comment, or processing instruction node
Parameters:
  nodeNr - the node number the name code



getNameCodeArray
public int[] getNameCodeArray()(Code)



getNamePool
public NamePool getNamePool()(Code)
Get the name pool used for the names in this document



getNamespaceCodeArray
public int[] getNamespaceCodeArray()(Code)



getNamespaceParentArray
public int[] getNamespaceParentArray()(Code)



getNextPointerArray
public int[] getNextPointerArray()(Code)



getNode
public TinyNodeImpl getNode(int nr)(Code)



getNodeDepthArray
public short[] getNodeDepthArray()(Code)



getNodeKind
public int getNodeKind(int nodeNr)(Code)
Get the node kind of a given node, which must be a document, element, text, comment, or processing instruction node
Parameters:
  nodeNr - the node number the node kind



getNodeKindArray
public byte[] getNodeKindArray()(Code)



getNumberOfAttributes
public int getNumberOfAttributes()(Code)



getNumberOfNamespaces
public int getNumberOfNamespaces()(Code)



getNumberOfNodes
public int getNumberOfNodes()(Code)
Get the number of nodes in the tree, excluding attributes and namespace nodes the number of nodes.



getRootNode
int getRootNode(int nodeNr)(Code)
Get the root node for a given node



getSystemId
String getSystemId(int seq)(Code)
Get the system id of an element in the document



getTypeAnnotation
public int getTypeAnnotation(int nodeNr)(Code)
Get the type annotation of a node. Applies only to document, element, text, processing instruction, and comment nodes. -1 if the annotation is xdt:untyped or if the node is not an element.



getTypeCodeArray
public int[] getTypeCodeArray()(Code)



getUntypedAtomicValue
UntypedAtomicValue getUntypedAtomicValue(int nodeNr)(Code)
Get the typed value of a node whose type is known to be untypedAtomic. The node must be a document, element, text, comment, or processing-instruction node, and it must have no type annotation. This method gets the typed value of a numbered node without actually instantiating the NodeInfo object, as a performance optimization.



indexIDElement
public void indexIDElement(NodeInfo root, int nodeNr, NameChecker checker)(Code)
Index an element of type xs:ID



isIDCode
public boolean isIDCode(int typeCode)(Code)
Test whether a type annotation code represents the type xs:ID or one of its subtypes



isIdref
boolean isIdref(int nr)(Code)
Determine whether an attribute is an IDREF/IDREFS attribute. (The represents the is-IDREF property in the data model



isNilled
public boolean isNilled(int nodeNr)(Code)
Determine whether a given node is nilled



setConfiguration
public void setConfiguration(Configuration config)(Code)
Set the Configuration that contains this document



setElementAnnotation
void setElementAnnotation(int nodeNr, int typeCode)(Code)
Set the type annotation of an element node



setLineNumber
void setLineNumber(int sequence, int line)(Code)
Set the line number for an element. Ignored if line numbering is off.



setLineNumbering
public void setLineNumbering()(Code)
Set line numbering on



setSystemId
void setSystemId(int seq, String uri)(Code)
Set the system id of an element in the document. This identifies the external entity containing the node - this is not necessarily the same as the base URI.
Parameters:
  seq - the node number
Parameters:
  uri - the system ID



showSize
public void showSize()(Code)



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.