Cortex Android
 All Classes Namespaces Functions Variables
nl.sense_os.cortex.coaching.User Class Reference

Public Member Functions

 User (JSONObject jsonObject)
 
int getUserID ()
 
String getEmail ()
 
JSONObject getUserInfo ()
 
JSONObject toJSONObject ()
 
String toString ()
 

Static Public Member Functions

static User getDummyUser ()
 

Protected Member Functions

void setUserInfo (JSONObject userInfo)
 
void setEmail (String email)
 
void setUser_id (int user_id)
 

Constructor & Destructor Documentation

nl.sense_os.cortex.coaching.User.User ( JSONObject  jsonObject)

Construct User from JSONObject

This function constructs a User from a JSONObject.
The JSONObject should contain the data members as key-value pair.

Parameters
jsonObjectThe User represented as a JSONObject

Member Function Documentation

static User nl.sense_os.cortex.coaching.User.getDummyUser ( )
static

Get a dummy User

Creates an example User

Returns
The dummy user
String nl.sense_os.cortex.coaching.User.getEmail ( )

Get the e-mail of the User

The email address known as username and email in CommonSense

Returns
The email address
int nl.sense_os.cortex.coaching.User.getUserID ( )

Get the ID of the User

The identifier of the User known in CommonSense

Returns
The User ID
JSONObject nl.sense_os.cortex.coaching.User.getUserInfo ( )

Get extra User information

Free format user information known in the CoachingEngine database.

Returns
The User information
JSONObject nl.sense_os.cortex.coaching.User.toJSONObject ( )

Get the JSONObject representation

Converts the User into a JSONObject

Returns
The JSONObject representation
String nl.sense_os.cortex.coaching.User.toString ( )

The JSON String representation

Returns an indented JSON formated String representation of the User

Returns
The JSON formated String representation

The documentation for this class was generated from the following file: