Package org.jivesoftware.smackx.pubsub
Class NodeExtension
- java.lang.Object
-
- org.jivesoftware.smackx.pubsub.NodeExtension
-
- All Implemented Interfaces:
Element
,ExtensionElement
,FullyQualifiedElement
,NamedElement
,XmlLangElement
- Direct Known Subclasses:
AffiliationsExtension
,ConfigurationEvent
,FormNode
,GetItemsRequest
,Item
,ItemsExtension
,OptionsExtension
,PublishItem
,SubscribeExtension
,Subscription
,SubscriptionsExtension
,UnsubscribeExtension
public class NodeExtension extends java.lang.Object implements ExtensionElement
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.
-
-
Constructor Summary
Constructors Constructor Description NodeExtension(PubSubElementType elem)
Constructs aNodeExtension
with an element name specified byPubSubElementType
.NodeExtension(PubSubElementType elem, java.lang.String nodeId)
Constructs aNodeExtension
with an element name specified byPubSubElementType
and the specified node id.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addXml(XmlStringBuilder xml)
java.lang.String
getElementName()
Returns the root element name.java.lang.String
getNamespace()
Returns the root element XML namespace.java.lang.String
getNode()
Gets the node id.PubSubNamespace
getPubSubNamespace()
java.lang.String
toString()
XmlStringBuilder
toXML(XmlEnvironment enclosingNamespace)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.jivesoftware.smack.packet.FullyQualifiedElement
getLanguage, getQName
-
-
-
-
Constructor Detail
-
NodeExtension
public NodeExtension(PubSubElementType elem, java.lang.String nodeId)
Constructs aNodeExtension
with an element name specified byPubSubElementType
and the specified node id.- Parameters:
elem
- Defines the element name and namespacenodeId
- Specifies the id of the node
-
NodeExtension
public NodeExtension(PubSubElementType elem)
Constructs aNodeExtension
with 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()
Description copied from interface:NamedElement
Returns the root element name.- Specified by:
getElementName
in interfaceNamedElement
- Returns:
- the element name.
-
getPubSubNamespace
public PubSubNamespace getPubSubNamespace()
-
getNamespace
public final java.lang.String getNamespace()
Description copied from interface:FullyQualifiedElement
Returns the root element XML namespace.- Specified by:
getNamespace
in interfaceFullyQualifiedElement
- Returns:
- the namespace.
-
toXML
public final XmlStringBuilder toXML(XmlEnvironment enclosingNamespace)
-
addXml
protected void addXml(XmlStringBuilder xml)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-