org.exist.memtree
Class MemTreeBuilder

java.lang.Object
  extended by org.exist.memtree.MemTreeBuilder

public class MemTreeBuilder
extends Object

Use this class to build a new in-memory DOM document.

Author:
Wolfgang

Constructor Summary
MemTreeBuilder()
           
MemTreeBuilder(XQueryContext context)
           
 
Method Summary
 int addAttribute(QName qname, String value)
           
 int addReferenceNode(NodeProxy proxy)
           
 int cdataSection(CharSequence data)
           
 int characters(char[] ch, int start, int len)
          Create a new text node.
 int characters(CharSequence s)
          Create a new text node.
 int comment(char[] ch, int start, int len)
           
 int comment(CharSequence data)
           
 int documentType(String publicId, String systemId)
           
 void documentType(String name, String publicId, String systemId)
           
 void endDocument()
          End building the document.
 void endElement()
          Close the last element created.
 XQueryContext getContext()
           
 DocumentImpl getDocument()
          Returns the created document object.
 int getSize()
           
 int namespaceNode(QName qn)
           
 int namespaceNode(String prefix, String uri)
           
 int processingInstruction(String target, String data)
           
 void startDocument()
          Start building the document.
 void startDocument(boolean explicitCreation)
          Start building the document.
 int startElement(QName qn, Attributes attributes)
          Create a new element.
 int startElement(String namespaceURI, String localName, String qname, Attributes attributes)
          Create a new element.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MemTreeBuilder

public MemTreeBuilder()

MemTreeBuilder

public MemTreeBuilder(XQueryContext context)
Method Detail

getDocument

public DocumentImpl getDocument()
Returns the created document object.


getContext

public XQueryContext getContext()

getSize

public int getSize()

startDocument

public void startDocument()
Start building the document.


startDocument

public void startDocument(boolean explicitCreation)
Start building the document.


endDocument

public void endDocument()
End building the document.


startElement

public int startElement(String namespaceURI,
                        String localName,
                        String qname,
                        Attributes attributes)
Create a new element.

Returns:
the node number of the created element

startElement

public int startElement(QName qn,
                        Attributes attributes)
Create a new element.

Returns:
the node number of the created element

endElement

public void endElement()
Close the last element created.


addReferenceNode

public int addReferenceNode(NodeProxy proxy)

addAttribute

public int addAttribute(QName qname,
                        String value)

characters

public int characters(char[] ch,
                      int start,
                      int len)
Create a new text node.

Returns:
the node number of the created node

characters

public int characters(CharSequence s)
Create a new text node.

Returns:
the node number of the created node

comment

public int comment(CharSequence data)

comment

public int comment(char[] ch,
                   int start,
                   int len)

cdataSection

public int cdataSection(CharSequence data)

processingInstruction

public int processingInstruction(String target,
                                 String data)

namespaceNode

public int namespaceNode(String prefix,
                         String uri)

namespaceNode

public int namespaceNode(QName qn)

documentType

public int documentType(String publicId,
                        String systemId)

documentType

public void documentType(String name,
                         String publicId,
                         String systemId)


Copyright (C) Wolfgang Meier. All rights reserved.