JSJaC

Class JSJaCPacket

Object
   |
   +--JSJaCPacket
Direct Known Subclasses:
JSJaCIQ, JSJaCMessage, JSJaCPresence

class 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

xml

String xml

Constructor Detail

JSJaCPacket

JSJaCPacket(<String> name)

Method Detail

appendNode

JSJaCPacket appendNode(<String> element)

buildNode

Node buildNode(elementName)

clone

JSJaCPacket clone()

errorReply

JSJaCPacket errorReply(<STANZA_ERROR> stanza_error)

getChild

Node getChild(<String> name, <String> ns)

getChildVal

String getChildVal(<String> name, <String> ns)

getDoc

Document getDoc()

getFrom

String getFrom()

getFromJID

JSJaCJID getFromJID()

getID

String getID()

getNode

Node getNode()

getTo

String getTo()

getToJID

JSJaCJID getToJID()

getType

String getType()

getXMLLang

String getXMLLang()

getXMLNS

String getXMLNS()

isError

boolean isError()

pType

String pType()

setFrom

JSJaCPacket setFrom(from)

setID

JSJaCPacket setID(<String> id)

setTo

JSJaCPacket setTo(<String> to)

setType

JSJaCPacket setType(<String> type)

setXMLLang

JSJaCPacket setXMLLang(<String> xmllang)

wrapNode

<static> JSJaCPacket wrapNode(<Node> node)

JSJaC

Documentation generated by JSDoc on Thu May 26 01:28:50 2016