Class ExternalElement
- java.lang.Object
-
- org.jivesoftware.smackx.message_fastening.element.ExternalElement
-
- All Implemented Interfaces:
Element
,NamedElement
public class ExternalElement extends java.lang.Object implements NamedElement
Child element ofFasteningElement
. Reference to a top level element in the stanza that contains theFasteningElement
.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ATTR_ELEMENT_NAMESPACE
static java.lang.String
ATTR_NAME
static java.lang.String
ELEMENT
-
Constructor Summary
Constructors Constructor Description ExternalElement(java.lang.String name)
Create a newExternalElement
that references a top level element with the given name.ExternalElement(java.lang.String name, java.lang.String elementNamespace)
Create a newExternalElement
that references a top level element with the given name and namespace.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getElementName()
Returns the root element name.java.lang.String
getElementNamespace()
Namespace of the referenced top level element, eg.java.lang.String
getName()
Name of the referenced top level element, eg.XmlStringBuilder
toXML(XmlEnvironment xmlEnvironment)
-
-
-
Field Detail
-
ELEMENT
public static final java.lang.String ELEMENT
- See Also:
- Constant Field Values
-
ATTR_NAME
public static final java.lang.String ATTR_NAME
- See Also:
- Constant Field Values
-
ATTR_ELEMENT_NAMESPACE
public static final java.lang.String ATTR_ELEMENT_NAMESPACE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ExternalElement
public ExternalElement(java.lang.String name)
Create a newExternalElement
that references a top level element with the given name.- Parameters:
name
- name of the top level element
-
ExternalElement
public ExternalElement(java.lang.String name, java.lang.String elementNamespace)
Create a newExternalElement
that references a top level element with the given name and namespace.- Parameters:
name
- name of the top level elementelementNamespace
- namespace of the top level element
-
-
Method Detail
-
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.
-
toXML
public XmlStringBuilder toXML(XmlEnvironment xmlEnvironment)
-
getName
public java.lang.String getName()
Name of the referenced top level element, eg. 'body'.- Returns:
- element name
-
getElementNamespace
public java.lang.String getElementNamespace()
Namespace of the referenced top level element, eg. 'urn:example:lik'.- Returns:
- element namespace
-
-