Stop trainStopInterline = new Stop();
Stop trainStopArrive = new Stop();
Stop ferryStopDepart = new Stop();
Stop ferryStopArrive = new Stop();
trainStopDepart.setId(new AgencyAndId("Train", "Depart"));
trainStopDepart.setName("Train stop depart");
trainStopDepart.setLon(1);
trainStopDepart.setLat(1);
trainStopDepart.setCode("Train depart code");
trainStopDepart.setPlatformCode("Train depart platform");
trainStopDepart.setZoneId("Train depart zone");
trainStopDwell.setId(new AgencyAndId("Train", "Dwell"));
trainStopDwell.setName("Train stop dwell");
trainStopDwell.setLon(45);
trainStopDwell.setLat(23);
trainStopDwell.setCode("Train dwell code");
trainStopDwell.setPlatformCode("Train dwell platform");
trainStopDwell.setZoneId("Train dwell zone");
trainStopInterline.setId(new AgencyAndId("Train", "Interline"));
trainStopInterline.setName("Train stop interline");
trainStopInterline.setLon(89);
trainStopInterline.setLat(45);
trainStopInterline.setCode("Train interline code");
trainStopInterline.setPlatformCode("Train interline platform");
trainStopInterline.setZoneId("Train interline zone");
trainStopArrive.setId(new AgencyAndId("Train", "Arrive"));
trainStopArrive.setName("Train stop arrive");
trainStopArrive.setLon(133);
trainStopArrive.setLat(67);
trainStopArrive.setCode("Train arrive code");
trainStopArrive.setPlatformCode("Train arrive platform");
trainStopArrive.setZoneId("Train arrive zone");
ferryStopDepart.setId(new AgencyAndId("Ferry", "Depart"));
ferryStopDepart.setName("Ferry stop depart");
ferryStopDepart.setLon(135);
ferryStopDepart.setLat(67);
ferryStopDepart.setCode("Ferry depart code");
ferryStopDepart.setPlatformCode("Ferry depart platform");
ferryStopDepart.setZoneId("Ferry depart zone");
ferryStopArrive.setId(new AgencyAndId("Ferry", "Arrive"));
ferryStopArrive.setName("Ferry stop arrive");
ferryStopArrive.setLon(179);
ferryStopArrive.setLat(89);
ferryStopArrive.setCode("Ferry arrive code");
ferryStopArrive.setPlatformCode("Ferry arrive platform");
ferryStopArrive.setZoneId("Ferry arrive zone");
ArrayList<Stop> firstStops = new ArrayList<Stop>();
ArrayList<Stop> secondStops = new ArrayList<Stop>();
ArrayList<Stop> thirdStops = new ArrayList<Stop>();
firstStops.add(trainStopDepart);
firstStops.add(trainStopDwell);
firstStops.add(trainStopInterline);
secondStops.add(trainStopInterline);
secondStops.add(trainStopArrive);
thirdStops.add(ferryStopDepart);
thirdStops.add(ferryStopArrive);
// Agencies for legs 1, 2 and 4, plus initialization
Agency trainAgency = new Agency();
Agency ferryAgency = new Agency();
trainAgency.setId("Train");
trainAgency.setName("John Train");
trainAgency.setUrl("http://www.train.org/");
ferryAgency.setId("Ferry");
ferryAgency.setName("Brian Ferry");
ferryAgency.setUrl("http://www.ferry.org/");
// Routes for legs 1, 2 and 4, plus initialization
Route firstRoute = new Route();
Route secondRoute = new Route();
Route thirdRoute = new Route();
firstRoute.setId(new AgencyAndId("Train", "A"));
firstRoute.setAgency(trainAgency);
firstRoute.setShortName("A");
firstRoute.setLongName("'A' Train");
firstRoute.setType(2);
firstRoute.setColor("White");
firstRoute.setTextColor("Black");
secondRoute.setId(new AgencyAndId("Train", "B"));
secondRoute.setAgency(trainAgency);
secondRoute.setShortName("B");
secondRoute.setLongName("Another Train");
secondRoute.setType(2);
secondRoute.setColor("Cyan");
secondRoute.setTextColor("Yellow");
thirdRoute.setId(new AgencyAndId("Ferry", "C"));
thirdRoute.setAgency(ferryAgency);
thirdRoute.setShortName("C");
thirdRoute.setLongName("Ferry Cross the Mersey");
thirdRoute.setType(4);
thirdRoute.setColor("Black");
thirdRoute.setTextColor("White");
// Trips for legs 1, 2 and 4, plus initialization
Trip firstTrip = new Trip();
Trip secondTrip = new Trip();
Trip thirdTrip = new Trip();
firstTrip.setId(new AgencyAndId("Train", "A"));
firstTrip.setTripShortName("A");
firstTrip.setBlockId("Alock");
firstTrip.setRoute(firstRoute);
BikeAccess.setForTrip(firstTrip, BikeAccess.ALLOWED);
firstTrip.setTripHeadsign("Street Fighting Man");
secondTrip.setId(new AgencyAndId("Train", "B"));
secondTrip.setTripShortName("B");
secondTrip.setBlockId("Block");
secondTrip.setRoute(secondRoute);
BikeAccess.setForTrip(secondTrip, BikeAccess.ALLOWED);
secondTrip.setTripHeadsign("No Expectations");
thirdTrip.setId(new AgencyAndId("Ferry", "C"));
thirdTrip.setTripShortName("C");
thirdTrip.setBlockId("Clock");
thirdTrip.setRoute(thirdRoute);
BikeAccess.setForTrip(thirdTrip, BikeAccess.ALLOWED);
thirdTrip.setTripHeadsign("Handsome Molly");