Basic testing done
[Sunshine.git] / app / src / main / java / uk / me / njae / sunshine / data / WeatherContract.java
1 package uk.me.njae.sunshine.data;
2
3 import android.provider.BaseColumns;
4
5 /**
6 * Created by neil on 09/11/14.
7 */
8 public class WeatherContract {
9 /* Inner class that defines the table contents of the location table */
10 public static final class LocationEntry implements BaseColumns {
11
12 // Table name
13 public static final String TABLE_NAME = "location";
14
15 // The location setting string is what will be sent to openweathermap
16 // as the location query.
17 public static final String COLUMN_LOCATION_SETTING = "location_setting";
18
19 // Human readable location string, provided by the API. Because for styling,
20 // "Mountain View" is more recognizable than 94043.
21 public static final String COLUMN_CITY_NAME = "city_name";
22
23 // In order to uniquely pinpoint the location on the map when we launch the
24 // map intent, we store the latitude and longitude as returned by openweathermap.
25 public static final String COLUMN_COORD_LAT = "coord_lat";
26 public static final String COLUMN_COORD_LONG = "coord_long";
27 }
28
29 /* Inner class that defines the table contents of the weather table */
30 public static final class WeatherEntry implements BaseColumns {
31
32 public static final String TABLE_NAME = "weather";
33
34 // Column with the foreign key into the location table.
35 public static final String COLUMN_LOC_KEY = "location_id";
36 // Date, stored as Text with format yyyy-MM-dd
37 public static final String COLUMN_DATETEXT = "date";
38 // Weather id as returned by API, to identify the icon to be used
39 public static final String COLUMN_WEATHER_ID = "weather_id";
40
41 // Short description and long description of the weather, as provided by API.
42 // e.g "clear" vs "sky is clear".
43 public static final String COLUMN_SHORT_DESC = "short_desc";
44
45 // Min and max temperatures for the day (stored as floats)
46 public static final String COLUMN_MIN_TEMP = "min";
47 public static final String COLUMN_MAX_TEMP = "max";
48
49 // Humidity is stored as a float representing percentage
50 public static final String COLUMN_HUMIDITY = "humidity";
51
52 // Humidity is stored as a float representing percentage
53 public static final String COLUMN_PRESSURE = "pressure";
54
55 // Windspeed is stored as a float representing windspeed mph
56 public static final String COLUMN_WIND_SPEED = "wind";
57
58 // Degrees are meteorological degrees (e.g, 0 is north, 180 is south). Stored as floats.
59 public static final String COLUMN_DEGREES = "degrees";
60 }
61 }