Package org.jivesoftware.smackx.pubsub
Class NodeExtension
- java.lang.Object
-
- org.jivesoftware.smackx.pubsub.NodeExtension
-
- All Implemented Interfaces:
org.jivesoftware.smack.packet.Element,org.jivesoftware.smack.packet.ExtensionElement,org.jivesoftware.smack.packet.FullyQualifiedElement,org.jivesoftware.smack.packet.NamedElement,org.jivesoftware.smack.packet.XmlLangElement
- Direct Known Subclasses:
AffiliationsExtension,ConfigurationEvent,FormNode,GetItemsRequest,Item,ItemsExtension,OptionsExtension,PublishItem,SubscribeExtension,Subscription,SubscriptionsExtension,UnsubscribeExtension
public class NodeExtension extends java.lang.Object implements org.jivesoftware.smack.packet.ExtensionElementA 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.
-
-
Constructor Summary
Constructors Constructor Description NodeExtension(PubSubElementType elem)Constructs aNodeExtensionwith an element name specified byPubSubElementType.NodeExtension(PubSubElementType elem, java.lang.String nodeId)Constructs aNodeExtensionwith an element name specified byPubSubElementTypeand the specified node id.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddXml(org.jivesoftware.smack.util.XmlStringBuilder xml)java.lang.StringgetElementName()java.lang.StringgetNamespace()java.lang.StringgetNode()Gets the node id.PubSubNamespacegetPubSubNamespace()java.lang.StringtoString()org.jivesoftware.smack.util.XmlStringBuildertoXML(org.jivesoftware.smack.packet.XmlEnvironment enclosingNamespace)
-
-
-
Constructor Detail
-
NodeExtension
public NodeExtension(PubSubElementType elem, java.lang.String nodeId)
Constructs aNodeExtensionwith an element name specified byPubSubElementTypeand the specified node id.- Parameters:
elem- Defines the element name and namespacenodeId- Specifies the id of the node
-
NodeExtension
public NodeExtension(PubSubElementType elem)
Constructs aNodeExtensionwith an element name specified byPubSubElementType.- 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:
getElementNamein interfaceorg.jivesoftware.smack.packet.NamedElement
-
getPubSubNamespace
public PubSubNamespace getPubSubNamespace()
-
getNamespace
public final java.lang.String getNamespace()
- Specified by:
getNamespacein interfaceorg.jivesoftware.smack.packet.FullyQualifiedElement
-
toXML
public final org.jivesoftware.smack.util.XmlStringBuilder toXML(org.jivesoftware.smack.packet.XmlEnvironment enclosingNamespace)
- Specified by:
toXMLin interfaceorg.jivesoftware.smack.packet.Element
-
addXml
protected void addXml(org.jivesoftware.smack.util.XmlStringBuilder xml)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-