net.sf.saxon.tinytree
Class HackedTinyBuilder

Object
  extended by Builder
      extended by HackedTinyBuilder
All Implemented Interfaces:
Result, Receiver

public class HackedTinyBuilder
extends Builder


Field Summary
private  int currentDepth
           
private  boolean ended
           
private  boolean isIDElement
           
private  int nodeNr
           
static int PARENT_POINTER_INTERVAL
           
private  int[] prevAtDepth
           
private  int[] siblingsAtDepth
           
private  int[] sizeParameters
           
private  PackedByteBuf textBuf
           
private  SubStoreWriter textStore
           
private  TinyTree tree
           
private  StructuredStore treeStore
           
 
Fields inherited from class Builder
baseURI, config, currentRoot, lineNumbering, LINKED_TREE, namePool, pipe, STANDARD_TREE, started, systemId, timing, TINY_TREE, UNSPECIFIED_TREE_MODEL
 
Fields inherited from interface Result
PI_DISABLE_OUTPUT_ESCAPING, PI_ENABLE_OUTPUT_ESCAPING
 
Constructor Summary
HackedTinyBuilder()
           
 
Method Summary
 void attribute(int nameCode, int typeCode, CharSequence value, int locationId, int properties)
           
 void characters(CharSequence chars, int locationId, int properties)
          Callback interface for SAX: not for application use
 void close()
           
 void comment(CharSequence chars, int locationId, int properties)
          Callback interface for SAX: not for application use
 void endDocument()
          Callback interface for SAX: not for application use
 void endElement()
          Callback interface for SAX: not for application use
 int[] getSizeParameters()
           
 SubStoreWriter getTextStore()
           
 TinyTree getTree()
           
 StructuredStore getTreeStore()
           
 void namespace(int namespaceCode, int properties)
           
 void open()
          Open the event stream
 void processingInstruction(String piname, CharSequence remainder, int locationId, int properties)
          Callback interface for SAX: not for application use
 void setSizeParameters(int[] params)
           
 void setTextStore(SubStoreWriter textStore)
           
 void setTreeStore(StructuredStore treeStore)
           
 void setUnparsedEntity(String name, String uri, String publicId)
          Set an unparsed entity in the document
 void startContent()
           
 void startDocument(int properties)
          Write a document node to the tree
 void startElement(int nameCode, int typeCode, int locationId, int properties)
          Notify the start tag of an element
 
Methods inherited from class Builder
build, build, getBaseURI, getConfiguration, getCurrentRoot, getPipelineConfiguration, getSystemId, isTiming, setBaseURI, setLineNumbering, setPipelineConfiguration, setSystemId, setTiming
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

textBuf

private PackedByteBuf textBuf

treeStore

private StructuredStore treeStore

textStore

private SubStoreWriter textStore

PARENT_POINTER_INTERVAL

public static final int PARENT_POINTER_INTERVAL
See Also:
Constant Field Values

tree

private TinyTree tree

currentDepth

private int currentDepth

nodeNr

private int nodeNr

ended

private boolean ended

sizeParameters

private int[] sizeParameters

prevAtDepth

private int[] prevAtDepth

siblingsAtDepth

private int[] siblingsAtDepth

isIDElement

private boolean isIDElement
Constructor Detail

HackedTinyBuilder

public HackedTinyBuilder()
Method Detail

setTreeStore

public void setTreeStore(StructuredStore treeStore)

getTreeStore

public StructuredStore getTreeStore()

setTextStore

public void setTextStore(SubStoreWriter textStore)

getTextStore

public SubStoreWriter getTextStore()

setSizeParameters

public void setSizeParameters(int[] params)

getSizeParameters

public int[] getSizeParameters()

getTree

public TinyTree getTree()

open

public void open()
          throws XPathException
Open the event stream

Specified by:
open in interface Receiver
Overrides:
open in class Builder
Throws:
XPathException

startDocument

public void startDocument(int properties)
                   throws XPathException
Write a document node to the tree

Specified by:
startDocument in interface Receiver
Overrides:
startDocument in class Builder
Throws:
XPathException

endDocument

public void endDocument()
                 throws XPathException
Callback interface for SAX: not for application use

Specified by:
endDocument in interface Receiver
Overrides:
endDocument in class Builder
Throws:
XPathException

close

public void close()
           throws XPathException
Specified by:
close in interface Receiver
Overrides:
close in class Builder
Throws:
XPathException

startElement

public void startElement(int nameCode,
                         int typeCode,
                         int locationId,
                         int properties)
                  throws XPathException
Notify the start tag of an element

Throws:
XPathException

namespace

public void namespace(int namespaceCode,
                      int properties)
               throws XPathException
Throws:
XPathException

attribute

public void attribute(int nameCode,
                      int typeCode,
                      CharSequence value,
                      int locationId,
                      int properties)
               throws XPathException
Throws:
XPathException

startContent

public void startContent()

endElement

public void endElement()
                throws XPathException
Callback interface for SAX: not for application use

Throws:
XPathException

characters

public void characters(CharSequence chars,
                       int locationId,
                       int properties)
                throws XPathException
Callback interface for SAX: not for application use

Throws:
XPathException

processingInstruction

public void processingInstruction(String piname,
                                  CharSequence remainder,
                                  int locationId,
                                  int properties)
                           throws XPathException
Callback interface for SAX: not for application use

Throws:
XPathException

comment

public void comment(CharSequence chars,
                    int locationId,
                    int properties)
             throws XPathException
Callback interface for SAX: not for application use

Throws:
XPathException

setUnparsedEntity

public void setUnparsedEntity(String name,
                              String uri,
                              String publicId)
Set an unparsed entity in the document