Package org.cdlib.xtf.lazyTree

The "lazy tree" mechanism speeds document processing requests by storing a binary document representation on disk and only loading the actual nodes used in a given transformation.

See:
          Description

Interface Summary
PersistentTree General interface for a tree that is disk-based, and should be closed after use.
SearchElement This interface is implemented by SearchElement and ProxyElement.
SearchNode Basic interface shared by SearchElement and ProxyElement, which is useful for code that can create either one without having to know their internal structure.
 

Class Summary
AncestorEnumeration  
AttributeEnumeration AttributeEnumeration is an enumeration of all the attribute nodes of an Element.
AttributeImpl Represents an attribute node from a persistent XML document.
ChildEnumeration  
DescendantEnumeration  
ElementImpl A node in the XML parse tree representing an XML element.
FastNodeTestPattern Optimizes Saxon's NodeTestPattern adding the ability to directly use a NodeTest when selecting elements, rather than selecting all elements and then applying the test to them (the latter is slow on lazy trees).
Flag Enumeration of the flags we store for a node.
FollowingEnumeration  
FollowingSiblingEnumeration  
LazyDocument LazyDocument accesses the binary persistent disk file created by LazyTreeBuilder, loading nodes on demand rather than holding all of them in RAM.
LazyHashMap A very light wrapper that puts a Map interface over a DiskHashReader for use with lazy keys.
LazyKeyManager LazyKeyManager wraps a Saxon KeyManager, but stores keys on disk instead of keeping them in RAM.
LazyProfilingListener Used to keep track of the current instruction being executed, and to keep track of counts for each one.
LazyProfilingListener.ProfileCount Simple data structure to keep track of counts.
LazyTreeBuilder Creates and/or loads a disk-based representation of an XML tree.
NodeImpl A node in the XML parse tree representing an XML element, character content, or attribute.
ParentNodeImpl Represents any node that can have children.
PrecedingEnumeration  
PrecedingOrAncestorEnumeration  
PrecedingSiblingEnumeration  
ProxyAttributeEnumeration Saxon: ProxyAttributeEnumeration is an enumeration of all the attribute nodes of an Element.
ProxyAttributeImpl Represents an attribute node from a persistent XML document.
ProxyElement A very lazy element.
SearchElementImpl Represents an element that has been (possibly) modified to reflect search results.
SearchTextImpl Represents a text node that has been (possibly) modified to reflect query results.
SearchTree SearchTree annotates a lazy-loading tree with TextEngine search results.
TextImpl A simple text node, which knows how to load its text from the persistent disk file.
TreeEnumeration  
 

Package org.cdlib.xtf.lazyTree Description

The "lazy tree" mechanism speeds document processing requests by storing a binary document representation on disk and only loading the actual nodes used in a given transformation. Most requests only use a small part of any given document, so this results in a large time savings. At all times, we maintain the illusion that the entire tree is in RAM, even though most of it is secretly left on disk.

In addition to a binary representation of each node, the disk file also contains a cache for each xsl:key definition that is processed. Without this cache, every time a key was used the entire tree would have to be loaded from disk, defeating the purpose of the LazyTree.

Given a source XML document, a persistent disk file can be created using LazyTreeBuilder. The same class can be used later to load that document back from disk (or rather, to load the root node of that document; other nodes will be loaded as needed to maintain the illusion that the whole tree is in memory.)

Additionally, this package supports annotating the disk file with TextEngine search results; see the SearchTree class for more information.

Where possible, the code here makes use of Michael Kay's Saxon code, and implements Saxon's NodeInfo interface to integrate seamlessly and speedily with XSLT processing.