Class GeoLocation
- java.lang.Object
-
- org.jivesoftware.smackx.geoloc.packet.GeoLocation
-
- All Implemented Interfaces:
Serializable
,Element
,ExtensionElement
,FullyQualifiedElement
,NamedElement
,XmlLangElement
,FormFieldChildElement
public final class GeoLocation extends Object implements Serializable, 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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
GeoLocation.Builder
This class defines a builder class forGeoLocation
.
-
Field Summary
Fields Modifier and Type Field Description static String
ELEMENT
static GeoLocation
EMPTY_GEO_LOCATION
static String
NAMESPACE
static QName
QNAME
-
Method Summary
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jivesoftware.smackx.xdata.FormFieldChildElement
checkConsistency, mustBeOnlyOfHisKind, requiresNoTypeSet, validate
-
Methods inherited from interface org.jivesoftware.smack.packet.FullyQualifiedElement
getLanguage
-
-
-
-
Field Detail
-
NAMESPACE
public static final String NAMESPACE
- See Also:
- Constant Field Values
-
ELEMENT
public static final String ELEMENT
- See Also:
- Constant Field Values
-
EMPTY_GEO_LOCATION
public static final GeoLocation EMPTY_GEO_LOCATION
-
-
Method Detail
-
getAccuracy
public Double getAccuracy()
-
getAltAccuracy
public Double getAltAccuracy()
-
getBearing
public Double getBearing()
-
getBuilding
public String getBuilding()
-
getCountry
public String getCountry()
-
getCountryCode
public String getCountryCode()
-
getDescription
public String getDescription()
-
getError
@Deprecated public Double getError()
Deprecated.usegetAccuracy()
instead.Get the error.- Returns:
- the error.
-
getLocality
public String getLocality()
-
getPostalcode
public String getPostalcode()
-
getTimestamp
public Date getTimestamp()
-
getQName
public QName getQName()
- Specified by:
getQName
in interfaceFullyQualifiedElement
-
getElementName
public String getElementName()
Description copied from interface:NamedElement
Returns the root element name.- Specified by:
getElementName
in interfaceNamedElement
- Returns:
- the element name.
-
toXML
public CharSequence toXML(XmlEnvironment enclosingNamespace)
-
getNamespace
public String getNamespace()
Description copied from interface:FullyQualifiedElement
Returns the root element XML namespace.- Specified by:
getNamespace
in interfaceFullyQualifiedElement
- Returns:
- the namespace.
-
builder
public static GeoLocation.Builder builder()
Returns a new instance ofGeoLocation.Builder
.- Returns:
- Builder
-
isExclusiveElement
public boolean isExclusiveElement()
- Specified by:
isExclusiveElement
in interfaceFormFieldChildElement
-
from
public static GeoLocation from(Message message)
- Parameters:
message
- The Message stanza containing GeoLocation- Returns:
- GeoLocation
-
from
public static GeoLocation from(FormField formField)
- Parameters:
formField
- the Formfield containing GeoLocation- Returns:
- GeoLocation
-
-