org.opengts.db
Class GeoEvent

java.lang.Object
  extended by org.opengts.db.GeoEvent
All Implemented Interfaces:
java.lang.Cloneable, GeoPointProvider

public class GeoEvent
extends java.lang.Object
implements java.lang.Cloneable, GeoPointProvider

A container for a single generic GPS event


Nested Class Summary
static interface GeoEvent.GeoEventHandler
          Interface for GeoEvent handler call-backs
 
Field Summary
static java.lang.String KEY_account
           
static java.lang.String KEY_accountID
           
static java.lang.String KEY_altitude
           
static java.lang.String KEY_device
           
static java.lang.String KEY_deviceID
           
static java.lang.String KEY_geoPoint
           
static java.lang.String KEY_geozone
           
static java.lang.String KEY_geozoneID
           
static java.lang.String KEY_heading
           
static java.lang.String KEY_latitude
           
static java.lang.String KEY_longitude
           
static java.lang.String KEY_mobileID
           
static java.lang.String KEY_odometerKM
           
static java.lang.String KEY_speedKPH
           
static java.lang.String KEY_statusCode
           
static java.lang.String KEY_timestamp
           
 
Constructor Summary
GeoEvent()
          Constructor
GeoEvent(GeoEvent other)
          Copy Constructor
 
Method Summary
 java.lang.Object clone()
          Retruns a clone of this GeoEvent instance
 Account getAccount()
          Gets the Account
 java.lang.String getAccountID()
          Gets the AccountID
 double getAltitudeMeters()
          Gets the Altitude
 Device getDevice()
          Gets the Device
 java.lang.String getDeviceID()
          Gets the DeviceID
 java.util.Set<java.lang.String> getFieldKeys()
          Gets the field keys
 double getFieldValue(java.lang.String key, double dft)
          Gets a Double field value
 int getFieldValue(java.lang.String key, int dft)
          Gets a Integer field value
 long getFieldValue(java.lang.String key, long dft)
          Gets a Long field value
 java.lang.Object getFieldValue(java.lang.String key, java.lang.Object dft)
          Gets a Object field value
 java.util.Map<java.lang.String,java.lang.Object> getFieldValues()
          Gets the field values
 GeoPoint getGeoPoint()
          Gets the GeoPoint
 Geozone getGeozone()
          Gets the Geozone
 java.lang.String getGeozoneID()
          Gets the GeozoneID
 double getHeading()
          Gets the Heading
 double getLatitude()
          Gets the latitude
 double getLongitude()
          Gets the longitude
 java.lang.String getMobileID()
          Gets the MobileID
 double getOdometerKM()
          Gets the Odometer
 double getSpeedKPH()
          Gets the Speed
 int getStatusCode()
          Gets the StatusCode
 long getTimestamp()
          Gets the timestamp
 boolean hasAccount()
          Returns true if an Account has been defined
 boolean hasAccountID()
          Returns true if an AccountID has been defined
 boolean hasAltitudeMeters()
          Returns true if a speed has been defined
 boolean hasDevice()
          Returns true if a Device has been defined
 boolean hasDeviceID()
          Returns true if a DeviceID has been defined
 boolean hasFieldValue(java.lang.String key)
          Returns true if the field value has been defined
 boolean hasGeoPoint()
          Returns true if a latitude/longitude has been defined
 boolean hasGeozone()
          Returns true if a Geozone has been defined
 boolean hasGeozoneID()
          Returns true if a GeozoneID has been defined
 boolean hasHeading()
          Returns true if a speed has been defined
 boolean hasLatitude()
          Returns true if a latitude has been defined
 boolean hasLongitude()
          Returns true if a longitude has been defined
 boolean hasMobileID()
          Returns true if an MobileID has been defined
 boolean hasOdometerKM()
          Returns true if an Odometer has been defined
 boolean hasSpeedKPH()
          Returns true if a speed has been defined
 boolean hasStatusCode()
          Returns true if a StatusCode has been defined
 boolean hasTimestamp()
          Returns true if a timestamp has been defined
 boolean isGeoPointValid()
          Returns true if the current GeoPoint is valie
 void setAccount(Account account)
          Sets the Account
 void setAccountID(java.lang.String accountID)
          Sets the AccountID
 void setAltitudeMeters(double altM)
          Sets the Altitude
 void setDevice(Device device)
          Sets the Device
 void setDeviceID(java.lang.String deviceID)
          Sets the DeviceID
 void setFieldValue(java.lang.String key, double val)
          Sets a Double field value
 void setFieldValue(java.lang.String key, int val)
          Sets a Integer field value
 void setFieldValue(java.lang.String key, long val)
          Sets a Long field value
 void setFieldValue(java.lang.String key, java.lang.Object val)
          Sets a field value
 void setGeoPoint(double lat, double lon)
          Sets the GeoPoint
 void setGeoPoint(GeoPoint gp)
          Sets the GeoPoint
 void setGeozone(Geozone geozone)
          Sets the Geozone
 void setGeozoneID(java.lang.String geozoneID)
          Sets the GeozoneID
 void setHeading(double deg)
          Sets the Heading
 void setLatitude(double lat)
          Sets the latitude
 void setLongitude(double lon)
          Sets the longitude
 void setMobileID(java.lang.String mobileID)
          Sets the MobileID
 void setOdometerKM(double km)
          Sets the Odometer
 void setSpeedKPH(double kph)
          Sets the Speed
 void setStatusCode(int sc)
          Sets the StatusCode
 void setTimestamp(long ts)
          Sets the timestamp
 java.lang.String toString()
          Gets a String representation of this instance
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

