public class ReferenceElement
extends java.lang.Object
implements org.jivesoftware.smack.packet.ExtensionElement
| Modifier and Type | Class and Description |
|---|---|
static class |
ReferenceElement.Type |
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ATTR_ANCHOR |
static java.lang.String |
ATTR_BEGIN |
static java.lang.String |
ATTR_END |
static java.lang.String |
ATTR_TYPE |
static java.lang.String |
ATTR_URI |
static java.lang.String |
ELEMENT |
| Constructor and Description |
|---|
ReferenceElement(java.lang.Integer begin,
java.lang.Integer end,
ReferenceElement.Type type,
java.lang.String anchor,
java.net.URI uri)
XEP-Compliant constructor.
|
ReferenceElement(java.lang.Integer begin,
java.lang.Integer end,
ReferenceElement.Type type,
java.lang.String anchor,
java.net.URI uri,
org.jivesoftware.smack.packet.ExtensionElement child)
XEP-incompliant (v0.2) constructor.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
addMention(org.jivesoftware.smack.packet.Stanza stanza,
int begin,
int end,
org.jxmpp.jid.BareJid jid)
Add a reference to another users bare jid to a stanza.
|
static boolean |
containsReferences(org.jivesoftware.smack.packet.Stanza stanza)
Return true, if the stanza contains at least one reference extension.
|
java.lang.String |
getAnchor() |
java.lang.Integer |
getBegin() |
java.lang.String |
getElementName() |
java.lang.Integer |
getEnd() |
java.lang.String |
getNamespace() |
static java.util.List<ReferenceElement> |
getReferencesFromStanza(org.jivesoftware.smack.packet.Stanza stanza)
Return a list of all reference extensions contained in a stanza.
|
ReferenceElement.Type |
getType() |
java.net.URI |
getUri() |
org.jivesoftware.smack.util.XmlStringBuilder |
toXML(java.lang.String enclosingNamespace) |
public static final java.lang.String ELEMENT
public static final java.lang.String ATTR_BEGIN
public static final java.lang.String ATTR_END
public static final java.lang.String ATTR_TYPE
public static final java.lang.String ATTR_ANCHOR
public static final java.lang.String ATTR_URI
public ReferenceElement(java.lang.Integer begin,
java.lang.Integer end,
ReferenceElement.Type type,
java.lang.String anchor,
java.net.URI uri,
org.jivesoftware.smack.packet.ExtensionElement child)
begin - end - type - anchor - uri - child - public ReferenceElement(java.lang.Integer begin,
java.lang.Integer end,
ReferenceElement.Type type,
java.lang.String anchor,
java.net.URI uri)
begin - end - type - anchor - uri - public java.lang.Integer getBegin()
public java.lang.Integer getEnd()
public ReferenceElement.Type getType()
public java.lang.String getAnchor()
public java.net.URI getUri()
public static void addMention(org.jivesoftware.smack.packet.Stanza stanza,
int begin,
int end,
org.jxmpp.jid.BareJid jid)
stanza - stanza.begin - start index of the mention in the messages body.end - end index of the mention in the messages body.jid - referenced jid.public static java.util.List<ReferenceElement> getReferencesFromStanza(org.jivesoftware.smack.packet.Stanza stanza)
stanza - stanzapublic static boolean containsReferences(org.jivesoftware.smack.packet.Stanza stanza)
stanza - stanzapublic java.lang.String getNamespace()
getNamespace in interface org.jivesoftware.smack.packet.ExtensionElementpublic java.lang.String getElementName()
getElementName in interface org.jivesoftware.smack.packet.NamedElementpublic org.jivesoftware.smack.util.XmlStringBuilder toXML(java.lang.String enclosingNamespace)
toXML in interface org.jivesoftware.smack.packet.Element