|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DocumentInProgress
This represents a document in construction. It maintains a reference to the current XML element being worked on, although the nature of that reference is completely hidden from the user. This allows the nastiness of creating the document using some document model to be hidden from the user.
Method Summary | |
---|---|
boolean |
addAttribute(NodeDescriptor descriptor,
java.lang.String attributeValue)
Add an attribute with content for the given NodeDescriptor. |
boolean |
addComment(java.lang.String commentText)
Adds a comment to the current document node |
boolean |
addElement(NodeDescriptor descriptor,
NodeDescriptor nillableDescriptor)
Add an element for the given NodeDescriptor. |
boolean |
addElement(NodeDescriptor descriptor,
java.lang.String content)
Add an element with content for the given NodeDescriptor. |
char[] |
getNextChunk(int sizeInBytes)
Retrieve the next chunk of document. |
boolean |
isFinished()
This flag indicates the document is finished and requires no more processing. |
void |
markAsFinished()
This marks the document as finished, requiring no more processing. |
boolean |
moveToLastChild()
|
boolean |
moveToParent()
|
void |
setDocumentEncoding(java.lang.String documentEncoding)
Sets the document encoding property of the XML document, typically something like UTF-8 |
void |
setDocumentFormat(boolean isFormatted)
Sets whether the document will be formatted in human-readable form (multi-line, with tabs) or compact form (no line breaks or tabs). |
Method Detail |
---|
void setDocumentEncoding(java.lang.String documentEncoding)
UTF-8
document
- encoding valuevoid setDocumentFormat(boolean isFormatted)
isFormatted
- true for human-readable form, false for
compact formboolean moveToParent() throws org.xml.sax.SAXException
org.xml.sax.SAXException
boolean moveToLastChild()
boolean addElement(NodeDescriptor descriptor, NodeDescriptor nillableDescriptor)
descriptor
- NodeDescriptor of the element
boolean addElement(NodeDescriptor descriptor, java.lang.String content)
addElement
method.
descriptor
- NodeDescriptor of the elementcontent
- Content of the element
boolean addAttribute(NodeDescriptor descriptor, java.lang.String attributeValue)
descriptor
- NodeDescriptor of the attributeattributeValue
- String content of the attribute, this must be a
non-null, non-empty String. Otherwise, no attribute will be added.
boolean addComment(java.lang.String commentText)
commentText
- text of the comment
boolean isFinished()
markAsFinished()
void markAsFinished() throws MetaMatrixComponentException
MetaMatrixComponentException
- if there is any problem ending the documentisFinished()
char[] getNextChunk(int sizeInBytes)
sizeInBytes
- size of the chunk in bytes. No limit if it is 0.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |