Class GeoLocation

java.lang.Object
org.jivesoftware.smackx.geoloc.packet.GeoLocation
All Implemented Interfaces:
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 Object implements 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:
  • Field Details

  • Method Details

    • getAccuracy

      public Double getAccuracy()
    • getAlt

      public Double getAlt()
    • getAltAccuracy

      public Double getAltAccuracy()
    • getArea

      public String getArea()
    • getBearing

      public Double getBearing()
    • getBuilding

      public String getBuilding()
    • getCountry

      public String getCountry()
    • getCountryCode

      public String getCountryCode()
    • getDatum

      public String getDatum()
    • getDescription

      public String getDescription()
    • getError

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

      public String getFloor()
    • getLat

      public Double getLat()
    • getLocality

      public String getLocality()
    • getLon

      public Double getLon()
    • getPostalcode

      public String getPostalcode()
    • getRegion

      public String getRegion()
    • getRoom

      public String getRoom()
    • getSpeed

      public Double getSpeed()
    • getStreet

      public String getStreet()
    • getText

      public String getText()
    • getTimestamp

      public Date getTimestamp()
    • getTzo

      public String getTzo()
    • getUri

      public URI getUri()
    • getQName

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

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

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

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

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

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • builder

      public static GeoLocation.Builder builder()
      Returns a new instance of GeoLocation.Builder.
      Returns:
      Builder
    • isExclusiveElement

      public boolean isExclusiveElement()
      Specified by:
      isExclusiveElement in interface FormFieldChildElement
    • 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