KEY_mobileID

public static final java.lang.String KEY_mobileID
See Also:
Constant Field Values

KEY_accountID

public static final java.lang.String KEY_accountID
See Also:
Constant Field Values

KEY_account

public static final java.lang.String KEY_account
See Also:
Constant Field Values

KEY_deviceID

public static final java.lang.String KEY_deviceID
See Also:
Constant Field Values

KEY_device

public static final java.lang.String KEY_device
See Also:
Constant Field Values

KEY_geozoneID

public static final java.lang.String KEY_geozoneID
See Also:
Constant Field Values

KEY_geozone

public static final java.lang.String KEY_geozone
See Also:
Constant Field Values

KEY_timestamp

public static final java.lang.String KEY_timestamp
See Also:
Constant Field Values

KEY_statusCode

public static final java.lang.String KEY_statusCode
See Also:
Constant Field Values

KEY_latitude

public static final java.lang.String KEY_latitude
See Also:
Constant Field Values

KEY_longitude

public static final java.lang.String KEY_longitude
See Also:
Constant Field Values

KEY_geoPoint

public static final java.lang.String KEY_geoPoint
See Also:
Constant Field Values

KEY_speedKPH

public static final java.lang.String KEY_speedKPH
See Also:
Constant Field Values

KEY_heading

public static final java.lang.String KEY_heading
See Also:
Constant Field Values

KEY_altitude

public static final java.lang.String KEY_altitude
See Also:
Constant Field Values

KEY_odometerKM

public static final java.lang.String KEY_odometerKM
See Also:
Constant Field Values
Constructor Detail

GeoEvent

public GeoEvent()
Constructor


GeoEvent

public GeoEvent(GeoEvent other)
Copy Constructor

Method Detail

clone

public java.lang.Object clone()
Retruns a clone of this GeoEvent instance

Overrides:
clone in class java.lang.Object
Returns:
A clone of this GeoEvent

toString

public java.lang.String toString()
Gets a String representation of this instance

Overrides:
toString in class java.lang.Object

getFieldKeys

public java.util.Set<java.lang.String> getFieldKeys()
Gets the field keys


getFieldValues

public java.util.Map<java.lang.String,java.lang.Object> getFieldValues()
Gets the field values


setFieldValue

public void setFieldValue(java.lang.String key,
                          java.lang.Object val)
Sets a field value


getFieldValue

public java.lang.Object getFieldValue(java.lang.String key,
                                      java.lang.Object dft)
Gets a Object field value


hasFieldValue

public boolean hasFieldValue(java.lang.String key)
Returns true if the field value has been defined


setFieldValue

public void setFieldValue(java.lang.String key,
                          int val)
Sets a Integer field value


getFieldValue

public int getFieldValue(java.lang.String key,
                         int dft)
Gets a Integer field value


setFieldValue

public void setFieldValue(java.lang.String key,
                          long val)
Sets a Long field value


getFieldValue

public long getFieldValue(java.lang.String key,
                          long dft)
Gets a Long field value


