Main Page | Packages | Class Hierarchy | Class List | File List | Class Members

saxparse.MessageBaseMessage Class Reference

Inheritance diagram for saxparse.MessageBaseMessage:

Inheritance graph
[legend]
Collaboration diagram for saxparse.MessageBaseMessage:

Collaboration graph
[legend]
List of all members.

Detailed Description

MessageBaseMessage Aug 14, 2004.

The MessageBase class contains fields that are shared by all message types. The XML document for a message class (e.g., AimOrderMessage) will start with these fields. The MessageBaseMessage object is passed SAX XML events from a subclass message processor (for example, AimOrderMessage). The MessageBase fields are processed. While they are being processed the processElement method will return the state MSG_BASE. When the fields have been processed, the MSG_BASE_DONE state will be returned.

If the first call to processElement is an XML tag that is not associated with a MessageBase field, processElement will return BAD_STATE.

Author:
Ian Kaplan, www.bearcave.com, iank@bearcave.com


Protected Member Functions

MessageStates processElement (String localName, Attributes attributes)
void processCharacters (String str, MessageBase msg)
void processEndElement (String localName)

Private Attributes

MessageStates mLocalState = MessageStates.BAD_STATE


Member Function Documentation

void saxparse.MessageBaseMessage.processCharacters String  str,
MessageBase  msg
[protected]
 

00060 { 00061 if (mLocalState == MessageStates.PRODUCT) { 00062 msg.setProduct( str ); 00063 } 00064 else if (mLocalState == MessageStates.USER) { 00065 msg.setUser( str ); 00066 } 00067 else if (mLocalState == MessageStates.LOCAL_ID) { 00068 msg.setLocalID( str ); 00069 } 00070 }

MessageStates saxparse.MessageBaseMessage.processElement String  localName,
Attributes  attributes
[protected]
 

00042 { 00043 MessageStates returnState = mLocalState; 00044 if (localName.equals("product")) { 00045 mLocalState = MessageStates.PRODUCT; 00046 returnState = MessageStates.MSG_BASE; 00047 } 00048 else if (localName.equals("user")) { 00049 mLocalState = MessageStates.USER; 00050 returnState = MessageStates.MSG_BASE; 00051 } 00052 else if (localName.equals("localID")) { 00053 mLocalState = MessageStates.LOCAL_ID; 00054 returnState = MessageStates.MSG_BASE; 00055 } 00056 00057 return returnState; 00058 }

void saxparse.MessageBaseMessage.processEndElement String  localName  )  [protected]
 

00072 { 00073 mLocalState = MessageStates.MSG_BASE_DONE; 00074 }


Member Data Documentation

MessageStates saxparse.MessageBaseMessage.mLocalState = MessageStates.BAD_STATE [private]
 


The documentation for this class was generated from the following file:
Generated on Sat Aug 28 13:50:04 2004 for SaxParse by doxygen 1.3.8