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/>.
| Constructor and Description |
|---|
GeoLocation() |
GeoLocation(double latitude,
double longitude) |
| Modifier and Type | Method and Description |
|---|---|
Double |
getAccuracy()
Gets the horizontal GPS error in meters.
|
Double |
getAltitude()
Gets the altitude in meters above or below sea level.
|
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.
|
String |
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.
|
Date |
getTimestamp()
Gets the UTC timestamp specifying the moment when the reading was taken.
|
TimeZone |
getTimeZone()
Gets the time zone offset from UTC for the current location.
|
URI |
getUri()
Gets a URI or URL pointing to information about the location.
|
void |
setAccuracy(Double accuracy)
Sets the horizontal GPS error in meters.
|
void |
setAltitude(Double altitude)
Sets the altitude in meters above or below sea level.
|
void |
setArea(String area)
Sets a named area such as a campus or neighborhood.
|
void |
setBearing(Double bearing)
Sets the GPS bearing (direction in which the entity is heading to reach its next waypoint), measured in decimal degrees relative to true north.
|
void |
setBuilding(String building)
Sets a specific building on a street or in an area.
|
void |
setCountry(String country)
Sets the nation where the user is located.
|
void |
setCountryCode(String countryCode)
Sets the ISO 3166 two-letter country code.
|
void |
setDatum(String datum)
Sets the GPS datum.
|
void |
setDescription(String description)
Sets a natural-language name for or description of the location.
|
void |
setFloor(String floor)
Sets a particular floor in a building.
|
void |
setLanguage(String language)
Sets the natural language of location data.
|
void |
setLatitude(Double latitude)
Sets the latitude in decimal degrees North.
|
void |
setLocality(String locality)
Sets a locality within the administrative region, such as a town or city.
|
void |
setLongitude(Double longitude)
Sets the longitude in decimal degrees East.
|
void |
setPostalCode(String postalCode)
Sets a code used for postal delivery.
|
void |
setRegion(String region)
Sets an administrative region of the nation, such as a state or province.
|
void |
setRoom(String room)
Sets a particular room in a building.
|
void |
setSpeed(Double speed)
Sets the speed at which the entity is moving, in meters per second.
|
void |
setStreet(String street)
Sets a thoroughfare within the locality, or a crossing of two thoroughfares.
|
void |
setText(String text)
Sets a catch-all element that captures any other information about the location.
|
void |
setTimestamp(Date timestamp)
Sets the UTC timestamp specifying the moment when the reading was taken.
|
void |
setTimeZone(TimeZone timeZone)
Sets the time zone offset from UTC for the current location.
|
void |
setUri(URI uri)
Sets a URI or URL pointing to information about the location.
|
String |
toString() |
public static final String NAMESPACE
public GeoLocation()
public GeoLocation(double latitude,
double longitude)
public Double getAccuracy()
setAccuracy(Double)public void setAccuracy(Double accuracy)
accuracy - The accuracy.getAccuracy()public Double getAltitude()
setAltitude(Double)public void setAltitude(Double altitude)
altitude - The altitude.getAltitude()public String getArea()
setArea(String)public void setArea(String area)
area - The area.getArea()public Double getBearing()
setBearing(Double)public void setBearing(Double bearing)
bearing - The bearing.getBearing()public String getBuilding()
setBuilding(String)public void setBuilding(String building)
building - The building.getBuilding()public String getCountry()
setCountry(String)public void setCountry(String country)
country - The country.getCountry()public String getCountryCode()
setCountryCode(String)public void setCountryCode(String countryCode)
countryCode - The country code.getCountryCode()public String getDatum()
setDatum(String)public void setDatum(String datum)
datum - The GPS datum.getDatum()public String getDescription()
setDescription(String)public void setDescription(String description)
description - The description.getDescription()public String getFloor()
setFloor(String)public void setFloor(String floor)
floor - The floor.getFloor()public Double getLatitude()
setLatitude(Double)public void setLatitude(Double latitude)
latitude - The latitude.getLatitude()public String getLocality()
setLocality(String)public void setLocality(String locality)
locality - The locality.getLocality()public Double getLongitude()
setLongitude(Double)public void setLongitude(Double longitude)
longitude - The longitude.getLongitude()public String getPostalCode()
setPostalCode(String)public void setPostalCode(String postalCode)
postalCode - The postal code.getPostalCode()public String getRegion()
setRegion(String)public void setRegion(String region)
region - The region.getRegion()public String getRoom()
setRoom(String)public void setRoom(String room)
room - The room.getRoom()public Double getSpeed()
setSpeed(Double)public void setSpeed(Double speed)
speed - The speed.getSpeed()public String getStreet()
setStreet(String)public void setStreet(String street)
street - The street.setStreet(String)public String getText()
setText(String)public void setText(String text)
text - The text.getText()public Date getTimestamp()
setTimestamp(java.util.Date)public void setTimestamp(Date timestamp)
timestamp - The timestamp.getTimestamp()public URI getUri()
setUri(java.net.URI)public void setUri(URI uri)
uri - The URI.getUri()public String getLanguage()
setLanguage(String)public void setLanguage(String language)
language - The language.getLanguage()public TimeZone getTimeZone()
public void setTimeZone(TimeZone timeZone)
timeZone - The time zone.Copyright © 2014 XMPP.rocks. All rights reserved.