|
JSJaC | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object | +--JSJaCPacket
Somewhat abstract base class for all kinds of specialised packets
Defined in JSJaCPacket.js
Field Summary | |
String |
xml
Returns a string representation of the raw xml content of this packet. |
Constructor Summary | |
JSJaCPacket(<String> name)
Creates a new packet with given root tag name (for internal use) |
Method Summary | |
JSJaCPacket
|
appendNode(<String> element)
Appends node created by buildNode to this packets parent node. |
Node
|
buildNode(elementName)
Builds a node using script.aculo.us' Dom Builder notation. |
JSJaCPacket
|
clone()
Returns a copy of this node |
JSJaCPacket
|
errorReply(<STANZA_ERROR> stanza_error)
Returns an error condition reply according to XEP-0086. |
Node
|
getChild(<String> name, <String> ns)
Gets a child element of this packet. |
String
|
getChildVal(<String> name, <String> ns)
Gets the node value of a child element of this packet. |
Document
|
getDoc()
Gets the associated Document for this packet. |
String
|
getFrom()
Gets the 'from' attribute of this packet. |
JSJaCJID
|
getFromJID()
Gets the 'from' attribute of this packet as a JSJaCJID object |
String
|
getID()
Gets the 'id' of this packet |
Node
|
getNode()
Gets the root node of this packet |
String
|
getTo()
Gets the 'to' attribute of this packet |
JSJaCJID
|
getToJID()
Gets the 'to' attribute of this packet as a JSJaCJID object |
String
|
getType()
Gets the 'type' of this packet |
String
|
getXMLLang()
Gets the 'xml:lang' of this packet |
String
|
getXMLNS()
Gets the 'xmlns' (xml namespace) of the root node of this packet |
boolean
|
isError()
Checks if packet is of type 'error' |
String
|
pType()
Gets the type (name of root element) of this packet, i.e. |
JSJaCPacket
|
setFrom(from)
Sets the 'from' attribute of the root node of this packet. |
JSJaCPacket
|
setID(<String> id)
Sets 'id' attribute of the root node of this packet. |
JSJaCPacket
|
setTo(<String> to)
Sets the 'to' attribute of the root node of this packet |
JSJaCPacket
|
setType(<String> type)
Sets the 'type' attribute of the root node of this packet. |
JSJaCPacket
|
setXMLLang(<String> xmllang)
Sets 'xml:lang' for this packet |
<static> JSJaCPacket
|
wrapNode(<Node> node)
Tries to transform a w3c DOM node to JSJaC's internal representation (JSJaCPacket type, one of JSJaCPresence, JSJaCMessage, JSJaCIQ) |
Field Detail |
String xml
Constructor Detail |
JSJaCPacket(<String> name)
name
- The root tag name of the packet (i.e. one of 'message', 'iq' or 'presence')
Method Detail |
JSJaCPacket appendNode(<String> element)
element
- A name plus an object hash with attributes (optional) plus an array of childnodes (optional)
link
- http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-1950641247 Node} element The node to append or
Node buildNode(elementName)
JSJaCPacket clone()
JSJaCPacket errorReply(<STANZA_ERROR> stanza_error)
stanza_error
- an error stanza containing error cody, type and condition of the error to be indicated
Node getChild(<String> name, <String> ns)
name
- Tagname of child to retrieve. Use '*' to match any tag. [optional]
ns
- Namespace of child. Use '*' to match any ns.[optional]
String getChildVal(<String> name, <String> ns)
name
- Tagname of child to retrieve.
ns
- Namespace of child
Document getDoc()
String getFrom()
JSJaCJID getFromJID()
String getID()
Node getNode()
String getTo()
JSJaCJID getToJID()
String getType()
String getXMLLang()
String getXMLNS()
boolean isError()
String pType()
JSJaCPacket setFrom(from)
JSJaCPacket setID(<String> id)
id
- The id of the packet.
JSJaCPacket setTo(<String> to)
to
-
JSJaCPacket setType(<String> type)
type
- The type of the packet.
JSJaCPacket setXMLLang(<String> xmllang)
xmllang
- The xml:lang of the packet.
<static> JSJaCPacket wrapNode(<Node> node)
node
- The node to be transformed
null
is being returned.
|
JSJaC | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |