public final class GeoLocation extends Object
<geoloc/> element in the http://jabber.org/protocol/geoloc namespace.
This class represents the geological location of a user.
Location information about human users SHOULD be communicated and transported by means of Publish-Subscribe (XEP-0060) [5] or the subset thereof specified in Personal Eventing Protocol (XEP-0163) [6].
Although the XMPP publish-subscribe extension is the preferred means for transporting location information about human users, applications that do not involve human users (e.g., device tracking) MAY use other transport methods; however, because location information is not pure presence information and can change independently of network availability, it SHOULD NOT be provided as an extension to
<presence/>.
GeoLocation geoLocation = GeoLocation.builder()
.countryCode("de")
.latitude(50.2)
.longitude(7.5)
.timeZoneOffset(ZoneOffset.of("+01:00"))
.build();
| Modifier and Type | Class and Description |
|---|---|
static class |
GeoLocation.Builder
A builder class to which builds geo location objects.
|
| Modifier and Type | Field and Description |
|---|---|
static String |
NAMESPACE
http://jabber.org/protocol/geoloc
|
| Modifier and Type | Method and Description |
|---|---|
static GeoLocation.Builder |
builder()
Creates the builder to build a geo location.
|
Double |
getAccuracy()
Gets the horizontal GPS error in meters.
|
Double |
getAltitude()
Gets the altitude in meters above or below sea level.
|
Double |
getAltitudeAccuracy()
Gets the vertical GPS error in meters.
|
String |
getArea()
Gets a named area such as a campus or neighborhood.
|
Double |
getBearing()
Gets the GPS bearing (direction in which the entity is heading to reach its next waypoint), measured in decimal degrees relative to true north.
|
String |
getBuilding()
Gets a specific building on a street or in an area.
|
String |
getCountry()
Gets the nation where the user is located.
|
String |
getCountryCode()
Gets the ISO 3166 two-letter country code.
|
String |
getDatum()
Gets the GPS datum.
|
String |
getDescription()
Gets a natural-language name for or description of the location.
|
String |
getFloor()
Gets a particular floor in a building.
|
Locale |
getLanguage()
Gets the the natural language of location data.
|
Double |
getLatitude()
Gets the latitude in decimal degrees North.
|
String |
getLocality()
Gets a locality within the administrative region, such as a town or city.
|
Double |
getLongitude()
Gets the longitude in decimal degrees East.
|
String |
getPostalCode()
Gets a code used for postal delivery.
|
String |
getRegion()
Gets an administrative region of the nation, such as a state or province.
|
String |
getRoom()
Gets a particular room in a building.
|
Double |
getSpeed()
Gets the speed at which the entity is moving, in meters per second.
|
String |
getStreet()
Gets a thoroughfare within the locality, or a crossing of two thoroughfares.
|
String |
getText()
Gets a catch-all element that captures any other information about the location.
|
Instant |
getTimestamp()
Gets the UTC timestamp specifying the moment when the reading was taken.
|
ZoneOffset |
getTimeZoneOffset()
Gets the time zone offset from UTC for the current location.
|
URI |
getUri()
Gets a URI or URL pointing to information about the location.
|
String |
toString() |
public static final String NAMESPACE
public static GeoLocation.Builder builder()
public final Double getAccuracy()
public final Double getAltitude()
public final Double getAltitudeAccuracy()
public final String getArea()
public final Double getBearing()
public final String getBuilding()
public final String getCountry()
public final String getCountryCode()
public final String getDatum()
public final String getDescription()
public final String getFloor()
public final Double getLatitude()
public final String getLocality()
public final Double getLongitude()
public final String getPostalCode()
public final String getRegion()
public final String getRoom()
public final Double getSpeed()
public final String getStreet()
public final String getText()
public final Instant getTimestamp()
public final URI getUri()
public final Locale getLanguage()
public final ZoneOffset getTimeZoneOffset()
Copyright © 2014–2016 XMPP.rocks. All rights reserved.