public class GeolocationPacketExtension
extends java.lang.Object
implements org.jivesoftware.smack.packet.PacketExtension
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ALT
The name of the geolocation map key corresponding to the altitude in
meters above or below sea level (e.g.
|
static java.lang.String |
AREA
The name of the geolocation map key that we use for storing named areas
such as a campus or neighborhood (e.g.
|
static java.lang.String |
BEARING
The name of the geolocation map key that we use for storing GPS bearing
(direction in which the entity is heading to reach its next waypoint),
measured in decimal degrees relative to true north.
|
static java.lang.String |
BUILDING
The name of the geolocation map key that we use for indicating a
specific building on a street or in an area (e.g.
|
static java.lang.String |
COUNTRY
The name of the geolocation map key that we use for indicating the
nation where the user is located (e.g.
|
static java.lang.String |
DATUM
GPS datum.
|
static java.lang.String |
DESCRIPTION
The name of the geolocation map key that we use for storing a
natural-language name for or description of a given location (e.g.
|
static java.lang.String |
ERROR
The name of the geolocation map key that we use for storing horizontal
GPS errors in arc minutes (e.g.
|
static java.lang.String |
FLOOR
The name of the geolocation map key that we use for storing a particular
floor in a building (e.g.
|
static java.lang.String |
LAT
The name of the geolocation map key that we use for storing geographic
latitude in decimal degrees North (e.g.
|
static java.lang.String |
LOCALITY
The name of the geolocation map key that we use for indicating a
locality within the administrative region, such as a town or city (e.g.
|
static java.lang.String |
LON
The name of the geolocation map key that we use for indicating
longitude in decimal degrees East (e.g.
|
static java.lang.String |
POSTALCODE
The name of the geolocation map key that we use for storing post codes
(or any code used for postal delivery) (e.g.
|
static java.lang.String |
REGION
The name of the geolocation map key that we use for indicating an
administrative region of the nation, such as a state or province (e.g.
|
static java.lang.String |
ROOM
The name of the geolocation map key that we use for indicating a
particular room in a building (e.g.
|
static java.lang.String |
STREET
The name of the geolocation map key that we use for storing a
thoroughfare within a locality, or a crossing of two thoroughfares (e.g.
|
static java.lang.String |
TEXT
The name of the geolocation map key that we use to indicate a catch-all
element that captures any other information about the location (e.g.
|
static java.lang.String |
TIMESTAMP
The name of the geolocation map key that we use to indicate UTC
timestamp specifying the moment when the reading was taken
(e.g.
|
Constructor and Description |
---|
GeolocationPacketExtension() |
Modifier and Type | Method and Description |
---|---|
boolean |
containsLatLon()
Test if latitude and longitude are set.
|
float |
getAlt()
Returns altitude in meters above or below sea level.
|
java.lang.String |
getArea()
A named area such as a campus or neighborhood.
|
float |
getBearing()
Returns GPS bearing (direction in which the entity is heading to reach
its next waypoint), measured in decimal degrees relative to true north.
|
java.lang.String |
getBuilding()
Returns the name of a specific building on a street or in an area.
|
java.lang.String |
getCountry()
Return the nation where the user is located.
|
java.lang.String |
getDatum()
Return the value of GPS Datum.
|
java.lang.String |
getDescription()
Returns a natural-language name for or description of a this location.
|
java.lang.String |
getElementName()
Returns the XML element name of the extension sub-packet root element.
|
float |
getError()
Returns horizontal GPS errors in arc minutes.
|
java.lang.String |
getFloor()
The number or name of a a particular floor in a building.
|
float |
getLat()
Returns geographic latitude in decimal degrees North.
|
java.lang.String |
getLocality()
Returns a locality within the administrative region, such as a town or
city.
|
float |
getLon()
Returns a float containing the longitude in decimal degrees East
(e.g.
|
java.lang.String |
getNamespace()
Returns the XML namespace of the extension sub-packet root element.
|
java.lang.String |
getPostalCode()
Returns a postal code (or any code used for postal delivery).
|
java.lang.String |
getRegion()
Returns an administrative region of the nation, such as a state or
province (e.g.
|
java.lang.String |
getRoom()
Returns a String indicating a particular room in a building.
|
java.lang.String |
getStreet()
Returns a String indicating a thoroughfare within a locality,
or a crossing of two thoroughfares.
|
java.lang.String |
getText()
Returns a String stored in the "Text" element of the geolocation
details.
|
java.lang.String |
getTimestamp()
Returns a String containing a UTC timestamp specifying the
moment when the reading was taken.
|
void |
setAlt(float alt)
Sets the altitude in meters above or below sea level.
|
void |
setAlt(java.lang.String alt)
Sets the altitude in meters above or below sea level.
|
void |
setArea(java.lang.String area)
Sets the value of a named area such as a campus or neighborhood.
|
void |
setBearing(float bearing)
Sets GPS bearing (direction in which the entity is heading to reach
its next waypoint), measured in decimal degrees relative to true north.
|
void |
setBearing(java.lang.String bearing)
Sets GPS bearing (direction in which the entity is heading to reach
its next waypoint), measured in decimal degrees relative to true north.
|
void |
setBuilding(java.lang.String building)
Sets the name of a specific building on a street or in an area.
|
void |
setCountry(java.lang.String country)
Sets the name of the nation where the user is located.
|
void |
setDatum(java.lang.String datum)
Sets the value of GPS Datum.
|
void |
setDescription(java.lang.String description)
Sets a natural-language name for or description of a this location.
|
void |
setError(float error)
Sets the value of horizontal GPS errors in arc minutes.
|
void |
setError(java.lang.String error)
Sets the value of horizontal GPS errors in arc minutes.
|
void |
setFloor(java.lang.String floor)
Sets the number or name of a a particular floor in a building.
|
void |
setLat(float lat)
Sets geographic latitude in decimal degrees North.
|
void |
setLat(java.lang.String lat)
Sets geographic latitude in decimal degrees North.
|
void |
setLocality(java.lang.String locality)
Sets a locality within the administrative region, such as a town or
city.
|
void |
setLon(float lon)
Sets the longitude in decimal degrees East.
|
void |
setLon(java.lang.String lon)
Sets the longitude in decimal degrees East.
|
void |
setPostalCode(java.lang.String postalCode)
Sets a postal code (or any code used for postal delivery).
|
void |
setRegion(java.lang.String region)
Sets an administrative region of the nation, such as a state or
province (e.g.
|
void |
setRoom(java.lang.String room)
Sets the name or number indicating a particular room in a building.
|
void |
setStreet(java.lang.String street)
Sets the name of a street.
|
void |
setText(java.lang.String text)
Sets a String to store in the "Text" element of the geolocation
details.
|
void |
setTimestamp(java.lang.String timestamp)
Set timestamp in UTC format as described in XEP-0082: XMPP Date and
Time Profiles
|
java.lang.String |
toXML()
Returns the XML representation of the PacketExtension.
|
public static final java.lang.String ALT
public static final java.lang.String AREA
public static final java.lang.String BEARING
public static final java.lang.String BUILDING
public static final java.lang.String COUNTRY
public static final java.lang.String DATUM
public static final java.lang.String DESCRIPTION
public static final java.lang.String ERROR
public static final java.lang.String FLOOR
public static final java.lang.String LAT
public static final java.lang.String LOCALITY
public static final java.lang.String LON
public static final java.lang.String POSTALCODE
public static final java.lang.String REGION
public static final java.lang.String ROOM
public static final java.lang.String STREET
public static final java.lang.String TEXT
public static final java.lang.String TIMESTAMP
public java.lang.String toXML()
toXML
in interface org.jivesoftware.smack.packet.PacketExtension
public java.lang.String getElementName()
getElementName
in interface org.jivesoftware.smack.packet.PacketExtension
public java.lang.String getNamespace()
getNamespace
in interface org.jivesoftware.smack.packet.PacketExtension
public float getAlt()
public void setAlt(float alt)
alt
- the altitude in meters above or belos sea level (e.g. 1609).public void setAlt(java.lang.String alt)
alt
- the altitude in meters above or belos sea level (e.g. 1609).public java.lang.String getArea()
public void setArea(java.lang.String area)
area
- the value of a named area such as a campus or neighborhood.public float getBearing()
public void setBearing(float bearing)
bearing
- a float value indicating GPS bearing (direction in which
the entity is heading to reach its next waypoint), measured in decimal
degrees relative to true north.public void setBearing(java.lang.String bearing)
bearing
- a String value indicating GPS bearing (direction in which
the entity is heading to reach its next waypoint), measured in decimal
degrees relative to true north.public java.lang.String getBuilding()
public void setBuilding(java.lang.String building)
building
- a String indicating the name of a specific building on
a street or in an area (e.g. The Empire State Building).public java.lang.String getCountry()
public void setCountry(java.lang.String country)
country
- a String containing the name of the nation where the user
is located (e.g. Greenland).public java.lang.String getDatum()
public void setDatum(java.lang.String datum)
datum
- the value of GPS Datum.public java.lang.String getDescription()
public void setDescription(java.lang.String description)
description
- a java.lang.String containing a
natural-language description of this location (e.g. Bill's house)public float getError()
public void setError(float error)
error
- a float indicating horizontal GPS errors in arc minutes
(e.g. 10).public void setError(java.lang.String error)
error
- a String indicating horizontal GPS errors in arc minutes
(e.g. 10).public java.lang.String getFloor()
public void setFloor(java.lang.String floor)
floor
- a String indicating the number or name of a
particular floor in a building (e.g. 102)public float getLat()
public void setLat(float lat)
lat
- a float value indicating geographic latitude in
decimal degrees (e.g. 39.75).public void setLat(java.lang.String lat)
lat
- a String value indicating geographic latitude in
decimal degrees (e.g. 39.75).public java.lang.String getLocality()
public void setLocality(java.lang.String locality)
locality
- a String indicating a locality within the
administrative region (e.g. Paris).public float getLon()
public void setLon(float lon)
lon
- a float containing the longitude in decimal degrees
East (e.g. -104.99).public void setLon(java.lang.String lon)
lon
- a String containing the longitude in decimal degrees
East (e.g. -104.99).public java.lang.String getPostalCode()
public void setPostalCode(java.lang.String postalCode)
postalCode
- a String containing the value of a postal or
zip code (e.g. 67000).public java.lang.String getRegion()
public void setRegion(java.lang.String region)
region
- a String indicating an administrative region of
the nation, such as a state or province (e.g. Ile de France).public java.lang.String getRoom()
public void setRoom(java.lang.String room)
room
- a String indicating the name ornumber a particular
room in a building (e.g. C-425).public java.lang.String getStreet()
public void setStreet(java.lang.String street)
street
- a String indicating a thoroughfare within a
locality, or a crossing of two thoroughfares (e.g. 34th and Broadway).public java.lang.String getText()
public void setText(java.lang.String text)
text
- a String stored in the "Text" element of the
geolocation details.public java.lang.String getTimestamp()
public void setTimestamp(java.lang.String timestamp)
timestamp
- the timestamp in UTC format (e.g. 2007-05-27T21:12Z).public boolean containsLatLon()
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.