public class Logger
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
THRESHOLD_ROUTES |
Constructor and Description |
---|
Logger(com.oym.indoor.DataHandler dh)
Logger constructor.
|
Modifier and Type | Method and Description |
---|---|
java.util.ArrayList<java.lang.String> |
getNavKeys()
This method retrieves all the navigation keys for the user.
|
Values.Settings.UserValue |
getNavProp(java.lang.String key)
This method retrieves a navigation key for the user.
|
java.util.ArrayList<java.lang.String> |
getStatsKeys()
This method retrieves all the stats keys for the user.
|
Values.Settings.UserValue |
getStatsProp(java.lang.String key)
This method retrieves a stats key for the user.
|
void |
logPosition(double x,
double y)
Deprecated.
Use
logPosition(LocationResult) instead. |
void |
logPosition(LocationResult loc)
This method logs the position to the server.
|
void |
logRoute(Route route)
This method logs a route to the server.
|
void |
logRoute(java.lang.String jsonRoute)
This method logs a json route to the server.
|
void |
putNavProp(java.util.HashMap<java.lang.String,Values.Settings.UserValue> values)
This method stores a bunch of stats key values pairs.
|
void |
putNavProp(java.lang.String key,
Values.Settings.UserValue userValue)
This method stores a value for a given key.
|
void |
putStatsProp(java.util.HashMap<java.lang.String,Values.Settings.UserValue> values)
This method stores a bunch of stats key values pairs.
|
void |
putStatsProp(java.lang.String key,
Values.Settings.UserValue userValue)
This method stores a value for a given key.
|
public static final int THRESHOLD_ROUTES
public Logger(com.oym.indoor.DataHandler dh)
dh
- Data handlerpublic void logPosition(LocationResult loc)
loc
- Location to be logged@Deprecated public void logPosition(double x, double y)
logPosition(LocationResult)
instead.x
- WGS84 Longitude to be loggedy
- WGS84 Latitude to be loggedpublic void logRoute(Route route)
route
- Route to be loggedpublic void logRoute(java.lang.String jsonRoute)
jsonRoute
- JSON route to be loggedpublic java.util.ArrayList<java.lang.String> getStatsKeys()
public Values.Settings.UserValue getStatsProp(java.lang.String key)
key
- Key to be retrievedpublic void putStatsProp(java.lang.String key, Values.Settings.UserValue userValue) throws java.lang.Exception
key
- Key to be storeduserValue
- Value to be storedjava.lang.Exception
- If the key does not exists or has the wrong formatpublic void putStatsProp(java.util.HashMap<java.lang.String,Values.Settings.UserValue> values) throws java.lang.Exception
values
- HashMap of key,values pairs to be storedjava.lang.Exception
- If the key does not exists or has the wrong formatpublic java.util.ArrayList<java.lang.String> getNavKeys()
public Values.Settings.UserValue getNavProp(java.lang.String key)
key
- Key to be retrievedpublic void putNavProp(java.lang.String key, Values.Settings.UserValue userValue) throws java.lang.Exception
key
- Key to be storeduserValue
- Value to be storedjava.lang.Exception
- If the key does not exists or has the wrong formatpublic void putNavProp(java.util.HashMap<java.lang.String,Values.Settings.UserValue> values) throws java.lang.Exception
values
- HashMap of key,values pairs to be storedjava.lang.Exception
- If the key does not exists or has the wrong format