|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.xml.io.DOMTreeEncoder
Field Summary | |
private Document |
ActiveDoc
|
private Node |
ActiveNode
|
private DOMTreeEncoderCallback |
callback
|
private boolean |
callbackFinished
|
private NodeList |
ChildNodeList
|
private Stack |
ChildNodes
|
private Vector |
ChildNodesFilled
|
private Stack |
ChildNodesUseStack
|
private static boolean |
DEBUG
|
private DOMComponents |
dom
|
private int |
iNrChildren
|
private boolean |
MODE_createDOM
|
private Stack |
Nodes
|
private String |
PersistableTypeName
|
private Persistable |
TopLevelPersistableObject
|
private Node |
tree
|
private int |
writeObjectDepth
|
Fields inherited from interface wt.pds.PersistentStoreIfc |
versionID |
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 | |
private |
DOMTreeEncoder()
|
|
DOMTreeEncoder(Document doc,
Persistable thePersistableObject)
|
|
DOMTreeEncoder(Document doc,
Persistable thePersistableObject,
DOMTreeEncoderCallback callback)
|
|
DOMTreeEncoder(Element tree,
Persistable thePersistableObject)
|
|
DOMTreeEncoder(Element tree,
Persistable thePersistableObject,
DOMTreeEncoderCallback callback)
|
Method Summary | |
private Node |
findNode(String tagName)
|
private Node |
findNode(String tagName,
String tagAttributeValue)
|
String |
getContainer()
Get the current container name. |
Node |
getTree()
|
protected void |
initEncoder(boolean mode,
Document doc,
Node tree)
|
private boolean |
popEm()
|
private boolean |
pushEm()
|
void |
reset(Element tree,
Persistable thePersistableObject)
|
void |
reset(Persistable thePersistableObject)
|
private byte[] |
serializeObject(Object a_obj)
|
void |
setAsciiStream(String attribute_name,
InputStream aStream,
int len)
Set the value to an ascii stream. |
void |
setBigDecimal(String attribute_name,
BigDecimal aBigDecimal)
Set the value to a BigDecimal. |
void |
setBinaryStream(String attribute_name,
InputStream aStream,
int len)
Set the value to a binary stream. |
void |
setBoolean(String attribute_name,
boolean aBool)
Set the value to a Java boolean. |
void |
setBooleanObject(String attribute_name,
Boolean aBool)
Set the value to a Boolean. |
void |
setByte(String attribute_name,
byte aByte)
Set the value to a Java byte. |
void |
setByteObject(String attribute_name,
Byte aByte)
Set the value to a Byte. |
void |
setBytes(String attribute_name,
byte[] bArray)
Set the value to a Java byte array. |
private void |
setCDataSectionLeaf(Node theNode,
String value)
|
void |
setChar(String attribute_name,
char aChar)
Set the value to a Java char. |
void |
setCharObject(String attribute_name,
Character aChar)
Set the value to a Character. |
void |
setContainer(String container)
|
void |
setDate(String attribute_name,
Date aDate)
Set the value to a java.util.Date. |
void |
setDouble(String attribute_name,
double aDbl)
Set the value to a Java double. |
void |
setDoubleObject(String attribute_name,
Double aDbl)
Set the value to a Double. |
void |
setFloat(String attribute_name,
float aFloat)
Set the value to a Java float. |
void |
setFloatObject(String attribute_name,
Float aFloat)
Set the value to a Float. |
void |
setInlineObject(String attribute_name,
String blobAttributeName,
Serializable anObj)
Set the value to a Java Serializable Object. |
void |
setInt(String attribute_name,
int anInt)
Set the value to a Java int. |
void |
setIntObject(String attribute_name,
Integer anInt)
Set the value to a Integer. |
void |
setLobLocator(String attribute_name,
LobLocator aLL)
Set the value to a Lob locator. |
void |
setLong(String attribute_name,
long aLong)
Set the value to a Java long. |
void |
setLongObject(String attribute_name,
Long aLong)
Set the value to a Long. |
private void |
setNodeStructures(Node thisNode)
|
void |
setNull(String attribute_name,
int sqltype)
Set the value to a null. |
private void |
setNullLeaf(Node theNode)
|
void |
setObject(String attribute_name,
Object anObj)
Set the value to a Java object. |
void |
setShort(String attribute_name,
short aShort)
Set the value to a Java short. |
void |
setShortObject(String attribute_name,
Short aShort)
Set the value to a Short. |
void |
setSmallObject(String attribute_name,
Serializable anObj)
Set the value to a Java object. |
void |
setString(String attribute_name,
String aString)
Set the value to a Java String. |
private void |
setTextLeaf(Node theNode,
String value)
|
void |
setTime(String attribute_name,
Time aTime)
Set the value to a Java Timee. |
void |
setTimestamp(String attribute_name,
Timestamp aTimestamp)
Set the value to a Java Timestamp. |
void |
setUnicodeStream(String attribute_name,
InputStream aStream,
int len)
Set the value to a Java Unicode stream. |
void |
writeObject(String attribute_name,
ObjectMappable obj,
Class concrete_class,
boolean is_required)
Set the values corresponding to a nested ObjectMappable Object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final boolean DEBUG
private Node tree
private Node ActiveNode
private Document ActiveDoc
private String PersistableTypeName
private Persistable TopLevelPersistableObject
private NodeList ChildNodeList
private Vector ChildNodesFilled
private int iNrChildren
private Stack Nodes
private Stack ChildNodes
private Stack ChildNodesUseStack
private DOMComponents dom
private DOMTreeEncoderCallback callback
private int writeObjectDepth
private boolean callbackFinished
private boolean MODE_createDOM
Constructor Detail |
private DOMTreeEncoder()
public DOMTreeEncoder(Document doc, Persistable thePersistableObject) throws XMLIOException
public DOMTreeEncoder(Document doc, Persistable thePersistableObject, DOMTreeEncoderCallback callback) throws XMLIOException
public DOMTreeEncoder(Element tree, Persistable thePersistableObject) throws XMLIOException
public DOMTreeEncoder(Element tree, Persistable thePersistableObject, DOMTreeEncoderCallback callback) throws XMLIOException
Method Detail |
public void reset(Element tree, Persistable thePersistableObject) throws XMLIOException
XMLIOException
public void reset(Persistable thePersistableObject) throws XMLIOException
XMLIOException
protected void initEncoder(boolean mode, Document doc, Node tree)
public Node getTree()
private void setNodeStructures(Node thisNode) throws XMLIOException
XMLIOException
private boolean pushEm() throws XMLIOException
XMLIOException
private boolean popEm()
private Node findNode(String tagName) throws XMLIOException
XMLIOException
private Node findNode(String tagName, String tagAttributeValue) throws XMLIOException
XMLIOException
private void setCDataSectionLeaf(Node theNode, String value) throws XMLIOException
XMLIOException
private void setTextLeaf(Node theNode, String value) throws XMLIOException
XMLIOException
private void setNullLeaf(Node theNode) throws XMLIOException
XMLIOException
private byte[] serializeObject(Object a_obj) throws XMLIOException
XMLIOException
public void setAsciiStream(String attribute_name, InputStream aStream, int len) throws XMLIOException
PersistentStoreIfc
setAsciiStream
in interface PersistentStoreIfc
attribute_name
- a class attribute nameaStream
- the parameter valuelen
- the length of the input stream
XMLIOException
public void setBigDecimal(String attribute_name, BigDecimal aBigDecimal) throws XMLIOException
PersistentStoreIfc
setBigDecimal
in interface PersistentStoreIfc
attribute_name
- a class attribute nameaBigDecimal
- the parameter value
XMLIOException
public void setBinaryStream(String attribute_name, InputStream aStream, int len) throws XMLIOException
PersistentStoreIfc
setBinaryStream
in interface PersistentStoreIfc
attribute_name
- a class attribute nameaStream
- the parameter valuelen
- the length of the input stream
XMLIOException
public void setBoolean(String attribute_name, boolean aBool) throws XMLIOException
PersistentStoreIfc
setBoolean
in interface PersistentStoreIfc
attribute_name
- a class attribute nameaBool
- the parameter value
XMLIOException
public void setBooleanObject(String attribute_name, Boolean aBool) throws XMLIOException
PersistentStoreIfc
setBooleanObject
in interface PersistentStoreIfc
attribute_name
- a class attribute nameaBool
- the parameter value
XMLIOException
public void setByte(String attribute_name, byte aByte) throws XMLIOException
PersistentStoreIfc
setByte
in interface PersistentStoreIfc
attribute_name
- a class attribute nameaByte
- the parameter value
XMLIOException
public void setByteObject(String attribute_name, Byte aByte) throws XMLIOException
PersistentStoreIfc
setByteObject
in interface PersistentStoreIfc
attribute_name
- a class attribute nameaByte
- the parameter value
XMLIOException
public void setBytes(String attribute_name, byte[] bArray) throws XMLIOException
PersistentStoreIfc
setBytes
in interface PersistentStoreIfc
attribute_name
- a class attribute namebArray
- the parameter value
XMLIOException
public void setChar(String attribute_name, char aChar) throws XMLIOException
PersistentStoreIfc
setChar
in interface PersistentStoreIfc
attribute_name
- a class attribute nameaChar
- the parameter value
XMLIOException
public void setCharObject(String attribute_name, Character aChar) throws XMLIOException
PersistentStoreIfc
setCharObject
in interface PersistentStoreIfc
attribute_name
- a class attribute nameaChar
- the parameter value
XMLIOException
public void setDate(String attribute_name, Date aDate) throws XMLIOException
PersistentStoreIfc
setDate
in interface PersistentStoreIfc
attribute_name
- a class attribute nameaDate
- the parameter value
XMLIOException
public void setDouble(String attribute_name, double aDbl) throws XMLIOException
PersistentStoreIfc
setDouble
in interface PersistentStoreIfc
attribute_name
- a class attribute nameaDbl
- the parameter value
XMLIOException
public void setDoubleObject(String attribute_name, Double aDbl) throws XMLIOException
PersistentStoreIfc
setDoubleObject
in interface PersistentStoreIfc
attribute_name
- a class attribute nameaDbl
- the parameter value
XMLIOException
public void setFloat(String attribute_name, float aFloat) throws XMLIOException
PersistentStoreIfc
setFloat
in interface PersistentStoreIfc
attribute_name
- a class attribute nameaFloat
- the parameter value
XMLIOException
public void setFloatObject(String attribute_name, Float aFloat) throws XMLIOException
PersistentStoreIfc
setFloatObject
in interface PersistentStoreIfc
attribute_name
- a class attribute nameaFloat
- the parameter value
XMLIOException
public void setInlineObject(String attribute_name, String blobAttributeName, Serializable anObj) throws XMLIOException
PersistentStoreIfc
setInlineObject
in interface PersistentStoreIfc
attribute_name
- a class attribute nameblobAttributeName
- a blob attribute nameanObj
- the serializable object
XMLIOException
public void setInt(String attribute_name, int anInt) throws XMLIOException
PersistentStoreIfc
setInt
in interface PersistentStoreIfc
attribute_name
- a class attribute nameanInt
- the parameter value
XMLIOException
public void setIntObject(String attribute_name, Integer anInt) throws XMLIOException
PersistentStoreIfc
setIntObject
in interface PersistentStoreIfc
attribute_name
- a class attribute nameanInt
- the parameter value
XMLIOException
public void setLong(String attribute_name, long aLong) throws XMLIOException
PersistentStoreIfc
setLong
in interface PersistentStoreIfc
attribute_name
- a class attribute nameaLong
- the parameter value
XMLIOException
public void setLongObject(String attribute_name, Long aLong) throws XMLIOException
PersistentStoreIfc
setLongObject
in interface PersistentStoreIfc
attribute_name
- a class attribute nameaLong
- the parameter value
XMLIOException
public void setNull(String attribute_name, int sqltype) throws XMLIOException
PersistentStoreIfc
setNull
in interface PersistentStoreIfc
attribute_name
- a class attribute namesqltype
- the SQL type of the attribute
XMLIOException
public void setObject(String attribute_name, Object anObj) throws XMLIOException
setObject
in interface PersistentStoreIfc
anObj
- the parameter value; the object to be included.attribute_name
- a class attribute name
XMLIOException
- if a database-access error or other error occurs.public void setSmallObject(String attribute_name, Serializable anObj) throws XMLIOException
setSmallObject
in interface PersistentStoreIfc
anObj
- the parameter value; the object to be included.attribute_name
- a class attribute name
XMLIOException
- if a database-access error or other error occurs.public void setShort(String attribute_name, short aShort) throws XMLIOException
PersistentStoreIfc
setShort
in interface PersistentStoreIfc
attribute_name
- a class attribute nameaShort
- the parameter value
XMLIOException
public void setShortObject(String attribute_name, Short aShort) throws XMLIOException
PersistentStoreIfc
setShortObject
in interface PersistentStoreIfc
attribute_name
- a class attribute nameaShort
- the parameter value
XMLIOException
public void setString(String attribute_name, String aString) throws XMLIOException
PersistentStoreIfc
setString
in interface PersistentStoreIfc
attribute_name
- a class attribute nameaString
- the parameter value
XMLIOException
public void setTime(String attribute_name, Time aTime) throws XMLIOException
PersistentStoreIfc
setTime
in interface PersistentStoreIfc
attribute_name
- a class attribute nameaTime
- the parameter value
XMLIOException
public void setTimestamp(String attribute_name, Timestamp aTimestamp) throws XMLIOException
PersistentStoreIfc
setTimestamp
in interface PersistentStoreIfc
attribute_name
- a class attribute nameaTimestamp
- the parameter value
XMLIOException
public void setUnicodeStream(String attribute_name, InputStream aStream, int len) throws XMLIOException
PersistentStoreIfc
setUnicodeStream
in interface PersistentStoreIfc
attribute_name
- a class attribute nameaStream
- the parameter value
XMLIOException
public void setLobLocator(String attribute_name, LobLocator aLL) throws XMLIOException
PersistentStoreIfc
setLobLocator
in interface PersistentStoreIfc
attribute_name
- a class attribute nameaLL
- the parameter value
XMLIOException
public void writeObject(String attribute_name, ObjectMappable obj, Class concrete_class, boolean is_required) throws XMLIOException
PersistentStoreIfc
writeExternal
method.
writeObject
in interface PersistentStoreIfc
attribute_name
- a class attribute nameobj
- the nested objectconcrete_class
- the class of the object (in case obj is null)
XMLIOException
public String getContainer()
PersistentStoreIfc
writeObject
.
getContainer
in interface PersistentStoreIfc
public void setContainer(String container)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |