wt.xml.io
Class DOMTreeEncoderCallback

java.lang.Object
  extended bywt.xml.io.DOMTreeEncoderCallback
All Implemented Interfaces:
DOMTreeStreamCallback, XMLMechanismConstants
Direct Known Subclasses:
CompositeDOMTreeEncoderCallback, ContentItemDOMTreeEncoderCallback, IBADOMTreeEncoderCallback

public abstract class DOMTreeEncoderCallback
extends Object
implements DOMTreeStreamCallback

Abstract class for callbacks which may be given to a DOMTreeEncoder in order to provide a way to handle data not externalized via the exported objects' writeExternal call stack.

Supported API: false

Extendable: false


Field Summary
private static String CLASSNAME
           
private  Document doc
           
private  OutputStream outputStream
           
private static String RESOURCE
           
private  Vector zipEntryVector
           
 
Fields inherited from interface wt.util.xml.XMLMechanismConstants
ATTLIST_ATTRIBUTE_NAME, ATTLIST_CLASS_NAME, ATTLIST_ENCODING_TYPE, ATTLIST_OID, DEFAULT_XML_PARSER_IMPLEMENTATION, DOCUMENT_ELEMENT_NAME, SELF_DESCRIBING_XML, XML_FILE_EXT
 
Constructor Summary
DOMTreeEncoderCallback()
           
 
Method Summary
 Document getDoc()
          Gets the value of the attribute: doc; The DOM Document needed for creating new Elements, etc.
protected  Element getElement(Persistable obj)
          Gets a new DOMTreeEncoder and passes it to the writeExternal() method of the Persistable argument.
abstract  Element getNextElement()
          Gets the next tree returned by the appropriate call of getElement().
 OutputStream getOutputStream()
          Gets the value of the attribute: outputStream; The output stream to which to write any data generated by the callback which does not belong in the DOM Document.
abstract  Persistable getPersistableObject()
          Gets the value of the attribute: persistableObject; The object to be examined by the callback for additional externalization not handled by the object's writeExternal() method.
 Vector getZipEntryVector()
          Gets the value of the attribute: zipEntryVector; A Vector of Long objects containing the oids used as ZipEntry names for the current Zip archive.
abstract  void initialize(Persistable persistableObject)
          Sets the object to be examined by the callback for additional exernalization not handled by the object's writeExternal() method, and does some internal bookkeeping to prepare the callback to have its getNextElement() method invoked.
 void setDoc(Document a_Doc)
          Sets the value of the attribute: doc; The DOM Document needed for creating new Elements, etc.
 void setOutputStream(OutputStream a_OutputStream)
          Sets the value of the attribute: outputStream; The output stream to which to write any data generated by the callback which does not belong in the DOM Document.
protected abstract  void setPersistableObject(Persistable a_PersistableObject)
          Sets the value of the attribute: persistableObject; The object to be examined by the callback for additional externalization not handled by the object's writeExternal() method.
 void setZipEntryVector(Vector a_ZipEntryVector)
          Sets the value of the attribute: zipEntryVector; A Vector of Long objects containing the oids used as ZipEntry names for the current Zip archive.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

outputStream

private OutputStream outputStream

zipEntryVector

private Vector zipEntryVector

doc

private Document doc
Constructor Detail

DOMTreeEncoderCallback

public DOMTreeEncoderCallback()
Method Detail

getOutputStream

public OutputStream getOutputStream()
Gets the value of the attribute: outputStream; The output stream to which to write any data generated by the callback which does not belong in the DOM Document.

Supported API: false

Returns:
OutputStream

setOutputStream

public void setOutputStream(OutputStream a_OutputStream)
                     throws WTPropertyVetoException
Sets the value of the attribute: outputStream; The output stream to which to write any data generated by the callback which does not belong in the DOM Document.

Supported API: false

Parameters:
a_OutputStream -
Throws:
WTPropertyVetoException

getZipEntryVector

public Vector getZipEntryVector()
Gets the value of the attribute: zipEntryVector; A Vector of Long objects containing the oids used as ZipEntry names for the current Zip archive. Used to prevent duplicate entries.

Supported API: false

Returns:
Vector

setZipEntryVector

public void setZipEntryVector(Vector a_ZipEntryVector)
Sets the value of the attribute: zipEntryVector; A Vector of Long objects containing the oids used as ZipEntry names for the current Zip archive. Used to prevent duplicate entries.

Supported API: false

Parameters:
a_ZipEntryVector -

getPersistableObject

public abstract Persistable getPersistableObject()
Gets the value of the attribute: persistableObject; The object to be examined by the callback for additional externalization not handled by the object's writeExternal() method.

Supported API: false

Returns:
Persistable

setPersistableObject

protected abstract void setPersistableObject(Persistable a_PersistableObject)
Sets the value of the attribute: persistableObject; The object to be examined by the callback for additional externalization not handled by the object's writeExternal() method.

Supported API: false

Parameters:
a_PersistableObject -

initialize

public abstract void initialize(Persistable persistableObject)
                         throws XMLMechanismException
Sets the object to be examined by the callback for additional exernalization not handled by the object's writeExternal() method, and does some internal bookkeeping to prepare the callback to have its getNextElement() method invoked. This method should be called once per persistableObject before each set of getNextElement() calls.

Supported API: false

Parameters:
persistableObject -
Throws:
XMLMechanismException

getElement

protected Element getElement(Persistable obj)
                      throws XMLMechanismException
Gets a new DOMTreeEncoder and passes it to the writeExternal() method of the Persistable argument. Returns the tree it gets from the DOMTreeEncoder.

Supported API: false

Parameters:
obj - The Persistable to be externalized as a part of the externalization process of the DOMTreeEncoder using this callback object.
Returns:
Element
Throws:
XMLMechanismException

getNextElement

public abstract Element getNextElement()
                                throws XMLMechanismException
Gets the next tree returned by the appropriate call of getElement().

Supported API: false

Returns:
Element
Throws:
XMLMechanismException

getDoc

public Document getDoc()
Gets the value of the attribute: doc; The DOM Document needed for creating new Elements, etc.

Supported API: false

Specified by:
getDoc in interface DOMTreeStreamCallback
Returns:
Document

setDoc

public void setDoc(Document a_Doc)
Sets the value of the attribute: doc; The DOM Document needed for creating new Elements, etc.

Supported API: false

Specified by:
setDoc in interface DOMTreeStreamCallback
Parameters:
a_Doc -