setFieldValue

public void setFieldValue(java.lang.String key,
                          double val)
Sets a Double field value


getFieldValue

public double getFieldValue(java.lang.String key,
                            double dft)
Gets a Double field value


setMobileID

public void setMobileID(java.lang.String mobileID)
Sets the MobileID


getMobileID

public java.lang.String getMobileID()
Gets the MobileID


hasMobileID

public boolean hasMobileID()
Returns true if an MobileID has been defined


setAccountID

public void setAccountID(java.lang.String accountID)
Sets the AccountID


getAccountID

public java.lang.String getAccountID()
Gets the AccountID


hasAccountID

public boolean hasAccountID()
Returns true if an AccountID has been defined


setAccount

public void setAccount(Account account)
Sets the Account


getAccount

public Account getAccount()
Gets the Account


hasAccount

public boolean hasAccount()
Returns true if an Account has been defined


setDeviceID

public void setDeviceID(java.lang.String deviceID)
Sets the DeviceID


getDeviceID

public java.lang.String getDeviceID()
Gets the DeviceID


hasDeviceID

public boolean hasDeviceID()
Returns true if a DeviceID has been defined


setDevice

public void setDevice(Device device)
Sets the Device


getDevice

public Device getDevice()
Gets the Device


hasDevice

public boolean hasDevice()
Returns true if a Device has been defined


setGeozoneID

public void setGeozoneID(java.lang.String geozoneID)
Sets the GeozoneID


getGeozoneID

public java.lang.String getGeozoneID()
Gets the GeozoneID


hasGeozoneID

public boolean hasGeozoneID()
Returns true if a GeozoneID has been defined


setGeozone

public void setGeozone(Geozone geozone)
Sets the Geozone


getGeozone

public Geozone getGeozone()
Gets the Geozone


hasGeozone

public boolean hasGeozone()
Returns true if a Geozone has been defined


setTimestamp

public void setTimestamp(long ts)
Sets the timestamp


getTimestamp

public long getTimestamp()
Gets the timestamp


hasTimestamp

public boolean hasTimestamp()
Returns true if a timestamp has been defined


setStatusCode

public void setStatusCode(int sc)
Sets the StatusCode


getStatusCode

public int getStatusCode()
Gets the StatusCode


hasStatusCode

public boolean hasStatusCode()
Returns true if a StatusCode has been defined


setGeoPoint

public void setGeoPoint(double lat,
                        double lon)
Sets the GeoPoint


setGeoPoint

public void setGeoPoint(GeoPoint gp)
Sets the GeoPoint


isGeoPointValid

public boolean isGeoPointValid()
Returns true if the current GeoPoint is valie


setLatitude

public void setLatitude(double lat)
Sets the latitude


getLatitude

public double getLatitude()
Gets the latitude


hasLatitude

public boolean hasLatitude()
Returns true if a latitude has been defined


setLongitude

public void setLongitude(double lon)
Sets the longitude


getLongitude

public double getLongitude()
Gets the longitude


hasLongitude

public boolean hasLongitude()
Returns true if a longitude has been defined


getGeoPoint

public GeoPoint getGeoPoint()
Gets the GeoPoint

Specified by:
getGeoPoint in interface GeoPointProvider
Returns:
A GeoPoint instance

hasGeoPoint

public boolean hasGeoPoint()
Returns true if a latitude/longitude has been defined


setSpeedKPH

public void setSpeedKPH(double kph)
Sets the Speed


getSpeedKPH

public double getSpeedKPH()
Gets the Speed


hasSpeedKPH

public boolean hasSpeedKPH()
Returns true if a speed has been defined


setHeading

public void setHeading(double deg)
Sets the Heading


getHeading

public double getHeading()
Gets the Heading


hasHeading

public boolean hasHeading()
Returns true if a speed has been defined


setAltitudeMeters

public void setAltitudeMeters(double altM)
Sets the Altitude


getAltitudeMeters

public double getAltitudeMeters()
Gets the Altitude


hasAltitudeMeters

public boolean hasAltitudeMeters()
Returns true if a speed has been defined


setOdometerKM

public void setOdometerKM(double km)
Sets the Odometer


getOdometerKM

public double getOdometerKM()
Gets the Odometer


hasOdometerKM

public boolean hasOdometerKM()
Returns true if an Odometer has been defined