public class OriginIdElement extends StableAndUniqueIdElement
Modifier and Type | Field and Description |
---|---|
static String |
ELEMENT |
ATTR_ID
Constructor and Description |
---|
OriginIdElement() |
OriginIdElement(String id) |
Modifier and Type | Method and Description |
---|---|
static OriginIdElement |
addOriginId(Message message)
Add an origin-id element to a message and set the stanzas id to the same id as in the origin-id element.
|
String |
getElementName()
Returns the root element name.
|
String |
getNamespace()
Returns the root element XML namespace.
|
static OriginIdElement |
getOriginId(Message message)
Return the origin-id element of a message or null, if absent.
|
static boolean |
hasOriginId(Message message)
Return true, if the message contains a origin-id element.
|
CharSequence |
toXML(String enclosingNamespace)
Returns the XML representation of this Element.
|
getId
public static final String ELEMENT
public OriginIdElement()
public OriginIdElement(String id)
public static OriginIdElement addOriginId(Message message)
message
- message.public static boolean hasOriginId(Message message)
message
- messagepublic static OriginIdElement getOriginId(Message message)
message
- messagepublic String getNamespace()
ExtensionElement
public String getElementName()
NamedElement
public CharSequence toXML(String enclosingNamespace)
Element
enclosingNamespace
- the enclosing namespace or null
.