org.teiid.query.processor.xml
Class DocumentInProgress

java.lang.Object
  extended by org.teiid.query.processor.xml.DocumentInProgress

public class DocumentInProgress
extends java.lang.Object

This class is used to build XML document and stream the output as chunks. The class holds one chunk of the document in memory at one time.


Constructor Summary
DocumentInProgress(FileStore store, java.lang.String encoding)
           
 
Method Summary
 boolean addAttribute(NodeDescriptor descriptor, java.lang.String attributeValue)
           
 boolean addAttribute(NodeDescriptor descriptor, java.lang.String attributeValue, org.teiid.query.processor.xml.Element element)
           
 boolean addComment(java.lang.String commentText)
           
 boolean addElement(NodeDescriptor descriptor, NodeDescriptor nillableDescriptor)
           
 boolean addElement(NodeDescriptor descriptor, java.lang.String content)
           
 SQLXMLImpl getSQLXML()
           
 boolean isFinished()
           
 void markAsFinished()
           
 boolean moveToLastChild()
           
 boolean moveToParent()
          Move to the parent of this element.
static java.lang.String normalizeText(java.lang.String content, java.lang.String textNormalizationMode)
           
 void setDocumentFormat(boolean isFormatted)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DocumentInProgress

public DocumentInProgress(FileStore store,
                          java.lang.String encoding)
                   throws TeiidComponentException
Throws:
TeiidComponentException
Method Detail

getSQLXML

public SQLXMLImpl getSQLXML()

setDocumentFormat

public void setDocumentFormat(boolean isFormatted)
See Also:
setDocumentFormat(boolean)

moveToParent

public boolean moveToParent()
                     throws org.xml.sax.SAXException
Move to the parent of this element. The parent of this element becomes the current object. Need to process the current and child object before moving to the parent.

Throws:
org.xml.sax.SAXException
See Also:
moveToParent()

moveToLastChild

public boolean moveToLastChild()
See Also:
moveToLastChild()

addElement

public boolean addElement(NodeDescriptor descriptor,
                          NodeDescriptor nillableDescriptor)

addElement

public boolean addElement(NodeDescriptor descriptor,
                          java.lang.String content)

addAttribute

public boolean addAttribute(NodeDescriptor descriptor,
                            java.lang.String attributeValue,
                            org.teiid.query.processor.xml.Element element)

addAttribute

public boolean addAttribute(NodeDescriptor descriptor,
                            java.lang.String attributeValue)
See Also:
org.teiid.query.processor.xml.DocumentInProgress#addAttribute(java.lang.String, java.lang.String, java.lang.String, boolean)

addComment

public boolean addComment(java.lang.String commentText)
Throws:
TeiidComponentException
See Also:
addComment(java.lang.String)

isFinished

public boolean isFinished()
See Also:
isFinished()

markAsFinished

public void markAsFinished()
                    throws TeiidComponentException
Throws:
TeiidComponentException
See Also:
markAsFinished()

normalizeText

public static java.lang.String normalizeText(java.lang.String content,
                                             java.lang.String textNormalizationMode)
Parameters:
content -
textNormalizationMode - preserve No normalization is done, the value is not changed for element content replace All occurrences of #x9 (tab), #xA (line feed) and #xD (carriage return) are replaced with #x20 (space) collapse After the processing implied by replace, contiguous sequences of #x20's are collapsed to a single #x20, and leading and trailing #x20's are removed.
Returns:
Since:
4.3


Copyright © 2010. All Rights Reserved.