org.jivesoftware.smackx.pubsub
Class NodeExtension

java.lang.Object
  extended by org.jivesoftware.smackx.pubsub.NodeExtension
All Implemented Interfaces:
org.jivesoftware.smack.packet.PacketExtension
Direct Known Subclasses:
AffiliationsExtension, ConfigurationEvent, FormNode, ItemsExtension, OptionsExtension, PublishItem, SubscribeExtension, Subscription, SubscriptionsExtension, UnsubscribeExtension

public class NodeExtension
extends java.lang.Object
implements org.jivesoftware.smack.packet.PacketExtension

A class which represents a common element within the pubsub defined schemas. One which has a node as an attribute. This class is used on its own as well as a base class for many others, since the node is a central concept to most pubsub functionality.

Author:
Robin Collier

Constructor Summary
NodeExtension(PubSubElementType elem)
          Constructs a NodeExtension with an element name specified by PubSubElementType.
NodeExtension(PubSubElementType elem, java.lang.String nodeId)
          Constructs a NodeExtension with an element name specified by PubSubElementType and the specified node id.
 
Method Summary
 java.lang.String getElementName()
           
 java.lang.String getNamespace()
           
 java.lang.String getNode()
          Gets the node id
 java.lang.String toString()
           
 java.lang.String toXML()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NodeExtension

public NodeExtension(PubSubElementType elem,
                     java.lang.String nodeId)
Constructs a NodeExtension with an element name specified by PubSubElementType and the specified node id.

Parameters:
elem - Defines the element name and namespace
nodeId - Specifies the id of the node

NodeExtension

public NodeExtension(PubSubElementType elem)
Constructs a NodeExtension with an element name specified by PubSubElementType.

Parameters:
elem - Defines the element name and namespace
Method Detail

getNode

public java.lang.String getNode()
Gets the node id

Returns:
The node id

getElementName

public java.lang.String getElementName()
Specified by:
getElementName in interface org.jivesoftware.smack.packet.PacketExtension

getNamespace

public java.lang.String getNamespace()
Specified by:
getNamespace in interface org.jivesoftware.smack.packet.PacketExtension

toXML

public java.lang.String toXML()
Specified by:
toXML in interface org.jivesoftware.smack.packet.PacketExtension

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object