package eic.beike.projectx.busdata;

import com.google.gson.annotations.SerializedName;

/**
 * Small data class used by gson, comparation on timestamp
 * Created by alex on 9/22/15.
 */
public class ResponseEntry implements Comparable<ResponseEntry>{
    @SerializedName("resourceSpec")
    String resource;

    @SerializedName("timestamp")
    Integer timestamp;

    @SerializedName("value")
    String value;

    @SerializedName("gatewayId")
    String busVin;

    @Override
    public int compareTo(ResponseEntry other){
        return this.timestamp - other.timestamp;
    }
}

@@ -34,60 +34,8 @@
 a;%0A%0A
-import com.google.gson.annotations.SerializedName;%0A%0A
 /**%0A
@@ -201,39 +201,63 @@
     
-@SerializedName(%22resourceSpec%22)
+/**%0A     * The name of the resource in the api.%0A     */
 %0A   
@@ -276,148 +276,266 @@
 urce
+Spec
 ;%0A%0A    
-@SerializedName(%22timestamp%22)%0A    Integer timestamp;%0A%0A    @SerializedName(%22value%22)%0A    String value;%0A%0A    @SerializedName(%22gatewayId%22)
+/**%0A     * The timestamp of when the event was recorded on the bus.%0A     */%0A    long timestamp;%0A%0A    /**%0A     * The value of the sensor.%0A     */%0A    String value;%0A%0A    /**%0A     * The vin number of the bus on which the sensor recorded data.%0A     */
 %0A   
@@ -546,14 +546,17 @@
 ing 
-busVin
+gatewayId
 ;%0A%0A 
@@ -630,16 +630,23 @@
  return 
+(int) (
 this.tim
@@ -669,16 +669,17 @@
 imestamp
+)
 ;%0A    %7D%0A

Clean up intermidieate data class.