|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.media.mn8.protocol.jabber.JabberDataBlock
The base class for Jabber datablocks objects in the datablock sub package
Field Summary | |
protected Hashtable |
attributes
The list of attributes in this tag |
protected Vector |
childBlocks
The list of child blocks inside this block |
protected JabberDataBlock |
parent
This blocks' parent |
protected StringBuffer |
textData
A string representing all the text within the data block |
Constructor Summary | |
JabberDataBlock()
Constructor |
|
JabberDataBlock(JabberDataBlock _parent)
Constructor |
|
JabberDataBlock(JabberDataBlock _parent,
Hashtable _attributes)
Constructor including an Attribute list |
|
JabberDataBlock(String _tagName,
JabberDataBlock _parent,
Hashtable _attributes)
Constructor including an Attribute list |
Method Summary | |
protected void |
addAttributeToStringBuffer(StringBuffer buffer)
Method to add all the attributes to a string buffer |
void |
addChild(JabberDataBlock newData)
Method to add a child to the list of child blocks |
void |
addText(String text)
Method to add some text to the text buffer for this block |
protected void |
constructReply(JabberDataBlock container)
Method to construct a reply to this block. |
String |
getAttribute(String attributeName)
Method to get an attribute |
byte[] |
getBytes()
Method to return the data as a byte stream ready to send over the wire |
Vector |
getChildBlocks()
Returns a vector holding all of the children of this block |
JabberDataBlock |
getParent()
Method to get the parent of this block |
String |
getTagEnd()
Method to return the end of tag string as a string |
String |
getTagName()
Method to return the tag name |
String |
getTagStart()
Method to return the start of tag string as a string |
String |
getText()
Method to get the text element of this block |
void |
setAttribute(String attributeName,
String value)
Method to set an attribute value |
String |
toString()
Method to convert this into a String |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected Vector childBlocks
protected StringBuffer textData
protected JabberDataBlock parent
protected Hashtable attributes
Constructor Detail |
public JabberDataBlock()
public JabberDataBlock(JabberDataBlock _parent)
public JabberDataBlock(JabberDataBlock _parent, Hashtable _attributes)
_parent
- The parent of this datablock_attributes
- The list of element attributespublic JabberDataBlock(String _tagName, JabberDataBlock _parent, Hashtable _attributes)
_tagName
- The name of the block_parent
- The parent of this datablock_attributes
- The list of element attributesMethod Detail |
public void addChild(JabberDataBlock newData)
newData
- The child block to addpublic void addText(String text)
text
- The text to addpublic JabberDataBlock getParent()
public byte[] getBytes()
public String getText()
public String getAttribute(String attributeName)
attributeName
- The name of the attribute to get
public void setAttribute(String attributeName, String value)
attributeName
- The name of the attribute to setvalue
- The value of the attributepublic Vector getChildBlocks()
public String toString()
toString
in class Object
protected void addAttributeToStringBuffer(StringBuffer buffer)
buffer
- The string buffer to which all the attributes will be addedpublic String getTagStart()
public String getTagEnd()
public String getTagName()
protected void constructReply(JabberDataBlock container)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |