Class ReferenceElement
java.lang.Object
org.jivesoftware.smackx.reference.element.ReferenceElement
- All Implemented Interfaces:
Element
,ExtensionElement
,NamedElement
,XmlElement
,XmlLangElement
-
Nested Class Summary
-
Field Summary
-
Constructor Summary
ConstructorDescriptionReferenceElement
(Integer begin, Integer end, ReferenceElement.Type type, String anchor, URI uri) XEP-Compliant constructor.ReferenceElement
(Integer begin, Integer end, ReferenceElement.Type type, String anchor, URI uri, XmlElement child) XEP-incompliant (v0.2) constructor. -
Method Summary
Modifier and TypeMethodDescriptionstatic void
addMention
(Stanza stanza, int begin, int end, BareJid jid) Add a reference to another users bare jid to a stanza.static boolean
containsReferences
(Stanza stanza) Return true, if the stanza contains at least one reference extension.getBegin()
Returns the root element name.getEnd()
Returns the root element XML namespace.static List<ReferenceElement>
getReferencesFromStanza
(Stanza stanza) Return a list of all reference extensions contained in a stanza.getType()
getUri()
toXML
(XmlEnvironment enclosingNamespace) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.jivesoftware.smack.packet.XmlElement
getLanguage, getQName
-
Field Details
-
ELEMENT
- See Also:
-
NAMESPACE
- See Also:
-
QNAME
-
ATTR_BEGIN
- See Also:
-
ATTR_END
- See Also:
-
ATTR_TYPE
- See Also:
-
ATTR_ANCHOR
- See Also:
-
ATTR_URI
- See Also:
-
-
Constructor Details
-
ReferenceElement
public ReferenceElement(Integer begin, Integer end, ReferenceElement.Type type, String anchor, URI uri, XmlElement child) XEP-incompliant (v0.2) constructor. This is needed for SIMS.- Parameters:
begin
- TODO javadoc me pleaseend
- TODO javadoc me pleasetype
- TODO javadoc me pleaseanchor
- TODO javadoc me pleaseuri
- TODO javadoc me pleasechild
- TODO javadoc me please
-
ReferenceElement
public ReferenceElement(Integer begin, Integer end, ReferenceElement.Type type, String anchor, URI uri) XEP-Compliant constructor.- Parameters:
begin
- TODO javadoc me pleaseend
- TODO javadoc me pleasetype
- TODO javadoc me pleaseanchor
- TODO javadoc me pleaseuri
- TODO javadoc me please
-
-
Method Details
-
getBegin
-
getEnd
-
getType
-
getAnchor
-
getUri
-
addMention
Add a reference to another users bare jid to a stanza.- Parameters:
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.
-
getReferencesFromStanza
Return a list of all reference extensions contained in a stanza. If there are no reference elements, return an empty list.- Parameters:
stanza
- stanza- Returns:
- list of all references contained in the stanza
-
containsReferences
Return true, if the stanza contains at least one reference extension.- Parameters:
stanza
- stanza- Returns:
- true if stanza contains references
-
getNamespace
Description copied from interface:XmlElement
Returns the root element XML namespace.- Specified by:
getNamespace
in interfaceXmlElement
- Returns:
- the namespace.
-
getElementName
Description copied from interface:NamedElement
Returns the root element name.- Specified by:
getElementName
in interfaceNamedElement
- Returns:
- the element name.
-
toXML
-