// Path: app/models/transit/RouteType.java
// public class RouteType extends Model implements Serializable {
// 	public static final long serialVersionUID = 1;
// 	
//     public String localizedVehicleType;
// 	public String description;
// 	
//     public GtfsRouteType gtfsRouteType;
//     
//     public HvtRouteType hvtRouteType;
//     
//     /*
//     @JsonCreator
//     public static RouteType factory(long id) {
//       return RouteType.findById(id);
//     }
// 
//     @JsonCreator
//     public static RouteType factory(String id) {
//       return RouteType.findById(Long.parseLong(id));
//     }
//     */
// 
//     
// }


import java.io.Serializable;
import java.math.BigInteger;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.List;
import models.Model;
import models.transit.RouteType;
import org.hibernate.annotations.Type;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.vividsolutions.jts.geom.MultiLineString;
import datastore.AgencyTx;
import datastore.GlobalTx;
import play.Logger;
package models.transit;






public class Route extends Model implements Cloneable, Serializable {
	public static final long serialVersionUID = 1;
	
	public String gtfsRouteId;
    public String routeShortName;
    public String routeLongName;
 
    public String routeDesc;

    public String routeTypeId;

    public String routeUrl;
    public String routeColor;
    public String routeTextColor;

    // Custom Fields
    public String comments;

    public StatusType status;

    public Boolean publiclyVisible;

    public String agencyId;

    //public GisRoute gisRoute;

    //public GisUpload gisUpload;
    
    public AttributeAvailabilityType wheelchairBoarding;
    
    /** on which days does this route have service? Derived from calendars on render */
    public transient Boolean monday, tuesday, wednesday, thursday, friday, saturday, sunday;

    // add getters so Jackson will serialize
    
    @JsonProperty("monday")
    public Boolean jsonGetMonday() {
		return monday;
	}

    @JsonProperty("tuesday")
	public Boolean jsonGetTuesday() {
		return tuesday;
	}

    @JsonProperty("wednesday")
	public Boolean jsonGetWednesday() {
		return wednesday;
	}
    
    @JsonProperty("thursday")
	public Boolean jsonGetThursday() {
		return thursday;
	}

    @JsonProperty("friday")
    public Boolean jsonGetFriday() {
		return friday;
	}

    @JsonProperty("saturday")
    public Boolean jsonGetSaturday() {
		return saturday;
	}

    @JsonProperty("sunday")
	public Boolean jsonGetSunday() {
		return sunday;
	}

	public Route () {}

    public Route(com.conveyal.gtfs.model.Route route,  Agency agency, String routeTypeId) {	
        this.gtfsRouteId = route.route_id;
        this.routeShortName = route.route_short_name;
        this.routeLongName = route.route_long_name;
        this.routeDesc = route.route_desc;
        
        this.routeTypeId = routeTypeId;
        
        this.routeUrl = route.route_url != null ? route.route_url.toString() : null;
        this.routeColor = route.route_color;
        this.routeTextColor = route.route_text_color;

        this.agencyId = agency.id;
    }


// Path: app/models/transit/RouteType.java
// public class RouteType extends Model implements Serializable {
// 	public static final long serialVersionUID = 1;
// 	
//     public String localizedVehicleType;
// 	public String description;
// 	
//     public GtfsRouteType gtfsRouteType;
//     
//     public HvtRouteType hvtRouteType;
//     
//     /*
//     @JsonCreator
//     public static RouteType factory(long id) {
//       return RouteType.findById(id);
//     }
// 
//     @JsonCreator
//     public static RouteType factory(String id) {
//       return RouteType.findById(Long.parseLong(id));
//     }
//     */
// 
//     
// }


// Path: app/models/transit/Route.java
import java.io.Serializable;
import java.math.BigInteger;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.List;
import models.Model;
import models.transit.RouteType;
import org.hibernate.annotations.Type;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.vividsolutions.jts.geom.MultiLineString;
import datastore.AgencyTx;
import datastore.GlobalTx;
import play.Logger;

package models.transit;






public class Route extends Model implements Cloneable, Serializable {
	public static final long serialVersionUID = 1;
	
	public String gtfsRouteId;
    public String routeShortName;
    public String routeLongName;
 
    public String routeDesc;

    public String routeTypeId;

    public String routeUrl;
    public String routeColor;
    public String routeTextColor;

    // Custom Fields
    public String comments;

    public StatusType status;

    public Boolean publiclyVisible;

    public String agencyId;

    //public GisRoute gisRoute;

    //public GisUpload gisUpload;
    
    public AttributeAvailabilityType wheelchairBoarding;
    
    /** on which days does this route have service? Derived from calendars on render */
    public transient Boolean monday, tuesday, wednesday, thursday, friday, saturday, sunday;

    // add getters so Jackson will serialize
    
    @JsonProperty("monday")
    public Boolean jsonGetMonday() {
		return monday;
	}

    @JsonProperty("tuesday")
	public Boolean jsonGetTuesday() {
		return tuesday;
	}

    @JsonProperty("wednesday")
	public Boolean jsonGetWednesday() {
		return wednesday;
	}
    
    @JsonProperty("thursday")
	public Boolean jsonGetThursday() {
		return thursday;
	}

    @JsonProperty("friday")
    public Boolean jsonGetFriday() {
		return friday;
	}

    @JsonProperty("saturday")
    public Boolean jsonGetSaturday() {
		return saturday;
	}

    @JsonProperty("sunday")
	public Boolean jsonGetSunday() {
		return sunday;
	}

	public Route () {}

    public Route(com.conveyal.gtfs.model.Route route,  Agency agency, String routeTypeId) {	
        this.gtfsRouteId = route.route_id;
        this.routeShortName = route.route_short_name;
        this.routeLongName = route.route_long_name;
        this.routeDesc = route.route_desc;
        
        this.routeTypeId = routeTypeId;
        
        this.routeUrl = route.route_url != null ? route.route_url.toString() : null;
        this.routeColor = route.route_color;
        this.routeTextColor = route.route_text_color;

        this.agencyId = agency.id;
    }


    public Route(String routeShortName, String routeLongName, RouteType routeType, String routeDescription,  Agency agency) {