Class GeoLocation

  • All Implemented Interfaces:
    java.io.Serializable, org.jivesoftware.smack.packet.Element, org.jivesoftware.smack.packet.ExtensionElement, org.jivesoftware.smack.packet.NamedElement, org.jivesoftware.smack.packet.XmlElement, org.jivesoftware.smack.packet.XmlLangElement, FormFieldChildElement

    public final class GeoLocation
    extends java.lang.Object
    implements java.io.Serializable, org.jivesoftware.smack.packet.ExtensionElement, FormFieldChildElement
    A GeoLocation Extension packet, which is used by the XMPP clients to exchange their respective geographic locations.
    See Also:
    XEP-0080, Serialized Form
    • Field Detail

      • QNAME

        public static final javax.xml.namespace.QName QNAME
      • EMPTY_GEO_LOCATION

        public static final GeoLocation EMPTY_GEO_LOCATION
    • Method Detail

      • getAccuracy

        public java.lang.Double getAccuracy()
      • getAlt

        public java.lang.Double getAlt()
      • getAltAccuracy

        public java.lang.Double getAltAccuracy()
      • getArea

        public java.lang.String getArea()
      • getBearing

        public java.lang.Double getBearing()
      • getBuilding

        public java.lang.String getBuilding()
      • getCountry

        public java.lang.String getCountry()
      • getCountryCode

        public java.lang.String getCountryCode()
      • getDatum

        public java.lang.String getDatum()
      • getDescription

        public java.lang.String getDescription()
      • getError

        @Deprecated
        public java.lang.Double getError()
        Deprecated.
        use getAccuracy() instead.
        Get the error.
        Returns:
        the error.
      • getFloor

        public java.lang.String getFloor()
      • getLat

        public java.lang.Double getLat()
      • getLocality

        public java.lang.String getLocality()
      • getLon

        public java.lang.Double getLon()
      • getPostalcode

        public java.lang.String getPostalcode()
      • getRegion

        public java.lang.String getRegion()
      • getRoom

        public java.lang.String getRoom()
      • getSpeed

        public java.lang.Double getSpeed()
      • getStreet

        public java.lang.String getStreet()
      • getText

        public java.lang.String getText()
      • getTimestamp

        public java.util.Date getTimestamp()
      • getTzo

        public java.lang.String getTzo()
      • getUri

        public java.net.URI getUri()
      • getQName

        public javax.xml.namespace.QName getQName()
        Specified by:
        getQName in interface org.jivesoftware.smack.packet.XmlElement
      • getElementName

        public java.lang.String getElementName()
        Specified by:
        getElementName in interface org.jivesoftware.smack.packet.NamedElement
      • toXML

        public java.lang.CharSequence toXML​(org.jivesoftware.smack.packet.XmlEnvironment enclosingNamespace)
        Specified by:
        toXML in interface org.jivesoftware.smack.packet.Element
      • getNamespace

        public java.lang.String getNamespace()
        Specified by:
        getNamespace in interface org.jivesoftware.smack.packet.XmlElement
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • from

        public static GeoLocation from​(org.jivesoftware.smack.packet.Message message)
        Returns the first GeoLocation, or null if it doesn't exist in Message.
        Parameters:
        message - The Message stanza containing GeoLocation
        Returns:
        GeoLocation
      • from

        public static GeoLocation from​(FormField formField)
        Returns the first GeoLocation, or null if it doesn't exist in FormField.
        Parameters:
        formField - the Formfield containing GeoLocation
        Returns:
        GeoLocation