Compare commits

..

10 Commits

@ -88,11 +88,7 @@ public class AddTripController extends Controller{
} }
if (!fail) { if (!fail) {
String date = ""; Trip trip = new Trip(tripName.getText() ,stops, direction.getValue(), ride.getValue(), days, boolReoccur, endDate.getValue());
if (endDate.getValue() != null && boolReoccur == true){
date = endDate.getValue().toString();
}
Trip trip = new Trip(tripName.getText() ,stops, direction.getValue(), ride.getValue(), days, boolReoccur, date);
System.out.println(trip); System.out.println(trip);
Optional<ButtonType> result = popUp(Alert.AlertType.CONFIRMATION, "Success!", "Trip Added", String.format("Your Trip %1s has been added successfully!\n\nWould you like to add another trip?", tripName.getText()), ButtonSets.YesNo); Optional<ButtonType> result = popUp(Alert.AlertType.CONFIRMATION, "Success!", "Trip Added", String.format("Your Trip %1s has been added successfully!\n\nWould you like to add another trip?", tripName.getText()), ButtonSets.YesNo);
parent.getSession().getDataManager().addTrip(trip); parent.getSession().getDataManager().addTrip(trip);

@ -5,6 +5,7 @@ import javafx.scene.Parent;
import javafx.scene.control.Label; import javafx.scene.control.Label;
import javafx.scene.layout.GridPane; import javafx.scene.layout.GridPane;
import model.SceneCode; import model.SceneCode;
import model.Session;
import java.net.URL; import java.net.URL;
import java.util.ResourceBundle; import java.util.ResourceBundle;
@ -65,13 +66,21 @@ public class BaseController extends Controller {
changeScene(SceneCode.SHARED_RIDES); changeScene(SceneCode.SHARED_RIDES);
} }
public void mySharedRides() throws Exception{
changeScene(SceneCode.MY_SHARED_RIDES);
}
public void myBookings() throws Exception{
changeScene(SceneCode.MY_BOOKINGS);
}
public void setContent(Parent parent1){ public void setContent(Parent parent1){
//remove all children that do not belong to the original fxml //remove all children that do not belong to the original fxml
while (base.getChildren().size() > childNum) { while (base.getChildren().size() > childNum) {
base.getChildren().remove(base.getChildren().size() - 1); base.getChildren().remove(base.getChildren().size() - 1);
} }
base.add(parent1, 1, 0); base.add(parent1, 1, 0);
loggedInAs.setText(String.format("Logged in as %s", parent.getSession().getUserCode())); loggedInAs.setText(String.format("Logged in as %d", Session.session.getUser().getStudentNumber()));
} }
public void logout() throws Exception { public void logout() throws Exception {

@ -17,6 +17,7 @@ import utils.DataManagerSerialiser;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.time.LocalDate;
/** /**
@ -48,6 +49,7 @@ public class Main extends Application {
} catch (Exception e){ } catch (Exception e){
//this exception is for when the files is formatted wrong. //this exception is for when the files is formatted wrong.
this.session.setDataManager(new DataManager()); this.session.setDataManager(new DataManager());
Session.session.setUser(new User(79984862, null, null, null, null, null, null));
Ride ride = new Ride("Nissan March", "Baby Blue", "EPU001", 2004, 5); Ride ride = new Ride("Nissan March", "Baby Blue", "EPU001", 2004, 5);
Stop stop1 = new Stop("1 Avonhead Road"); Stop stop1 = new Stop("1 Avonhead Road");
@ -72,7 +74,7 @@ public class Main extends Application {
ObservableList<TripStop> tripStops = FXCollections.observableArrayList(); ObservableList<TripStop> tripStops = FXCollections.observableArrayList();
tripStops.addAll(tripStop1, tripStop4); tripStops.addAll(tripStop1, tripStop4);
Trip trip = new Trip("Home to Uni", tripStops, "University", ride, days, true, "30-12-2017"); Trip trip = new Trip("Home to Uni", tripStops, "University", ride, days, true, LocalDate.of(2017, 12, 30));
this.session.getDataManager().addRides(ride); this.session.getDataManager().addRides(ride);

@ -1,14 +1,16 @@
package controllers; package controllers;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.fxml.FXML; import javafx.fxml.FXML;
import javafx.fxml.Initializable; import javafx.fxml.Initializable;
import javafx.scene.control.Alert; import javafx.scene.control.*;
import javafx.scene.control.Control;
import javafx.scene.control.PasswordField;
import javafx.scene.control.TextField;
import model.SceneCode; import model.SceneCode;
import model.Session;
import model.User;
import java.net.URL; import java.net.URL;
import java.util.List;
import java.util.ResourceBundle; import java.util.ResourceBundle;
/** /**
@ -20,22 +22,43 @@ public class MainController extends Controller{
TextField username; TextField username;
@FXML @FXML
PasswordField password; PasswordField password;
@FXML
private ComboBox<String> accountType;
public void register() throws Exception{ public void register() throws Exception{
changeScene(SceneCode.REGISTER); changeScene(SceneCode.REGISTER);
} }
public boolean validateLogin(String user, String pass){ public boolean validateLogin(String user, String pass){
if (user.equals(pass)){ if (Session.session.getDataManager().getUsers().get(user) != null) {
return true; if (Session.session.getDataManager().getUsers().get(user).checkPassword(pass) && User.AccountType.getValueOf(accountType.getValue()) == User.AccountType.PASSENGER) {
Session.session.setUser(Session.session.getDataManager().getUsers().get(user));
return true;
}
}
if (Session.session.getDataManager().getDrivers().get(user) != null) {
if (Session.session.getDataManager().getDrivers().get(user).checkPassword(pass) && User.AccountType.getValueOf(accountType.getValue()) == User.AccountType.DRIVER) {
Session.session.setUser(Session.session.getDataManager().getDrivers().get(user));
return true;
}
} }
return false; return false;
} }
public void getNotifications(){
List<String> notifications = Session.session.getDataManager().getNotifications().get(Session.session.getUser().getID());
if (notifications != null){
for (String s: notifications){
popUp(Alert.AlertType.INFORMATION, "Notification!", "You have received a Notification", s);
}
notifications.clear();
}
}
public void login() throws Exception { public void login() throws Exception {
//validate login //validate login
if (validateLogin(username.getText(), password.getText())){ if (validateLogin(username.getText(), password.getText())){
parent.getSession().setUserCode(username.getText()); getNotifications();
changeScene(SceneCode.HOME); changeScene(SceneCode.HOME);
}else{ }else{
popUp(Alert.AlertType.WARNING, "Warning!", "Invalid Login!", "Your password and username do not match a record in our database."); popUp(Alert.AlertType.WARNING, "Warning!", "Invalid Login!", "Your password and username do not match a record in our database.");
@ -44,6 +67,9 @@ public class MainController extends Controller{
@Override @Override
public void initialize(URL location, ResourceBundle resources) { public void initialize(URL location, ResourceBundle resources) {
ObservableList<String> accountTypes = FXCollections.observableArrayList();
accountTypes.addAll(User.AccountType.DRIVER.name, User.AccountType.PASSENGER.name);
accountType.setItems(accountTypes);
accountType.getSelectionModel().select(0);
} }
} }

@ -0,0 +1,108 @@
package controllers;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.fxml.FXML;
import javafx.scene.control.*;
import javafx.scene.paint.Color;
import model.*;
import java.net.URL;
import java.util.Comparator;
import java.util.Optional;
import java.util.ResourceBundle;
/**
* Created by Gondr on 2/06/2017.
*/
public class MyBookingsController extends Controller {
@FXML
private Label rideLabel;
@FXML
private Label directionLabel;
@FXML
private Label mondayLabel;
@FXML
private Label tuesdayLabel;
@FXML
private Label wednesdayLabel;
@FXML
private Label thursdayLabel;
@FXML
private Label fridayLabel;
@FXML
private Label saturdayLabel;
@FXML
private Label sundayLabel;
@FXML
private Label reoccuringLabel;
@FXML
private Label endDateLabel;
@FXML
private TableView<TripStop> stopsList;
@FXML
private ListView<SharedTrip> tripsList;
private ObservableList<SharedTrip> trips;
@FXML
private TableColumn<TripStop, String> stopTimeColumn;
@FXML
private TableColumn<TripStop, String> stopNameColumn;
private Trip selectedTrip;
private void setRideDays(Label day, boolean travelling){
if (travelling){
day.setTextFill(Color.GREEN);
}else{
day.setTextFill(Color.RED);
}
}
public void cancelRide(){
}
@Override
public void runLater(){
//fill tables etc;
Session.session.getUser().populateBookings();
trips = FXCollections.observableArrayList(Session.session.getUser().getBookings());
Comparator<? super SharedTrip> comparatorByStartDate = new Comparator<SharedTrip>() {
@Override
public int compare(SharedTrip o1, SharedTrip o2) {
return (int)(o1.getStartDate().toEpochDay() - o2.getStartDate().toEpochDay());
}
};
FXCollections.sort(trips, comparatorByStartDate);
tripsList.setItems(trips);
stopTimeColumn.setCellValueFactory(p -> p.getValue().nameProperty());
stopNameColumn.setCellValueFactory(p -> p.getValue().nameProperty());
tripsList.getSelectionModel().selectedItemProperty().addListener((observable, oldValue, newValue) -> {
selectedTrip = tripsList.getSelectionModel().getSelectedItem();
stopsList.setItems(selectedTrip.route);
rideLabel.setText(selectedTrip.ride.toString());
directionLabel.setText(selectedTrip.direction);
setRideDays(mondayLabel, selectedTrip.days[Trip.MONDAY]);
setRideDays(tuesdayLabel, selectedTrip.days[Trip.TUESDAY]);
setRideDays(wednesdayLabel, selectedTrip.days[Trip.WEDNESDAY]);
setRideDays(thursdayLabel, selectedTrip.days[Trip.THURSDAY]);
setRideDays(fridayLabel, selectedTrip.days[Trip.FRIDAY]);
setRideDays(saturdayLabel, selectedTrip.days[Trip.SATURDAY]);
setRideDays(sundayLabel, selectedTrip.days[Trip.SUNDAY]);
if (selectedTrip.reoccur){
reoccuringLabel.setText("Yes");
endDateLabel.setText(selectedTrip.endDate.toString());
}else{
reoccuringLabel.setText("No");
endDateLabel.setText("-");
}
});
}
@Override
public void initialize(URL location, ResourceBundle resources) {
rideLabel.setText("-");
directionLabel.setText("-");
reoccuringLabel.setText("-");
endDateLabel.setText("-");
}
}

@ -0,0 +1,107 @@
package controllers;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.fxml.FXML;
import javafx.scene.control.*;
import javafx.scene.paint.Color;
import model.*;
import java.net.URL;
import java.util.Comparator;
import java.util.Optional;
import java.util.ResourceBundle;
/**
* Created by Gondr on 2/06/2017.
*/
public class MySharedTripsController extends Controller{
@FXML
private Label rideLabel;
@FXML
private Label directionLabel;
@FXML
private Label mondayLabel;
@FXML
private Label tuesdayLabel;
@FXML
private Label wednesdayLabel;
@FXML
private Label thursdayLabel;
@FXML
private Label fridayLabel;
@FXML
private Label saturdayLabel;
@FXML
private Label sundayLabel;
@FXML
private Label reoccuringLabel;
@FXML
private Label endDateLabel;
@FXML
private TableView<TripStop> stopsList;
@FXML
private ListView<SharedTrip> tripsList;
private ObservableList<SharedTrip> trips;
@FXML
private TableColumn<TripStop, String> stopTimeColumn;
@FXML
private TableColumn<TripStop, String> stopNameColumn;
private SharedTrip selectedTrip;
private void setRideDays(Label day, boolean travelling){
if (travelling){
day.setTextFill(Color.GREEN);
}else{
day.setTextFill(Color.RED);
}
}
public void cancelRide(){
}
@Override
public void runLater(){
//fill tables etc;
trips = FXCollections.observableArrayList(parent.getSession().getDataManager().getSharedTrips());
tripsList.setItems(trips);
Comparator<? super SharedTrip> comparatorByStartDate = new Comparator<SharedTrip>() {
@Override
public int compare(SharedTrip o1, SharedTrip o2) {
return (int)(o1.getStartDate().toEpochDay() - o2.getStartDate().toEpochDay());
}
};
FXCollections.sort(trips, comparatorByStartDate);
stopTimeColumn.setCellValueFactory(p -> p.getValue().nameProperty());
stopNameColumn.setCellValueFactory(p -> p.getValue().nameProperty());
tripsList.getSelectionModel().selectedItemProperty().addListener((observable, oldValue, newValue) -> {
selectedTrip = tripsList.getSelectionModel().getSelectedItem();
stopsList.setItems(selectedTrip.route);
rideLabel.setText(selectedTrip.ride.toString());
directionLabel.setText(selectedTrip.direction);
setRideDays(mondayLabel, selectedTrip.days[Trip.MONDAY]);
setRideDays(tuesdayLabel, selectedTrip.days[Trip.TUESDAY]);
setRideDays(wednesdayLabel, selectedTrip.days[Trip.WEDNESDAY]);
setRideDays(thursdayLabel, selectedTrip.days[Trip.THURSDAY]);
setRideDays(fridayLabel, selectedTrip.days[Trip.FRIDAY]);
setRideDays(saturdayLabel, selectedTrip.days[Trip.SATURDAY]);
setRideDays(sundayLabel, selectedTrip.days[Trip.SUNDAY]);
if (selectedTrip.reoccur){
reoccuringLabel.setText("Yes");
endDateLabel.setText(selectedTrip.endDate.toString());
}else{
reoccuringLabel.setText("No");
endDateLabel.setText("-");
}
});
}
@Override
public void initialize(URL location, ResourceBundle resources) {
rideLabel.setText("-");
directionLabel.setText("-");
reoccuringLabel.setText("-");
endDateLabel.setText("-");
}
}

@ -109,7 +109,7 @@ public class MyTripsController extends Controller{
setRideDays(sundayLabel, selectedTrip.days[Trip.SUNDAY]); setRideDays(sundayLabel, selectedTrip.days[Trip.SUNDAY]);
if (selectedTrip.reoccur){ if (selectedTrip.reoccur){
reoccuringLabel.setText("Yes"); reoccuringLabel.setText("Yes");
endDateLabel.setText(selectedTrip.endDate); endDateLabel.setText(selectedTrip.endDate.toString());
}else{ }else{
reoccuringLabel.setText("No"); reoccuringLabel.setText("No");
endDateLabel.setText("-"); endDateLabel.setText("-");

@ -51,7 +51,7 @@ public class RegisterController extends Controller {
return failure; return failure;
} }
public String validateEmail(String email){ public static String validateEmail(String email){
String failure = ""; String failure = "";
Pattern uclivePattern = Pattern.compile(".*@uclive.ac.nz", Pattern.CASE_INSENSITIVE); Pattern uclivePattern = Pattern.compile(".*@uclive.ac.nz", Pattern.CASE_INSENSITIVE);
Pattern canterburyPattern = Pattern.compile(".*@canterbury.ac.nz", Pattern.CASE_INSENSITIVE); Pattern canterburyPattern = Pattern.compile(".*@canterbury.ac.nz", Pattern.CASE_INSENSITIVE);
@ -61,7 +61,7 @@ public class RegisterController extends Controller {
return failure; return failure;
} }
public String validatePassword(String p1, String p2){ public static String validatePassword(String p1, String p2){
String failure = ""; String failure = "";
if (p1.length() < 6){ if (p1.length() < 6){
failure += "Your password must be at least 6 letters long.\n"; failure += "Your password must be at least 6 letters long.\n";
@ -72,7 +72,7 @@ public class RegisterController extends Controller {
return failure; return failure;
} }
public String validateAddress(String address){ public static String validateAddress(String address){
String failure = ""; String failure = "";
if (!DataValidator.addressValidator(address)){ if (!DataValidator.addressValidator(address)){
failure += "Your address must be similar to 1 University Drive or 1/1 University Drive or 1A/2 University Drive or 1A/2A University Drive.\n"; failure += "Your address must be similar to 1 University Drive or 1/1 University Drive or 1A/2 University Drive or 1A/2A University Drive.\n";
@ -80,7 +80,7 @@ public class RegisterController extends Controller {
return failure; return failure;
} }
public String validatePhone(String hp, String mp){ public static String validatePhone(String hp, String mp){
String failure = ""; String failure = "";
if ((hp.equals("") || hp == null) && (mp.equals("")||mp == null)){ if ((hp.equals("") || hp == null) && (mp.equals("")||mp == null)){
failure += "You must enter either a home phone number or a mobile phone number.\n"; failure += "You must enter either a home phone number or a mobile phone number.\n";

@ -0,0 +1,128 @@
package controllers;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.fxml.FXML;
import javafx.scene.control.Alert;
import javafx.scene.control.ComboBox;
import javafx.scene.control.DatePicker;
import javafx.scene.control.TextField;
import javafx.scene.image.Image;
import model.Driver;
import model.SceneCode;
import model.Session;
import java.net.URL;
import java.time.LocalDate;
import java.util.ResourceBundle;
/**
* Created by Gondr on 1/06/2017.
*/
public class RegisterDriverController extends Controller {
private Image photoStored;
private int studentNumber;
private String email;
private String password;
private String address;
private String homephone;
private String mobilephone;
private String accountType;
@FXML
private ComboBox<String> licenseType;
@FXML
private TextField number;
@FXML
private DatePicker issue;
@FXML
private DatePicker expiry;
public void setUserInformation(int studentNumber, String email, String password, String address, String homephone, String mobilephone, String accountType, Image photoStored){
this.studentNumber = studentNumber;
this.email = email;
this.password = password;
this.address = address;
this.homephone = homephone;
this.mobilephone = mobilephone;
this.accountType = accountType;
this.photoStored = photoStored;
}
public static String validateLicense(String ln){
String failure = "";
if (ln.length() < 6){
failure += "Your License must be at least 6 letters long.\n";
}
return failure;
}
public static String validateIssue(LocalDate d){
String failure = "";
if (d == null){
failure += "You must set a date of issue.\n";
}else {
if (LocalDate.now().isBefore(d)) {
failure += "You cannot have a issue date earlier than today.\n";
}
}
return failure;
}
public static String validateExpire(LocalDate e, LocalDate i){
String failure = "";
if (e == null){
failure += "You must set a date of expiry.\n";
} else {
if (i != null) {
if (e.isBefore(i)) {
failure += "You cannot have your expiry date before your date of issue.\n";
}
}
}
return failure;
}
public boolean validate(){
String failure = "";
failure += validateLicense(number.getText());
failure += validateIssue(issue.getValue());
failure += validateExpire(expiry.getValue(), issue.getValue());
if (failure.equals("")){
return true;
}else{
popUp(Alert.AlertType.WARNING, "Error!", "Your details are not valid for the following reasons.", failure);
return false;
}
}
public void createAccount(){
if (validate()){
Driver.LicenseType lc = Driver.LicenseType.getValueOf(licenseType.getValue());
Driver driver = new Driver(studentNumber, email, password, address,homephone, mobilephone, photoStored, lc, number.getText(), issue.getValue(), expiry.getValue());
if (Session.session.getDataManager().addDriver(driver)){
popUp(Alert.AlertType.CONFIRMATION, "Success!", "Your Account has been made.", "You can now log in and will be redirected the the title screen after.");
try {
changeScene(SceneCode.MAIN);
} catch (Exception e) {
e.printStackTrace();
}
}else {
popUp(Alert.AlertType.WARNING, "Error!", "There is already an passenger with this id.", "You will be redirected to the homescreen to log in.");
try {
changeScene(SceneCode.MAIN);
} catch (Exception e) {
e.printStackTrace();
}
}
}
}
@Override
public void initialize(URL location, ResourceBundle resources) {
ObservableList<String> licenseTypes = FXCollections.observableArrayList();
licenseTypes.addAll(Driver.LicenseType.RESTRICTED.name, Driver.LicenseType.FULL.name, Driver.LicenseType.FULL2YEARS.name);
licenseType.setItems(licenseTypes);
licenseType.getSelectionModel().select(0);
}
}

@ -13,10 +13,7 @@ import javafx.scene.layout.GridPane;
import javafx.scene.layout.RowConstraints; import javafx.scene.layout.RowConstraints;
import javafx.stage.Popup; import javafx.stage.Popup;
import javafx.stage.Stage; import javafx.stage.Stage;
import model.SharedTrip; import model.*;
import model.Stop;
import model.Trip;
import model.TripStop;
import java.net.URL; import java.net.URL;
import java.util.HashMap; import java.util.HashMap;
@ -132,7 +129,8 @@ public class SharedTripsController extends Controller{
//book button //book button
Button bookRide = new Button("Book Ride"); Button bookRide = new Button("Book Ride");
bookRide.setOnAction(e->{ bookRide.setOnAction(e->{
trip.bookSeat(parent.getSession().getUserCode()); trip.bookSeat(Session.session.getUser());
Session.session.getUser().book(trip);
tripDetails.close(); tripDetails.close();
search(); search();
popUp(Alert.AlertType.CONFIRMATION, "Success!", "You have Successfully booked a ride!", "The ride has been successfully booked and can be viewed in your booked rides."); popUp(Alert.AlertType.CONFIRMATION, "Success!", "You have Successfully booked a ride!", "The ride has been successfully booked and can be viewed in your booked rides.");
@ -161,7 +159,7 @@ public class SharedTripsController extends Controller{
Pattern stopNamePattern = Pattern.compile(".*"+stopName.getText()+".*", Pattern.CASE_INSENSITIVE); Pattern stopNamePattern = Pattern.compile(".*"+stopName.getText()+".*", Pattern.CASE_INSENSITIVE);
//ignore direction //ignore direction
boolean ignoreDirection = directionBox.getSelectionModel().isSelected(0) || directionBox.getValue() == null; boolean ignoreDirection = directionBox.getSelectionModel().isSelected(0) || directionBox.getValue() == null;
for(SharedTrip sharedTrip: parent.getSession().getDataManager().getSharedTrips()){ for(SharedTrip sharedTrip: Session.session.getDataManager().getAllSharedTrips()){
if (sharedTrip.isFull()){ if (sharedTrip.isFull()){
continue; continue;
} }
@ -192,7 +190,7 @@ public class SharedTripsController extends Controller{
@Override @Override
public void runLater(){ public void runLater(){
sharedTrips = FXCollections.observableArrayList(parent.getSession().getDataManager().getSharedTrips()); sharedTrips = FXCollections.observableArrayList(Session.session.getDataManager().getAllSharedTrips());
sharedTripsTable.setItems(sharedTrips); sharedTripsTable.setItems(sharedTrips);
tripNameColumn.setCellValueFactory(p -> new SimpleStringProperty(p.getValue().name)); tripNameColumn.setCellValueFactory(p -> new SimpleStringProperty(p.getValue().name));
directionColumn.setCellValueFactory(p -> new SimpleStringProperty(p.getValue().direction)); directionColumn.setCellValueFactory(p -> new SimpleStringProperty(p.getValue().direction));

@ -2,9 +2,13 @@ package controllers;
import javafx.embed.swing.SwingFXUtils; import javafx.embed.swing.SwingFXUtils;
import javafx.fxml.FXML; import javafx.fxml.FXML;
import javafx.scene.control.Alert;
import javafx.scene.image.Image; import javafx.scene.image.Image;
import javafx.scene.image.ImageView; import javafx.scene.image.ImageView;
import javafx.stage.FileChooser; import javafx.stage.FileChooser;
import model.SceneCode;
import model.Session;
import model.User;
import javax.imageio.ImageIO; import javax.imageio.ImageIO;
import java.awt.image.BufferedImage; import java.awt.image.BufferedImage;
@ -55,7 +59,37 @@ public class UploadPhotoController extends Controller {
} }
public void next(){ public void next(){
if (photoStored == null){
popUp(Alert.AlertType.WARNING, "Error!", "Missing Photo.", "You must have a photo with your account.");
return;
}
User.AccountType ac = User.AccountType.getValueOf(accountType);
if (ac == User.AccountType.PASSENGER){
User user = new User(studentNumber, email, password, address,homephone, mobilephone, photoStored);
if (Session.session.getDataManager().addUser(user)){
popUp(Alert.AlertType.CONFIRMATION, "Success!", "Your Account has been made.", "You can now log in and will be redirected the the title screen after.");
try {
changeScene(SceneCode.MAIN);
} catch (Exception e) {
e.printStackTrace();
}
}else{
popUp(Alert.AlertType.WARNING, "Error!", "There is already an passenger with this id.", "You will be redirected to the homescreen to log in.");
try {
changeScene(SceneCode.MAIN);
} catch (Exception e) {
e.printStackTrace();
}
}
}else{
try {
RegisterDriverController c = (RegisterDriverController) changeScene(SceneCode.REGISTER_DRIVER);
c.setUserInformation(studentNumber, email, password, address,
homephone, mobilephone, accountType, photoStored);
} catch (Exception e) {
e.printStackTrace();
}
}
} }
@Override @Override

@ -6,48 +6,194 @@ import javafx.collections.ObservableList;
import javafx.collections.ObservableSet; import javafx.collections.ObservableSet;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* Created by Gondr on 4/04/2017. * Created by Gondr on 4/04/2017.
*/ */
public class DataManager { public class DataManager {
private ObservableList<Ride> rides; private Map<String, ObservableList<Ride>> rides;
private ObservableList<Stop> stops; private Map<String, ObservableList<Stop>> stops;
private ObservableList<Route> routes; private Map<String, ObservableList<Route>> routes;
private ObservableList<Trip> trips; private Map<String, ObservableList<Trip>> trips;
private ObservableList<SharedTrip> sharedTrips; private Map<String, ObservableList<SharedTrip>> sharedTrips;
private Map<String, User> users;
private Map<String, Driver> drivers;//seperated from users as they are two different types of accounts
private Map<String, List<String>> notifications; //indexed by user name
public DataManager(List rides, List stops, List routes, List trips, List sharedTrips){ public DataManager(Map<String, List<Ride>> rides, Map<String, List<Stop>> stops, Map<String, List<Route>> routes, Map<String, List<Trip>> trips, Map<String, List<SharedTrip>> sharedTrips, Map users, Map drivers, Map<String, List<String>> notifications){
this.rides = FXCollections.observableArrayList(rides); this.rides = convertRideMapToObserver(rides);
this.stops = FXCollections.observableArrayList(stops); this.stops = convertStopMapToObserver(stops);
this.routes = FXCollections.observableArrayList(routes); this.routes = convertRouteMapToObserver(routes);
this.trips = FXCollections.observableArrayList(trips); this.trips = convertTripMapToObserver(trips);
this.sharedTrips = FXCollections.observableArrayList(sharedTrips); this.sharedTrips = convertSharedTripMapToObserver(sharedTrips);
this.users = users;
this.drivers = drivers;
this.notifications = notifications;
} }
public DataManager(){ public DataManager(){
this(FXCollections.observableArrayList(), FXCollections.observableArrayList(), FXCollections.observableArrayList(), FXCollections.observableArrayList(), FXCollections.observableArrayList()); this(new HashMap<>(), new HashMap<>(), new HashMap<>(), new HashMap<>(), new HashMap<>(), new HashMap<String, User>(), new HashMap<String, Driver>(), new HashMap<>());
} }
////////////////////////////////////////
//Map to Observer or List functions
////////////////////////////////////////
//Ride
////////////////////////////////////////
private Map<String, ObservableList<Ride>> convertRideMapToObserver(Map<String, List<Ride>> rides){
HashMap<String, ObservableList<Ride>> ob = new HashMap<>();
for (String key: rides.keySet()){
ob.put(key, FXCollections.observableArrayList(rides.get(key)));
}
return ob;
}
private Map<String, List<Ride>> convertRideMapToList(Map<String, ObservableList<Ride>> rides){
HashMap<String, List<Ride>> ob = new HashMap<>();
for (String key: rides.keySet()){
ob.put(key, new ArrayList<>(rides.get(key)));
}
return ob;
}
public Map<String, List<Ride>> rideMapSerialised(){
return convertRideMapToList(rides);
}
//////////////////////////////////
//STop
//////////////////////////////////
private Map<String, ObservableList<Stop>> convertStopMapToObserver(Map<String, List<Stop>> stops){
HashMap<String, ObservableList<Stop>> ob = new HashMap<>();
for (String key: stops.keySet()){
ob.put(key, FXCollections.observableArrayList(stops.get(key)));
}
return ob;
}
private Map<String, List<Stop>> convertStopMapToList(Map<String, ObservableList<Stop>> stops){
HashMap<String, List<Stop>> ob = new HashMap<>();
for (String key: stops.keySet()){
ob.put(key, new ArrayList<>(stops.get(key)));
}
return ob;
}
public Map<String, List<Stop>> stopsMapSerialised(){
return convertStopMapToList(stops);
}
//////////////////////////////////
//Route
//////////////////////////////////
private Map<String, ObservableList<Route>> convertRouteMapToObserver(Map<String, List<Route>> routes){
HashMap<String, ObservableList<Route>> ob = new HashMap<>();
for (String key: routes.keySet()){
ob.put(key, FXCollections.observableArrayList(routes.get(key)));
}
return ob;
}
private Map<String, List<Route>> convertRouteMapToList(Map<String, ObservableList<Route>> routes){
HashMap<String, List<Route>> ob = new HashMap<>();
for (String key: routes.keySet()){
ob.put(key, new ArrayList<>(routes.get(key)));
}
return ob;
}
public Map<String, List<Route>> routesMapSerialised(){
return convertRouteMapToList(routes);
}
//////////////////////////////////
//Route
//////////////////////////////////
private Map<String, ObservableList<Trip>> convertTripMapToObserver(Map<String, List<Trip>> trips){
HashMap<String, ObservableList<Trip>> ob = new HashMap<>();
for (String key: trips.keySet()){
ob.put(key, FXCollections.observableArrayList(trips.get(key)));
}
return ob;
}
private Map<String, List<Trip>> convertTripMapToList(Map<String, ObservableList<Trip>> trips){
HashMap<String, List<Trip>> ob = new HashMap<>();
for (String key: trips.keySet()){
ob.put(key, new ArrayList<>(trips.get(key)));
}
return ob;
}
public Map<String, List<Trip>> tripsMapSerialised(){
return convertTripMapToList(trips);
}
//////////////////////////////////
//Route
//////////////////////////////////
private Map<String, ObservableList<SharedTrip>> convertSharedTripMapToObserver(Map<String, List<SharedTrip>> trips){
HashMap<String, ObservableList<SharedTrip>> ob = new HashMap<>();
for (String key: trips.keySet()){
ob.put(key, FXCollections.observableArrayList(trips.get(key)));
}
return ob;
}
private Map<String, List<SharedTrip>> convertSharedTripMapToList(Map<String, ObservableList<SharedTrip>> trips){
HashMap<String, List<SharedTrip>> ob = new HashMap<>();
for (String key: trips.keySet()){
ob.put(key, new ArrayList<>(trips.get(key)));
}
return ob;
}
public Map<String, List<SharedTrip>> sharedTripsMapSerialised(){
return convertSharedTripMapToList(sharedTrips);
}
public void newLogged(){
rides.putIfAbsent(Session.session.getUser().getID(), FXCollections.observableArrayList());
stops.putIfAbsent(Session.session.getUser().getID(), FXCollections.observableArrayList());
routes.putIfAbsent(Session.session.getUser().getID(), FXCollections.observableArrayList());
trips.putIfAbsent(Session.session.getUser().getID(), FXCollections.observableArrayList());
sharedTrips.putIfAbsent(Session.session.getUser().getID(), FXCollections.observableArrayList());
if (Session.session.getUser().bookings == null) {
Session.session.getUser().bookings = new ArrayList<>();
}
notifications.putIfAbsent(Session.session.getUser().getID(), FXCollections.observableArrayList());
//expiry things for Driver
if (Session.session.getUser() instanceof Driver){
String licenseOverdue = ((Driver)Session.session.getUser()).getLicenseNotification();
if (licenseOverdue != null){
notifications.get(Session.session.getUser().getID()).add(licenseOverdue);
}
}
}
//////////////////////////////
//Getters and Setters
//////////////////////////////
public ObservableList<Ride> getRides() { public ObservableList<Ride> getRides() {
return rides; return rides.get(Session.session.getUser().getID());
} }
public void addRides(Ride ride){ public void addRides(Ride ride){
rides.add(ride); rides.get(Session.session.getUser().getID()).add(ride);
} }
public void removeRide(Ride ride){ public void removeRide(Ride ride){
rides.remove(ride); rides.get(Session.session.getUser().getID()).remove(ride);
} }
public void removeRide(int i){ public void removeRide(int i){
rides.remove(i); rides.get(Session.session.getUser().getID()).remove(i);
} }
public ObservableList<Stop> getStops() { public ObservableList<Stop> getStops() {
return stops; return stops.get(Session.session.getUser().getID());
} }
public boolean addStop(Stop stop){ public boolean addStop(Stop stop){
@ -56,50 +202,85 @@ public class DataManager {
return false; return false;
} }
} }
stops.add(stop); stops.get(Session.session.getUser().getID()).add(stop);
return true; return true;
} }
public ObservableList<Route> getRoutes() { public ObservableList<Route> getRoutes() {
return routes; return routes.get(Session.session.getUser().getID());
} }
public boolean addRoute(Route route){ public boolean addRoute(Route route){
for (Route r: routes){ for (Route r: routes.get(Session.session.getUser().getID())){
if (route.equals(r)){ if (route.equals(r)){
return false; return false;
} }
} }
routes.add(route); routes.get(Session.session.getUser().getID()).add(route);
return true; return true;
} }
public ObservableList<Trip> getTrips() { public ObservableList<Trip> getTrips() {
return trips; return trips.get(Session.session.getUser().getID());
} }
public boolean addTrip(Trip trip){ public boolean addTrip(Trip trip){
for (Trip t: trips){ for (Trip t: trips.get(Session.session.getUser().getID())){
if (trip.equals(t)){ if (trip.equals(t)){
return false; return false;
} }
} }
trips.add(trip); trips.get(Session.session.getUser().getID()).add(trip);
return true; return true;
} }
public ObservableList<SharedTrip> getAllSharedTrips(){
ObservableList<SharedTrip> allTrips = FXCollections.observableArrayList();
for (String key: sharedTrips.keySet()){
allTrips.addAll(sharedTrips.get(key));
}
return allTrips;
}
public ObservableList<SharedTrip> getSharedTrips() { public ObservableList<SharedTrip> getSharedTrips() {
return sharedTrips; return sharedTrips.get(Session.session.getUser().getID());
} }
public boolean addSharedTrip(SharedTrip sharedTrip){ public boolean addSharedTrip(SharedTrip sharedTrip){
for (SharedTrip t: sharedTrips){ for (SharedTrip t: sharedTrips.get(Session.session.getUser().getID())){
if (sharedTrip.equals(t)){ if (sharedTrip.equals(t)){
return false; return false;
} }
} }
sharedTrips.add(sharedTrip); sharedTrips.get(Session.session.getUser().getID()).add(sharedTrip);
return true; return true;
} }
public boolean addUser(User user){
if (!users.containsKey(String.valueOf(user.studentNumber))) {
users.put(String.valueOf(user.studentNumber), user);
return true;
}
return false;
}
public Map<String, User> getUsers() {
return users;
}
public boolean addDriver(Driver driver){
if (!drivers.containsKey(String.valueOf(driver.studentNumber))) {
drivers.put(String.valueOf(driver.studentNumber), driver);
return true;
}
return false;
}
public Map<String, Driver> getDrivers() {
return drivers;
}
public Map<String, List<String>> getNotifications() {
return notifications;
}
} }

@ -3,6 +3,7 @@ package model;
import javafx.scene.image.Image; import javafx.scene.image.Image;
import java.awt.image.BufferedImage; import java.awt.image.BufferedImage;
import java.time.LocalDate;
/** /**
* Created by Gondr on 1/06/2017. * Created by Gondr on 1/06/2017.
@ -11,8 +12,9 @@ public class Driver extends User{
protected LicenseType licenseType; protected LicenseType licenseType;
protected String licenseNumber; protected String licenseNumber;
protected String licenseDateIssued; protected LocalDate licenseDateIssued;
protected String licenseDateExpire; protected LocalDate licenseDateExpire;
private LocalDate lastNotified;
public enum LicenseType{ public enum LicenseType{
RESTRICTED("Restricted"), FULL("Full"), FULL2YEARS("Full for 2 Years"); RESTRICTED("Restricted"), FULL("Full"), FULL2YEARS("Full for 2 Years");
@ -21,16 +23,51 @@ public class Driver extends User{
LicenseType(String name){ LicenseType(String name){
this.name = name; this.name = name;
} }
public static LicenseType getValueOf(String s){
switch (s){
case "Restricted":
return RESTRICTED;
case "Full":
return FULL;
case "Full for 2 Years":
return FULL2YEARS;
default:
return null;
}
}
} }
public Driver(int studentNumber, String email, String password, String address, String homephone, String mobilephone, public Driver(int studentNumber, String email, String password, String address, String homephone, String mobilephone,
Image photo, LicenseType licenseType, String licenseNumber, String licenseDateIssued, String licenseDateExpire){ Image photo, LicenseType licenseType, String licenseNumber, LocalDate licenseDateIssued, LocalDate licenseDateExpire){
super(studentNumber, email, password, address, homephone, mobilephone, photo); super(studentNumber, email, password, address, homephone, mobilephone, photo);
this.accountType = AccountType.DRIVER; this.accountType = AccountType.DRIVER;
this.licenseType = licenseType; this.licenseType = licenseType;
this.licenseNumber = licenseNumber; this.licenseNumber = licenseNumber;
this.licenseDateIssued = licenseDateIssued; this.licenseDateIssued = licenseDateIssued;
this.licenseDateExpire = licenseDateExpire; this.licenseDateExpire = licenseDateExpire;
lastNotified = LocalDate.MIN;
}
public String getLicenseNotification(){
if (licenseDateExpire.minusWeeks(4).isBefore(LocalDate.now())){
if (licenseDateExpire.minusWeeks(2).isBefore(LocalDate.now())){
if (licenseDateExpire.minusWeeks(1).isBefore(LocalDate.now())){
if (licenseDateExpire.minusWeeks(1).isAfter(lastNotified)){
lastNotified = LocalDate.now();
return "Your License is expiring in 1 weeks.";
}
}
if (licenseDateExpire.minusWeeks(2).isAfter(lastNotified)){
lastNotified = LocalDate.now();
return "Your License is expiring in 2 weeks.";
}
}
if (licenseDateExpire.minusWeeks(4).isAfter(lastNotified)){
lastNotified = LocalDate.now();
return "Your License is expiring in 4 weeks.";
}
}
return null;
} }
} }

@ -16,7 +16,8 @@ public enum SceneCode {
//screens after login //screens after login
HOME("home"),ADD_RIDE("addride"),MY_RIDES("myrides"), ADD_STOPS("addstops"), MY_STOPS("mystops"), ADD_ROUTE("addroute"), HOME("home"),ADD_RIDE("addride"),MY_RIDES("myrides"), ADD_STOPS("addstops"), MY_STOPS("mystops"), ADD_ROUTE("addroute"),
MY_ROUTES("myroutes"), ADD_TRIP("addtrip"), MY_TRIPS("mytrips"), SHARED_RIDES("sharedtrips"), SEARCH_STOPS("searchstops"), MY_ROUTES("myroutes"), ADD_TRIP("addtrip"), MY_TRIPS("mytrips"), SHARED_RIDES("sharedtrips"), SEARCH_STOPS("searchstops"),
REGISTER("register", false), ADD_PHOTO("addphoto", false); REGISTER("register", false), ADD_PHOTO("addphoto", false), REGISTER_DRIVER("registerdriver", false), MY_SHARED_RIDES("mysharedtrips"),
MY_BOOKINGS("mybookedtrips");
private String path; private String path;
private boolean loadMenu; private boolean loadMenu;

@ -5,7 +5,7 @@ package model;
*/ */
public class Session { public class Session {
private String userCode;//this is like fwy13 private User user;//this is like fwy13
DataManager dataManager; DataManager dataManager;
public static Session session = new Session(); public static Session session = new Session();
@ -14,12 +14,13 @@ public class Session {
dataManager = new DataManager(); dataManager = new DataManager();
} }
public String getUserCode() { public User getUser() {
return userCode; return user;
} }
public void setUserCode(String userCode) { public void setUser(User user) {
this.userCode = userCode; this.user = user;
dataManager.newLogged();
} }
public DataManager getDataManager() { public DataManager getDataManager() {

@ -1,5 +1,7 @@
package model; package model;
import java.time.LocalDate;
/** /**
* Created by Gondr on 28/05/2017. * Created by Gondr on 28/05/2017.
*/ */
@ -7,14 +9,19 @@ public class SharedTrip extends Trip {
private int seatsAvailable; private int seatsAvailable;
private String[] userBookings; protected User[] userBookings;
private LocalDate startDate;
public SharedTrip (Trip trip, int seatsAvailable){ public SharedTrip (Trip trip, int seatsAvailable){
super(trip.name, trip.route, trip.direction, trip.ride, trip.days, trip.reoccur, trip.endDate); super(trip.name, trip.route, trip.direction, trip.ride, trip.days, trip.reoccur, trip.endDate);
userBookings = new String[this.ride.getNumSeats() - 1]; userBookings = new User[this.ride.getNumSeats() - 1];
startDate = LocalDate.now();
this.seatsAvailable = seatsAvailable; this.seatsAvailable = seatsAvailable;
} }
public String getDays(){ public String getDays(){
String daysString = ""; String daysString = "";
for (int i = 0; i < 7; i++){ for (int i = 0; i < 7; i++){
@ -32,11 +39,15 @@ public class SharedTrip extends Trip {
return seatsAvailable; return seatsAvailable;
} }
public void bookSeat(String user){ public void bookSeat(User user){
userBookings[ride.getNumSeats() - seatsAvailable - 1] = user; userBookings[ride.getNumSeats() - seatsAvailable - 1] = user;
seatsAvailable -= 1; seatsAvailable -= 1;
} }
public LocalDate getStartDate(){
return startDate;
}
public boolean isFull(){ public boolean isFull(){
return seatsAvailable == 0; return seatsAvailable == 0;
} }

@ -3,6 +3,7 @@ package model;
import javafx.collections.FXCollections; import javafx.collections.FXCollections;
import javafx.collections.ObservableList; import javafx.collections.ObservableList;
import java.time.LocalDate;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
@ -17,7 +18,7 @@ public class Trip {
public Ride ride; public Ride ride;
public boolean[] days; public boolean[] days;
public boolean reoccur; public boolean reoccur;
public String endDate; public LocalDate endDate;
public String name; public String name;
public static int MONDAY = 0; public static int MONDAY = 0;
@ -64,7 +65,7 @@ public class Trip {
} }
} }
public Trip(String name, ObservableList<TripStop> route, String direction, Ride ride, boolean[] days, boolean reoccur, String endDate){ public Trip(String name, ObservableList<TripStop> route, String direction, Ride ride, boolean[] days, boolean reoccur, LocalDate endDate){
this.name = name; this.name = name;
this.route = route; this.route = route;
this.direction = direction; this.direction = direction;

@ -1,8 +1,13 @@
package model; package model;
import javafx.embed.swing.SwingFXUtils;
import javafx.scene.image.Image; import javafx.scene.image.Image;
import javax.imageio.ImageIO;
import java.awt.image.BufferedImage; import java.awt.image.BufferedImage;
import java.io.*;
import java.util.ArrayList;
import java.util.Arrays;
/** /**
* Created by Gondr on 1/06/2017. * Created by Gondr on 1/06/2017.
@ -15,7 +20,10 @@ public class User {
protected String homephone; protected String homephone;
protected String mobilephone; protected String mobilephone;
protected AccountType accountType; protected AccountType accountType;
protected Image photo; transient protected Image photo;
private byte[] image;
protected String ID;
protected transient ArrayList<SharedTrip> bookings;
public enum AccountType{ public enum AccountType{
PASSENGER("Passenger"), DRIVER("Driver"); PASSENGER("Passenger"), DRIVER("Driver");
@ -23,11 +31,22 @@ public class User {
AccountType(String name){ AccountType(String name){
this.name = name; this.name = name;
} }
public static AccountType getValueOf(String s){
switch(s){
case "Passenger":
return PASSENGER;
case "Driver":
return DRIVER;
default:
return null;
}
}
} }
public User(int studentNumber, String email, String password, String address, String homephone, String mobilephone, public User(int studentNumber, String email, String password, String address, String homephone, String mobilephone,
Image photo){ Image photo){
this.studentNumber = studentNumber; this.studentNumber = studentNumber;
this.ID = String.valueOf(studentNumber);
this.email = email; this.email = email;
this.password = password; this.password = password;
this.address = address; this.address = address;
@ -35,5 +54,65 @@ public class User {
this.mobilephone = mobilephone; this.mobilephone = mobilephone;
this.photo = photo; this.photo = photo;
this.accountType = AccountType.PASSENGER; this.accountType = AccountType.PASSENGER;
bookings = new ArrayList<>();
}
public boolean checkPassword(String p){
return p.equals(password);
}
public int getStudentNumber() {
return studentNumber;
}
public String getID(){
return ID;
}
public void book(SharedTrip trip){
bookings.add(trip);
}
public ArrayList<SharedTrip> getBookings() {
return bookings;
}
public void serialise(){
try {
BufferedImage bi = SwingFXUtils.fromFXImage(photo, null);
ByteArrayOutputStream out = new ByteArrayOutputStream();
ImageIO.write(bi, "png", out);
out.flush();
image = out.toByteArray();
out.close();
} catch (IOException e) {
e.printStackTrace();
}
}
public void populateBookings(){
bookings = new ArrayList<>();
for (SharedTrip s: Session.session.getDataManager().getAllSharedTrips()){
for (User u: s.userBookings){
if (u != null) {
if (u.getStudentNumber() == this.studentNumber) {
this.bookings.add(s);
}
}
}
}
}
public void deserialise(){
ByteArrayInputStream in = new ByteArrayInputStream(image);
BufferedImage bi = null;
try {
bi = ImageIO.read(in);
} catch (IOException e) {
e.printStackTrace();
}
photo = SwingFXUtils.toFXImage(bi, null);
} }
} }

@ -1,5 +1,7 @@
package utils; package utils;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.reflect.TypeToken; import com.google.gson.reflect.TypeToken;
import model.*; import model.*;
@ -7,9 +9,7 @@ import java.io.*;
import java.lang.reflect.Constructor; import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException; import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Type; import java.lang.reflect.Type;
import java.util.ArrayList; import java.util.*;
import java.util.Arrays;
import java.util.List;
/** /**
* Created by Gondr on 19/05/2017. * Created by Gondr on 19/05/2017.
@ -26,17 +26,21 @@ public class DataManagerSerialiser extends Serialiser {
* @return * @return
*/ */
public boolean serialise(DataManager dataManager){ public boolean serialise(DataManager dataManager){
ArrayList<Ride> rides = new ArrayList<>(dataManager.getRides()); //ArrayList<Ride> rides = new ArrayList<>(dataManager.getRides());
ArrayList<Stop> stops = new ArrayList<>(dataManager.getStops()); Map<String, List<Ride>> rides = dataManager.rideMapSerialised();
ArrayList<Route> routes = new ArrayList<>(dataManager.getRoutes()); Map<String, List<Stop>> stops = dataManager.stopsMapSerialised();
ArrayList<Trip> trips = new ArrayList<>(dataManager.getTrips()); Map<String, List<Route>> routes = dataManager.routesMapSerialised();
ArrayList<SharedTrip> sharedTrips = new ArrayList<>(dataManager.getSharedTrips()); Map<String, List<Trip>> trips = dataManager.tripsMapSerialised();
Map<String, List<SharedTrip>> sharedTrips = dataManager.sharedTripsMapSerialised();
boolean serialRidesSuccess = serialise(rides, "serialisation/rides.json"); boolean serialRidesSuccess = serialise(rides, "serialisation/rides.json");
boolean serialStopsSuccess = serialise(stops, "serialisation/stops.json"); boolean serialStopsSuccess = serialise(stops, "serialisation/stops.json");
boolean serialRoutesSuccess = serialiseRoutes(routes, "serialisation/routes.json"); boolean serialRoutesSuccess = serialiseRoutes(routes, "serialisation/routes.json");
boolean serialTripsSuccess = serialiseTrips(trips, "serialisation/trips.json"); boolean serialTripsSuccess = serialiseTrips(trips, "serialisation/trips.json");
boolean serialSharedTripsSuccess = serialiseSharedTrips(sharedTrips, "serialisation/sharedtrips.json"); boolean serialSharedTripsSuccess = serialiseSharedTrips(sharedTrips, "serialisation/sharedtrips.json");
return (serialRidesSuccess && serialStopsSuccess && serialRoutesSuccess && serialTripsSuccess && serialSharedTripsSuccess); boolean serialUsersSuccess = serialiseUsers(dataManager.getUsers(), "serialisation/users.json");
boolean serialDriversSuccess = serialiseDrivers(dataManager.getDrivers(), "serialisation/drivers.json");
boolean serialNotificationsSuccess = serialiseNotifications(dataManager.getNotifications(), "serialisation/notifications.json");
return (serialRidesSuccess && serialStopsSuccess && serialRoutesSuccess && serialTripsSuccess && serialSharedTripsSuccess && serialUsersSuccess && serialDriversSuccess && serialNotificationsSuccess);
} }
/** /**
@ -45,9 +49,12 @@ public class DataManagerSerialiser extends Serialiser {
* @param filepath File path to serialise it to. * @param filepath File path to serialise it to.
* @return * @return
*/ */
public boolean serialiseRoutes(ArrayList<Route> routes, String filepath){ public boolean serialiseRoutes(Map<String, List<Route>> routes, String filepath){
for (Route route: routes){ for(String s: routes.keySet()) {
route.serialise(); List<Route> routeList = routes.get(s);
for (Route route : routeList) {
route.serialise();
}
} }
try{ try{
String path = getClass().getClassLoader().getResource(filepath).getPath(); String path = getClass().getClassLoader().getResource(filepath).getPath();
@ -67,9 +74,12 @@ public class DataManagerSerialiser extends Serialiser {
* @param filepath File path to serialise it to. * @param filepath File path to serialise it to.
* @return * @return
*/ */
public boolean serialiseTrips(ArrayList<Trip> trips, String filepath){ public boolean serialiseTrips(Map<String, List<Trip>> trips, String filepath){
for (Trip trip: trips){ for (String key: trips.keySet()) {
trip.serialise(); List<Trip> tripsList = trips.get(key);
for (Trip trip : tripsList) {
trip.serialise();
}
} }
try{ try{
String path = getClass().getClassLoader().getResource(filepath).getPath(); String path = getClass().getClassLoader().getResource(filepath).getPath();
@ -90,9 +100,12 @@ public class DataManagerSerialiser extends Serialiser {
* @param filepath File path to serialise it to. * @param filepath File path to serialise it to.
* @return * @return
*/ */
public boolean serialiseSharedTrips(ArrayList<SharedTrip> trips, String filepath){ public boolean serialiseSharedTrips(Map<String, List<SharedTrip>> trips, String filepath){
for (Trip trip: trips){ for (String key: trips.keySet()) {
trip.serialise(); List<SharedTrip> tripsList = trips.get(key);
for (Trip trip : tripsList) {
trip.serialise();
}
} }
try{ try{
String path = getClass().getClassLoader().getResource(filepath).getPath(); String path = getClass().getClassLoader().getResource(filepath).getPath();
@ -106,6 +119,51 @@ public class DataManagerSerialiser extends Serialiser {
return true; return true;
} }
public boolean serialiseUsers(Map<String,User> users, String filepath){
for (String key: users.keySet()){
users.get(key).serialise();
}
try{
String path = getClass().getClassLoader().getResource(filepath).getPath();
Writer writer = new OutputStreamWriter(new FileOutputStream(path), "UTF-8");
gson.toJson(users, writer);
writer.close();
} catch (IOException e) {
e.printStackTrace();
return false;
}
return true;
}
public boolean serialiseDrivers(Map<String,Driver> drivers, String filepath){
for (String key: drivers.keySet()){
drivers.get(key).serialise();
}
try{
String path = getClass().getClassLoader().getResource(filepath).getPath();
Writer writer = new OutputStreamWriter(new FileOutputStream(path), "UTF-8");
gson.toJson(drivers, writer);
writer.close();
} catch (IOException e) {
e.printStackTrace();
return false;
}
return true;
}
public boolean serialiseNotifications(Map<String, List<String>> notifications, String filepath){
try{
String path = getClass().getClassLoader().getResource(filepath).getPath();
Writer writer = new OutputStreamWriter(new FileOutputStream(path), "UTF-8");
gson.toJson(notifications, writer);
writer.close();
} catch (IOException e) {
e.printStackTrace();
return false;
}
return true;
}
/** /**
* loads the data manager from file * loads the data manager from file
* @return whether the data was loaded properly or not * @return whether the data was loaded properly or not
@ -117,38 +175,65 @@ public class DataManagerSerialiser extends Serialiser {
*/ */
public DataManager load() throws IOException, NoSuchMethodException, IllegalAccessException, InvocationTargetException, InstantiationException { public DataManager load() throws IOException, NoSuchMethodException, IllegalAccessException, InvocationTargetException, InstantiationException {
Reader reader = new InputStreamReader(getClass().getClassLoader().getResourceAsStream("serialisation/rides.json"), "UTF-8"); Reader reader = new InputStreamReader(getClass().getClassLoader().getResourceAsStream("serialisation/rides.json"), "UTF-8");
ArrayList<Ride> rides = gson.fromJson(reader, new TypeToken<ArrayList<Ride>>(){}.getType()); HashMap<String, List<Ride>> rides = gson.fromJson(reader, new TypeToken<HashMap<String, ArrayList<Ride>>>(){}.getType());
reader.close(); reader.close();
Reader reader2 = new InputStreamReader(getClass().getClassLoader().getResourceAsStream("serialisation/stops.json"), "UTF-8"); Reader reader2 = new InputStreamReader(getClass().getClassLoader().getResourceAsStream("serialisation/stops.json"), "UTF-8");
ArrayList<Stop> stops = gson.fromJson(reader2, new TypeToken<ArrayList<Stop>>(){}.getType()); HashMap<String, List<Stop>> stops = gson.fromJson(reader2, new TypeToken<HashMap<String, ArrayList<Stop>>>(){}.getType());
reader2.close(); reader2.close();
Reader reader3 = new InputStreamReader(getClass().getClassLoader().getResourceAsStream("serialisation/routes.json"), "UTF-8"); Reader reader3 = new InputStreamReader(getClass().getClassLoader().getResourceAsStream("serialisation/routes.json"), "UTF-8");
ArrayList<Route> routes = gson.fromJson(reader3, new TypeToken<ArrayList<Route>>(){}.getType()); HashMap<String, List<Route>> routes = gson.fromJson(reader3, new TypeToken<HashMap<String, ArrayList<Route>>>(){}.getType());
reader3.close(); reader3.close();
for (Route route: routes){ for (String s: routes.keySet()) {
route.deserialise(); List<Route> routeList = routes.get(s);
for (Route route : routeList) {
route.deserialise();
}
} }
Reader reader4 = new InputStreamReader(getClass().getClassLoader().getResourceAsStream("serialisation/trips.json"), "UTF-8"); Reader reader4 = new InputStreamReader(getClass().getClassLoader().getResourceAsStream("serialisation/trips.json"), "UTF-8");
ArrayList<Trip> trips = gson.fromJson(reader4, new TypeToken<ArrayList<Trip>>(){}.getType()); HashMap<String, List<Trip>> trips = gson.fromJson(reader4, new TypeToken<HashMap<String, ArrayList<Trip>>>(){}.getType());
reader4.close(); reader4.close();
for (Trip trip: trips){ for (String key: trips.keySet()) {
trip.deserialise(); List<Trip> tripsList = trips.get(key);
for (Trip trip : tripsList) {
trip.deserialise();
}
} }
Reader reader5 = new InputStreamReader(getClass().getClassLoader().getResourceAsStream("serialisation/sharedtrips.json"), "UTF-8"); Reader reader5 = new InputStreamReader(getClass().getClassLoader().getResourceAsStream("serialisation/sharedtrips.json"), "UTF-8");
ArrayList<SharedTrip> sharedTrips = gson.fromJson(reader5, new TypeToken<ArrayList<SharedTrip>>(){}.getType()); HashMap<String, List<SharedTrip>> sharedTrips = gson.fromJson(reader5, new TypeToken<HashMap<String, ArrayList<SharedTrip>>>(){}.getType());
reader5.close(); reader5.close();
for (SharedTrip trip: sharedTrips){ for (String key: sharedTrips.keySet()) {
trip.deserialise(); List<SharedTrip> sharedTripList = sharedTrips.get(key);
for (SharedTrip trip : sharedTripList) {
trip.deserialise();
}
} }
return new DataManager(rides, stops, routes, trips, sharedTrips); Reader reader6 = new InputStreamReader(getClass().getClassLoader().getResourceAsStream("serialisation/users.json"), "UTF-8");
HashMap<String, User> users = gson.fromJson(reader6, new TypeToken<HashMap<String, User>>(){}.getType());
reader6.close();
for (String userkey: users.keySet()){
users.get(userkey).deserialise();
}
Reader reader7 = new InputStreamReader(getClass().getClassLoader().getResourceAsStream("serialisation/drivers.json"), "UTF-8");
HashMap<String, Driver> drivers = gson.fromJson(reader7, new TypeToken<HashMap<String, Driver>>(){}.getType());
reader7.close();
for (String driverkey: drivers.keySet()){
drivers.get(driverkey).deserialise();
}
Reader reader8 = new InputStreamReader(getClass().getClassLoader().getResourceAsStream("serialisation/notifications.json"), "UTF-8");
HashMap<String, List<String>> notifications = gson.fromJson(reader8, new TypeToken<HashMap<String, List<String>>>(){}.getType());
reader8.close();
return new DataManager(rides, stops, routes, trips, sharedTrips, users, drivers, notifications);
} }
} }

@ -7,6 +7,7 @@ import com.google.gson.reflect.TypeToken;
import java.io.*; import java.io.*;
import java.lang.reflect.Type; import java.lang.reflect.Type;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
@ -28,4 +29,17 @@ public abstract class Serialiser {
return true; return true;
} }
protected boolean serialise(Map map, String filepath){
try{
String path = getClass().getClassLoader().getResource(filepath).getPath();
Writer writer = new OutputStreamWriter(new FileOutputStream(path), "UTF-8");
gson.toJson(map, writer);
writer.close();
} catch (IOException e) {
e.printStackTrace();
return false;
}
return true;
}
} }

@ -57,11 +57,21 @@
<Button mnemonicParsing="false" onAction="#sharedRides" text="Shared Rides" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" /> <Button mnemonicParsing="false" onAction="#sharedRides" text="Shared Rides" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" />
</children> </children>
</AnchorPane> </AnchorPane>
<AnchorPane prefHeight="200.0" prefWidth="200.0"> <AnchorPane>
<children> <children>
<Button mnemonicParsing="false" onAction="#searchStops" text="Search Stops" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" /> <Button mnemonicParsing="false" onAction="#searchStops" text="Search Stops" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" />
</children> </children>
</AnchorPane> </AnchorPane>
<AnchorPane>
<children>
<Button mnemonicParsing="false" onAction="#mySharedRides" text="My Shared Rides" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" />
</children>
</AnchorPane>
<AnchorPane>
<children>
<Button mnemonicParsing="false" onAction="#myBookings" text="My Bookings" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" />
</children>
</AnchorPane>
</children> </children>
</VBox> </VBox>
</children> </children>

@ -23,8 +23,7 @@
<RowConstraints minHeight="10.0" vgrow="SOMETIMES" /> <RowConstraints minHeight="10.0" vgrow="SOMETIMES" />
<RowConstraints maxHeight="80.0" minHeight="10.0" prefHeight="80.0" vgrow="SOMETIMES" /> <RowConstraints maxHeight="80.0" minHeight="10.0" prefHeight="80.0" vgrow="SOMETIMES" />
<RowConstraints maxHeight="80.0" minHeight="10.0" prefHeight="80.0" vgrow="SOMETIMES" /> <RowConstraints maxHeight="80.0" minHeight="10.0" prefHeight="80.0" vgrow="SOMETIMES" />
<RowConstraints maxHeight="80.0" minHeight="10.0" prefHeight="80.0" vgrow="SOMETIMES" /> <RowConstraints maxHeight="120.0" minHeight="10.0" prefHeight="120.0" vgrow="SOMETIMES" />
<RowConstraints maxHeight="80.0" minHeight="10.0" prefHeight="80.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" vgrow="SOMETIMES" /> <RowConstraints minHeight="10.0" vgrow="SOMETIMES" />
</rowConstraints> </rowConstraints>
<children> <children>
@ -47,6 +46,7 @@
<rowConstraints> <rowConstraints>
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
</rowConstraints> </rowConstraints>
<children> <children>
<Label text="Username:" /> <Label text="Username:" />
@ -55,9 +55,10 @@
<PasswordField fx:id="password" GridPane.columnIndex="1" GridPane.rowIndex="1" /> <PasswordField fx:id="password" GridPane.columnIndex="1" GridPane.rowIndex="1" />
<Button mnemonicParsing="false" onAction="#login" text="Login" GridPane.columnIndex="2" GridPane.halignment="CENTER" GridPane.valignment="CENTER" /> <Button mnemonicParsing="false" onAction="#login" text="Login" GridPane.columnIndex="2" GridPane.halignment="CENTER" GridPane.valignment="CENTER" />
<Button mnemonicParsing="false" onAction="#register" text="Register" GridPane.columnIndex="2" GridPane.halignment="CENTER" GridPane.rowIndex="1" GridPane.valignment="CENTER" /> <Button mnemonicParsing="false" onAction="#register" text="Register" GridPane.columnIndex="2" GridPane.halignment="CENTER" GridPane.rowIndex="1" GridPane.valignment="CENTER" />
<Label text="Login As:" GridPane.rowIndex="2" />
<ComboBox fx:id="accountType" prefWidth="150.0" GridPane.columnIndex="1" GridPane.rowIndex="2" />
</children> </children>
</GridPane> </GridPane>
<Label text="Note for now as long as the username is the same as the password the application will work." GridPane.columnSpan="2147483647" GridPane.halignment="CENTER" GridPane.rowIndex="4" />
</children> </children>
</GridPane> </GridPane>
</children> </children>

@ -0,0 +1,129 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.geometry.*?>
<?import javafx.scene.text.*?>
<?import javafx.scene.control.*?>
<?import java.lang.*?>
<?import javafx.scene.layout.*?>
<AnchorPane prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="controllers.MyBookingsController">
<children>
<GridPane layoutX="213.0" layoutY="99.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="300.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="300.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="300.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints maxHeight="50.0" minHeight="50.0" prefHeight="50.0" vgrow="SOMETIMES" />
<RowConstraints maxHeight="40.0" minHeight="40.0" prefHeight="40.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="348.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<ListView fx:id="tripsList" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefHeight="200.0" prefWidth="200.0" GridPane.rowIndex="2" />
<Label text="My Bookings" GridPane.columnSpan="3" GridPane.halignment="CENTER">
<font>
<Font size="18.0" />
</font>
</Label>
<Label text="Trips" GridPane.halignment="CENTER" GridPane.rowIndex="1">
<font>
<Font size="16.0" />
</font>
</Label>
<Label text="Stops" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.rowIndex="1">
<font>
<Font size="16.0" />
</font>
</Label>
<TableView fx:id="stopsList" prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="1" GridPane.rowIndex="2">
<columns>
<TableColumn fx:id="stopTimeColumn" prefWidth="104.0" text="Time" />
<TableColumn fx:id="stopNameColumn" prefWidth="95.0" text="Stop" />
</columns>
</TableView>
<Label text="Information" GridPane.columnIndex="2" GridPane.halignment="CENTER" GridPane.rowIndex="1">
<font>
<Font size="16.0" />
</font>
</Label>
<GridPane GridPane.columnIndex="2" GridPane.rowIndex="2">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" maxWidth="80.0" minWidth="10.0" prefWidth="80.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<Label text="Ride:" />
<Label fx:id="rideLabel" text="Label" GridPane.columnIndex="1" />
<Label text="Direction:" GridPane.rowIndex="1" />
<Label fx:id="directionLabel" text="Label" GridPane.columnIndex="1" GridPane.rowIndex="1" />
<Label text="Days:" GridPane.rowIndex="2" />
<Label text="Reoccuring:" GridPane.rowIndex="3" />
<Label text="Trip End Date:" GridPane.rowIndex="4" />
<Label fx:id="reoccuringLabel" text="Label" GridPane.columnIndex="1" GridPane.rowIndex="3" />
<Label fx:id="endDateLabel" text="Label" GridPane.columnIndex="1" GridPane.rowIndex="4" />
<HBox alignment="CENTER_LEFT" prefHeight="100.0" prefWidth="200.0" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.rowIndex="2" GridPane.valignment="CENTER">
<children>
<Label fx:id="sundayLabel" style="-fx-border-color: #F0F0F0; -fx-border-width: 1;" text="S">
<padding>
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
</padding>
</Label>
<Label fx:id="mondayLabel" style="-fx-border-color: #F0F0F0; -fx-border-width: 1;" text="M" AnchorPane.bottomAnchor="23.0" AnchorPane.topAnchor="22.0">
<HBox.margin>
<Insets />
</HBox.margin>
<padding>
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
</padding>
</Label>
<Label fx:id="tuesdayLabel" style="-fx-border-color: #F0F0F0; -fx-border-width: 1;" text="T">
<padding>
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
</padding>
</Label>
<Label fx:id="wednesdayLabel" style="-fx-border-color: #F0F0F0; -fx-border-width: 1;" text="W">
<padding>
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
</padding>
</Label>
<Label fx:id="thursdayLabel" style="-fx-border-color: #F0F0F0; -fx-border-width: 1;" text="T">
<padding>
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
</padding>
</Label>
<Label fx:id="fridayLabel" style="-fx-border-color: #F0F0F0; -fx-border-width: 1;" text="F">
<padding>
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
</padding>
</Label>
<Label fx:id="saturdayLabel" style="-fx-border-color: #F0F0F0; -fx-border-width: 1;" text="S">
<padding>
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
</padding>
</Label>
</children>
</HBox>
<AnchorPane GridPane.columnSpan="2" GridPane.rowIndex="6">
<children>
<Button mnemonicParsing="false" onAction="#cancelRide" text="Cancel Ride" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" GridPane.rowIndex="5" />
</children>
</AnchorPane>
</children>
<GridPane.margin>
<Insets left="10.0" right="10.0" />
</GridPane.margin>
</GridPane>
</children>
</GridPane>
</children>
</AnchorPane>

@ -0,0 +1,129 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.geometry.*?>
<?import javafx.scene.text.*?>
<?import javafx.scene.control.*?>
<?import java.lang.*?>
<?import javafx.scene.layout.*?>
<AnchorPane prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="controllers.MySharedTripsController">
<children>
<GridPane layoutX="213.0" layoutY="99.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="300.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="300.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="300.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints maxHeight="50.0" minHeight="50.0" prefHeight="50.0" vgrow="SOMETIMES" />
<RowConstraints maxHeight="40.0" minHeight="40.0" prefHeight="40.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="348.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<ListView fx:id="tripsList" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefHeight="200.0" prefWidth="200.0" GridPane.rowIndex="2" />
<Label text="My Trips" GridPane.columnSpan="3" GridPane.halignment="CENTER">
<font>
<Font size="18.0" />
</font>
</Label>
<Label text="Trips" GridPane.halignment="CENTER" GridPane.rowIndex="1">
<font>
<Font size="16.0" />
</font>
</Label>
<Label text="Stops" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.rowIndex="1">
<font>
<Font size="16.0" />
</font>
</Label>
<TableView fx:id="stopsList" prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="1" GridPane.rowIndex="2">
<columns>
<TableColumn fx:id="stopTimeColumn" prefWidth="104.0" text="Time" />
<TableColumn fx:id="stopNameColumn" prefWidth="95.0" text="Stop" />
</columns>
</TableView>
<Label text="Information" GridPane.columnIndex="2" GridPane.halignment="CENTER" GridPane.rowIndex="1">
<font>
<Font size="16.0" />
</font>
</Label>
<GridPane GridPane.columnIndex="2" GridPane.rowIndex="2">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" maxWidth="80.0" minWidth="10.0" prefWidth="80.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<Label text="Ride:" />
<Label fx:id="rideLabel" text="Label" GridPane.columnIndex="1" />
<Label text="Direction:" GridPane.rowIndex="1" />
<Label fx:id="directionLabel" text="Label" GridPane.columnIndex="1" GridPane.rowIndex="1" />
<Label text="Days:" GridPane.rowIndex="2" />
<Label text="Reoccuring:" GridPane.rowIndex="3" />
<Label text="Trip End Date:" GridPane.rowIndex="4" />
<Label fx:id="reoccuringLabel" text="Label" GridPane.columnIndex="1" GridPane.rowIndex="3" />
<Label fx:id="endDateLabel" text="Label" GridPane.columnIndex="1" GridPane.rowIndex="4" />
<HBox alignment="CENTER_LEFT" prefHeight="100.0" prefWidth="200.0" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.rowIndex="2" GridPane.valignment="CENTER">
<children>
<Label fx:id="sundayLabel" style="-fx-border-color: #F0F0F0; -fx-border-width: 1;" text="S">
<padding>
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
</padding>
</Label>
<Label fx:id="mondayLabel" style="-fx-border-color: #F0F0F0; -fx-border-width: 1;" text="M" AnchorPane.bottomAnchor="23.0" AnchorPane.topAnchor="22.0">
<HBox.margin>
<Insets />
</HBox.margin>
<padding>
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
</padding>
</Label>
<Label fx:id="tuesdayLabel" style="-fx-border-color: #F0F0F0; -fx-border-width: 1;" text="T">
<padding>
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
</padding>
</Label>
<Label fx:id="wednesdayLabel" style="-fx-border-color: #F0F0F0; -fx-border-width: 1;" text="W">
<padding>
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
</padding>
</Label>
<Label fx:id="thursdayLabel" style="-fx-border-color: #F0F0F0; -fx-border-width: 1;" text="T">
<padding>
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
</padding>
</Label>
<Label fx:id="fridayLabel" style="-fx-border-color: #F0F0F0; -fx-border-width: 1;" text="F">
<padding>
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
</padding>
</Label>
<Label fx:id="saturdayLabel" style="-fx-border-color: #F0F0F0; -fx-border-width: 1;" text="S">
<padding>
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
</padding>
</Label>
</children>
</HBox>
<AnchorPane GridPane.columnSpan="2" GridPane.rowIndex="6">
<children>
<Button mnemonicParsing="false" onAction="#cancelRide" text="Share This Ride" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" GridPane.rowIndex="5" />
</children>
</AnchorPane>
</children>
<GridPane.margin>
<Insets left="10.0" right="10.0" />
</GridPane.margin>
</GridPane>
</children>
</GridPane>
</children>
</AnchorPane>

@ -0,0 +1,61 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import java.lang.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<?import javafx.scene.text.*?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.ColumnConstraints?>
<?import javafx.scene.layout.GridPane?>
<?import javafx.scene.layout.RowConstraints?>
<?import javafx.scene.text.Font?>
<AnchorPane xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="controllers.RegisterDriverController">
<children>
<GridPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" maxWidth="1.7976931348623157E308" minWidth="0.0" prefWidth="75.0" />
<ColumnConstraints hgrow="SOMETIMES" />
<ColumnConstraints hgrow="SOMETIMES" maxWidth="1.7976931348623157E308" minWidth="0.0" prefWidth="75.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints minHeight="10.0" vgrow="SOMETIMES" />
<RowConstraints maxHeight="60.0" minHeight="10.0" prefHeight="60.0" vgrow="SOMETIMES" />
<RowConstraints maxHeight="300.0" minHeight="10.0" prefHeight="300.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<Label text="Register for UC Ride Sharing System" GridPane.columnSpan="3" GridPane.halignment="CENTER" GridPane.rowIndex="1">
<font>
<Font size="22.0" />
</font>
</Label>
<GridPane GridPane.columnIndex="1" GridPane.rowIndex="2">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" maxWidth="1.7976931348623157E308" minWidth="10.0" prefWidth="120.0" />
<ColumnConstraints hgrow="SOMETIMES" maxWidth="1.7976931348623157E308" minWidth="10.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<Label text="License Type:" />
<ComboBox fx:id="licenseType" prefWidth="150.0" GridPane.columnIndex="1" />
<Label text="License Number:" GridPane.rowIndex="1" />
<TextField fx:id="number" GridPane.columnIndex="1" GridPane.rowIndex="1" />
<Label text="Issue Date:" GridPane.rowIndex="2" />
<Label text="Expiry Date:" GridPane.rowIndex="3" />
<Button mnemonicParsing="false" onAction="#createAccount" text="Finish" GridPane.columnIndex="1" GridPane.halignment="RIGHT" GridPane.rowIndex="4" />
<DatePicker fx:id="issue" GridPane.columnIndex="1" GridPane.rowIndex="2" />
<DatePicker fx:id="expiry" GridPane.columnIndex="1" GridPane.rowIndex="3" />
</children>
</GridPane>
</children>
</GridPane>
</children>
</AnchorPane>

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -57,11 +57,21 @@
<Button mnemonicParsing="false" onAction="#sharedRides" text="Shared Rides" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" /> <Button mnemonicParsing="false" onAction="#sharedRides" text="Shared Rides" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" />
</children> </children>
</AnchorPane> </AnchorPane>
<AnchorPane prefHeight="200.0" prefWidth="200.0"> <AnchorPane>
<children> <children>
<Button mnemonicParsing="false" onAction="#searchStops" text="Search Stops" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" /> <Button mnemonicParsing="false" onAction="#searchStops" text="Search Stops" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" />
</children> </children>
</AnchorPane> </AnchorPane>
<AnchorPane>
<children>
<Button mnemonicParsing="false" onAction="#mySharedRides" text="My Shared Rides" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" />
</children>
</AnchorPane>
<AnchorPane>
<children>
<Button mnemonicParsing="false" onAction="#myBookings" text="My Bookings" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" />
</children>
</AnchorPane>
</children> </children>
</VBox> </VBox>
</children> </children>

@ -23,8 +23,7 @@
<RowConstraints minHeight="10.0" vgrow="SOMETIMES" /> <RowConstraints minHeight="10.0" vgrow="SOMETIMES" />
<RowConstraints maxHeight="80.0" minHeight="10.0" prefHeight="80.0" vgrow="SOMETIMES" /> <RowConstraints maxHeight="80.0" minHeight="10.0" prefHeight="80.0" vgrow="SOMETIMES" />
<RowConstraints maxHeight="80.0" minHeight="10.0" prefHeight="80.0" vgrow="SOMETIMES" /> <RowConstraints maxHeight="80.0" minHeight="10.0" prefHeight="80.0" vgrow="SOMETIMES" />
<RowConstraints maxHeight="80.0" minHeight="10.0" prefHeight="80.0" vgrow="SOMETIMES" /> <RowConstraints maxHeight="120.0" minHeight="10.0" prefHeight="120.0" vgrow="SOMETIMES" />
<RowConstraints maxHeight="80.0" minHeight="10.0" prefHeight="80.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" vgrow="SOMETIMES" /> <RowConstraints minHeight="10.0" vgrow="SOMETIMES" />
</rowConstraints> </rowConstraints>
<children> <children>
@ -47,6 +46,7 @@
<rowConstraints> <rowConstraints>
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
</rowConstraints> </rowConstraints>
<children> <children>
<Label text="Username:" /> <Label text="Username:" />
@ -55,9 +55,10 @@
<PasswordField fx:id="password" GridPane.columnIndex="1" GridPane.rowIndex="1" /> <PasswordField fx:id="password" GridPane.columnIndex="1" GridPane.rowIndex="1" />
<Button mnemonicParsing="false" onAction="#login" text="Login" GridPane.columnIndex="2" GridPane.halignment="CENTER" GridPane.valignment="CENTER" /> <Button mnemonicParsing="false" onAction="#login" text="Login" GridPane.columnIndex="2" GridPane.halignment="CENTER" GridPane.valignment="CENTER" />
<Button mnemonicParsing="false" onAction="#register" text="Register" GridPane.columnIndex="2" GridPane.halignment="CENTER" GridPane.rowIndex="1" GridPane.valignment="CENTER" /> <Button mnemonicParsing="false" onAction="#register" text="Register" GridPane.columnIndex="2" GridPane.halignment="CENTER" GridPane.rowIndex="1" GridPane.valignment="CENTER" />
<Label text="Login As:" GridPane.rowIndex="2" />
<ComboBox fx:id="accountType" prefWidth="150.0" GridPane.columnIndex="1" GridPane.rowIndex="2" />
</children> </children>
</GridPane> </GridPane>
<Label text="Note for now as long as the username is the same as the password the application will work." GridPane.columnSpan="2147483647" GridPane.halignment="CENTER" GridPane.rowIndex="4" />
</children> </children>
</GridPane> </GridPane>
</children> </children>

@ -0,0 +1,129 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.geometry.*?>
<?import javafx.scene.text.*?>
<?import javafx.scene.control.*?>
<?import java.lang.*?>
<?import javafx.scene.layout.*?>
<AnchorPane prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="controllers.MyBookingsController">
<children>
<GridPane layoutX="213.0" layoutY="99.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="300.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="300.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="300.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints maxHeight="50.0" minHeight="50.0" prefHeight="50.0" vgrow="SOMETIMES" />
<RowConstraints maxHeight="40.0" minHeight="40.0" prefHeight="40.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="348.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<ListView fx:id="tripsList" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefHeight="200.0" prefWidth="200.0" GridPane.rowIndex="2" />
<Label text="My Bookings" GridPane.columnSpan="3" GridPane.halignment="CENTER">
<font>
<Font size="18.0" />
</font>
</Label>
<Label text="Trips" GridPane.halignment="CENTER" GridPane.rowIndex="1">
<font>
<Font size="16.0" />
</font>
</Label>
<Label text="Stops" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.rowIndex="1">
<font>
<Font size="16.0" />
</font>
</Label>
<TableView fx:id="stopsList" prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="1" GridPane.rowIndex="2">
<columns>
<TableColumn fx:id="stopTimeColumn" prefWidth="104.0" text="Time" />
<TableColumn fx:id="stopNameColumn" prefWidth="95.0" text="Stop" />
</columns>
</TableView>
<Label text="Information" GridPane.columnIndex="2" GridPane.halignment="CENTER" GridPane.rowIndex="1">
<font>
<Font size="16.0" />
</font>
</Label>
<GridPane GridPane.columnIndex="2" GridPane.rowIndex="2">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" maxWidth="80.0" minWidth="10.0" prefWidth="80.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<Label text="Ride:" />
<Label fx:id="rideLabel" text="Label" GridPane.columnIndex="1" />
<Label text="Direction:" GridPane.rowIndex="1" />
<Label fx:id="directionLabel" text="Label" GridPane.columnIndex="1" GridPane.rowIndex="1" />
<Label text="Days:" GridPane.rowIndex="2" />
<Label text="Reoccuring:" GridPane.rowIndex="3" />
<Label text="Trip End Date:" GridPane.rowIndex="4" />
<Label fx:id="reoccuringLabel" text="Label" GridPane.columnIndex="1" GridPane.rowIndex="3" />
<Label fx:id="endDateLabel" text="Label" GridPane.columnIndex="1" GridPane.rowIndex="4" />
<HBox alignment="CENTER_LEFT" prefHeight="100.0" prefWidth="200.0" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.rowIndex="2" GridPane.valignment="CENTER">
<children>
<Label fx:id="sundayLabel" style="-fx-border-color: #F0F0F0; -fx-border-width: 1;" text="S">
<padding>
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
</padding>
</Label>
<Label fx:id="mondayLabel" style="-fx-border-color: #F0F0F0; -fx-border-width: 1;" text="M" AnchorPane.bottomAnchor="23.0" AnchorPane.topAnchor="22.0">
<HBox.margin>
<Insets />
</HBox.margin>
<padding>
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
</padding>
</Label>
<Label fx:id="tuesdayLabel" style="-fx-border-color: #F0F0F0; -fx-border-width: 1;" text="T">
<padding>
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
</padding>
</Label>
<Label fx:id="wednesdayLabel" style="-fx-border-color: #F0F0F0; -fx-border-width: 1;" text="W">
<padding>
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
</padding>
</Label>
<Label fx:id="thursdayLabel" style="-fx-border-color: #F0F0F0; -fx-border-width: 1;" text="T">
<padding>
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
</padding>
</Label>
<Label fx:id="fridayLabel" style="-fx-border-color: #F0F0F0; -fx-border-width: 1;" text="F">
<padding>
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
</padding>
</Label>
<Label fx:id="saturdayLabel" style="-fx-border-color: #F0F0F0; -fx-border-width: 1;" text="S">
<padding>
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
</padding>
</Label>
</children>
</HBox>
<AnchorPane GridPane.columnSpan="2" GridPane.rowIndex="6">
<children>
<Button mnemonicParsing="false" onAction="#cancelRide" text="Cancel Ride" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" GridPane.rowIndex="5" />
</children>
</AnchorPane>
</children>
<GridPane.margin>
<Insets left="10.0" right="10.0" />
</GridPane.margin>
</GridPane>
</children>
</GridPane>
</children>
</AnchorPane>

@ -0,0 +1,129 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.geometry.*?>
<?import javafx.scene.text.*?>
<?import javafx.scene.control.*?>
<?import java.lang.*?>
<?import javafx.scene.layout.*?>
<AnchorPane prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="controllers.MySharedTripsController">
<children>
<GridPane layoutX="213.0" layoutY="99.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="300.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="300.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="300.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints maxHeight="50.0" minHeight="50.0" prefHeight="50.0" vgrow="SOMETIMES" />
<RowConstraints maxHeight="40.0" minHeight="40.0" prefHeight="40.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="348.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<ListView fx:id="tripsList" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefHeight="200.0" prefWidth="200.0" GridPane.rowIndex="2" />
<Label text="My Trips" GridPane.columnSpan="3" GridPane.halignment="CENTER">
<font>
<Font size="18.0" />
</font>
</Label>
<Label text="Trips" GridPane.halignment="CENTER" GridPane.rowIndex="1">
<font>
<Font size="16.0" />
</font>
</Label>
<Label text="Stops" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.rowIndex="1">
<font>
<Font size="16.0" />
</font>
</Label>
<TableView fx:id="stopsList" prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="1" GridPane.rowIndex="2">
<columns>
<TableColumn fx:id="stopTimeColumn" prefWidth="104.0" text="Time" />
<TableColumn fx:id="stopNameColumn" prefWidth="95.0" text="Stop" />
</columns>
</TableView>
<Label text="Information" GridPane.columnIndex="2" GridPane.halignment="CENTER" GridPane.rowIndex="1">
<font>
<Font size="16.0" />
</font>
</Label>
<GridPane GridPane.columnIndex="2" GridPane.rowIndex="2">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" maxWidth="80.0" minWidth="10.0" prefWidth="80.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<Label text="Ride:" />
<Label fx:id="rideLabel" text="Label" GridPane.columnIndex="1" />
<Label text="Direction:" GridPane.rowIndex="1" />
<Label fx:id="directionLabel" text="Label" GridPane.columnIndex="1" GridPane.rowIndex="1" />
<Label text="Days:" GridPane.rowIndex="2" />
<Label text="Reoccuring:" GridPane.rowIndex="3" />
<Label text="Trip End Date:" GridPane.rowIndex="4" />
<Label fx:id="reoccuringLabel" text="Label" GridPane.columnIndex="1" GridPane.rowIndex="3" />
<Label fx:id="endDateLabel" text="Label" GridPane.columnIndex="1" GridPane.rowIndex="4" />
<HBox alignment="CENTER_LEFT" prefHeight="100.0" prefWidth="200.0" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.rowIndex="2" GridPane.valignment="CENTER">
<children>
<Label fx:id="sundayLabel" style="-fx-border-color: #F0F0F0; -fx-border-width: 1;" text="S">
<padding>
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
</padding>
</Label>
<Label fx:id="mondayLabel" style="-fx-border-color: #F0F0F0; -fx-border-width: 1;" text="M" AnchorPane.bottomAnchor="23.0" AnchorPane.topAnchor="22.0">
<HBox.margin>
<Insets />
</HBox.margin>
<padding>
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
</padding>
</Label>
<Label fx:id="tuesdayLabel" style="-fx-border-color: #F0F0F0; -fx-border-width: 1;" text="T">
<padding>
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
</padding>
</Label>
<Label fx:id="wednesdayLabel" style="-fx-border-color: #F0F0F0; -fx-border-width: 1;" text="W">
<padding>
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
</padding>
</Label>
<Label fx:id="thursdayLabel" style="-fx-border-color: #F0F0F0; -fx-border-width: 1;" text="T">
<padding>
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
</padding>
</Label>
<Label fx:id="fridayLabel" style="-fx-border-color: #F0F0F0; -fx-border-width: 1;" text="F">
<padding>
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
</padding>
</Label>
<Label fx:id="saturdayLabel" style="-fx-border-color: #F0F0F0; -fx-border-width: 1;" text="S">
<padding>
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
</padding>
</Label>
</children>
</HBox>
<AnchorPane GridPane.columnSpan="2" GridPane.rowIndex="6">
<children>
<Button mnemonicParsing="false" onAction="#cancelRide" text="Share This Ride" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" GridPane.rowIndex="5" />
</children>
</AnchorPane>
</children>
<GridPane.margin>
<Insets left="10.0" right="10.0" />
</GridPane.margin>
</GridPane>
</children>
</GridPane>
</children>
</AnchorPane>

@ -0,0 +1,61 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import java.lang.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<?import javafx.scene.text.*?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.ColumnConstraints?>
<?import javafx.scene.layout.GridPane?>
<?import javafx.scene.layout.RowConstraints?>
<?import javafx.scene.text.Font?>
<AnchorPane xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="controllers.RegisterDriverController">
<children>
<GridPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" maxWidth="1.7976931348623157E308" minWidth="0.0" prefWidth="75.0" />
<ColumnConstraints hgrow="SOMETIMES" />
<ColumnConstraints hgrow="SOMETIMES" maxWidth="1.7976931348623157E308" minWidth="0.0" prefWidth="75.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints minHeight="10.0" vgrow="SOMETIMES" />
<RowConstraints maxHeight="60.0" minHeight="10.0" prefHeight="60.0" vgrow="SOMETIMES" />
<RowConstraints maxHeight="300.0" minHeight="10.0" prefHeight="300.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<Label text="Register for UC Ride Sharing System" GridPane.columnSpan="3" GridPane.halignment="CENTER" GridPane.rowIndex="1">
<font>
<Font size="22.0" />
</font>
</Label>
<GridPane GridPane.columnIndex="1" GridPane.rowIndex="2">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" maxWidth="1.7976931348623157E308" minWidth="10.0" prefWidth="120.0" />
<ColumnConstraints hgrow="SOMETIMES" maxWidth="1.7976931348623157E308" minWidth="10.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<Label text="License Type:" />
<ComboBox fx:id="licenseType" prefWidth="150.0" GridPane.columnIndex="1" />
<Label text="License Number:" GridPane.rowIndex="1" />
<TextField fx:id="number" GridPane.columnIndex="1" GridPane.rowIndex="1" />
<Label text="Issue Date:" GridPane.rowIndex="2" />
<Label text="Expiry Date:" GridPane.rowIndex="3" />
<Button mnemonicParsing="false" onAction="#createAccount" text="Finish" GridPane.columnIndex="1" GridPane.halignment="RIGHT" GridPane.rowIndex="4" />
<DatePicker fx:id="issue" GridPane.columnIndex="1" GridPane.rowIndex="2" />
<DatePicker fx:id="expiry" GridPane.columnIndex="1" GridPane.rowIndex="3" />
</children>
</GridPane>
</children>
</GridPane>
</children>
</AnchorPane>

File diff suppressed because one or more lines are too long

@ -1 +1 @@
[{"model":"Nissan March","colour":"Baby Blue","licensePlate":"EPU001","year":2004,"numSeats":5}] {"79984862":[{"model":"Nissan March","colour":"Baby Blue","licensePlate":"EPU001","year":2004,"numSeats":5}]}

@ -1 +1 @@
[{"name":"Home to University","serialisedStops":[{"address":"1 Avonhead Road"},{"address":"1 University Drive"}]},{"name":"Friends Route","serialisedStops":[{"address":"100 Yaldhurst Road"},{"address":"120 Maidstone Road"},{"address":"1 Homestead Lane"}]}] {"79984862":[{"name":"Home to University","serialisedStops":[{"address":"1 Avonhead Road"},{"address":"1 University Drive"}]},{"name":"Friends Route","serialisedStops":[{"address":"100 Yaldhurst Road"},{"address":"120 Maidstone Road"},{"address":"1 Homestead Lane"}]}]}

@ -1 +1 @@
[{"seatsAvailable":0,"userBookings":["a","a","a","a"],"serialisedRoute":[{"serialiseTime":"9:00","serialiseName":"1 Avonhead Road"},{"serialiseTime":"9:15","serialiseName":"1 University Drive"}],"direction":"University","ride":{"model":"Nissan March","colour":"Baby Blue","licensePlate":"EPU001","year":2004,"numSeats":5},"days":[false,true,true,false,true,false,false],"reoccur":true,"endDate":"30-12-2017","name":"Home to Uni"}] {"79984862":[{"seatsAvailable":3,"userBookings":[{"studentNumber":79984862,"email":"fwy13@uclive.ac.nz","password":"123456","address":"90 Stables Street","homephone":"033466057","mobilephone":"+642726242114","accountType":"DRIVER","ID":"79984862"},null,null,null],"startDate":{"year":2017,"month":6,"day":2},"serialisedRoute":[{"serialiseTime":"9:00","serialiseName":"1 Avonhead Road"},{"serialiseTime":"9:15","serialiseName":"1 University Drive"}],"direction":"University","ride":{"model":"Nissan March","colour":"Baby Blue","licensePlate":"EPU001","year":2004,"numSeats":5},"days":[false,true,true,false,true,false,false],"reoccur":true,"endDate":{"year":2017,"month":12,"day":30},"name":"Home to Uni"}]}

@ -1 +1 @@
[{"address":"1 Avonhead Road"},{"address":"100 Yaldhurst Road"},{"address":"120 Maidstone Road"},{"address":"1 University Drive"},{"address":"1 Homestead Lane"}] {"79984862":[{"address":"1 Avonhead Road"},{"address":"100 Yaldhurst Road"},{"address":"120 Maidstone Road"},{"address":"1 University Drive"},{"address":"1 Homestead Lane"}]}

@ -1 +1 @@
[{"serialisedRoute":[{"serialiseTime":"9:00","serialiseName":"1 Avonhead Road"},{"serialiseTime":"9:15","serialiseName":"1 University Drive"}],"direction":"University","ride":{"model":"Nissan March","colour":"Baby Blue","licensePlate":"EPU001","year":2004,"numSeats":5},"days":[false,true,true,false,true,false,false],"reoccur":true,"endDate":"30-12-2017","name":"Home to Uni"}] {"79984862":[{"serialisedRoute":[{"serialiseTime":"9:00","serialiseName":"1 Avonhead Road"},{"serialiseTime":"9:15","serialiseName":"1 University Drive"}],"direction":"University","ride":{"model":"Nissan March","colour":"Baby Blue","licensePlate":"EPU001","year":2004,"numSeats":5},"days":[false,true,true,false,true,false,false],"reoccur":true,"endDate":{"year":2017,"month":12,"day":30},"name":"Home to Uni"}]}

@ -1,5 +0,0 @@
#Generated by Maven
#Fri May 19 15:51:59 NZST 2017
version=1.0-SNAPSHOT
groupId=ride-sharing-system
artifactId=ride-sharing-system

@ -1,25 +0,0 @@
controllers\HomeController.class
controllers\Main.class
controllers\MyStopsController.class
controllers\AddTripController$2.class
model\Session.class
model\Ride.class
model\Route.class
model\TripStop.class
controllers\MyRidesController.class
controllers\AddRouteController.class
controllers\AddRideController.class
model\ButtonSets.class
model\Trip.class
controllers\BaseController.class
model\SceneCode.class
controllers\AddTripController.class
model\DataManager.class
controllers\MyRoutesController.class
controllers\AddStopsController.class
controllers\MyRoutesController$1.class
controllers\MainController.class
model\Stop.class
controllers\AddTripController$1.class
controllers\Controller.class
model\ButtonTypes.class

@ -1,22 +0,0 @@
D:\Programming\Workspace\SENG301\src\main\java\controllers\AddTripController.java
D:\Programming\Workspace\SENG301\src\main\java\controllers\HomeController.java
D:\Programming\Workspace\SENG301\src\main\java\model\Ride.java
D:\Programming\Workspace\SENG301\src\main\java\model\Stop.java
D:\Programming\Workspace\SENG301\src\main\java\controllers\MyRoutesController.java
D:\Programming\Workspace\SENG301\src\main\java\controllers\AddStopsController.java
D:\Programming\Workspace\SENG301\src\main\java\model\Session.java
D:\Programming\Workspace\SENG301\src\main\java\controllers\AddRideController.java
D:\Programming\Workspace\SENG301\src\main\java\controllers\MyRidesController.java
D:\Programming\Workspace\SENG301\src\main\java\controllers\BaseController.java
D:\Programming\Workspace\SENG301\src\main\java\model\Trip.java
D:\Programming\Workspace\SENG301\src\main\java\model\DataManager.java
D:\Programming\Workspace\SENG301\src\main\java\controllers\Main.java
D:\Programming\Workspace\SENG301\src\main\java\model\TripStop.java
D:\Programming\Workspace\SENG301\src\main\java\controllers\Controller.java
D:\Programming\Workspace\SENG301\src\main\java\controllers\MainController.java
D:\Programming\Workspace\SENG301\src\main\java\model\ButtonTypes.java
D:\Programming\Workspace\SENG301\src\main\java\model\Route.java
D:\Programming\Workspace\SENG301\src\main\java\controllers\AddRouteController.java
D:\Programming\Workspace\SENG301\src\main\java\model\ButtonSets.java
D:\Programming\Workspace\SENG301\src\main\java\controllers\MyStopsController.java
D:\Programming\Workspace\SENG301\src\main\java\model\SceneCode.java

@ -1,4 +0,0 @@
RunCucumberTests.class
steps\PlaceholderSteps.class
model\DataManagerTest.class
controllers\MainControllerTest.class

@ -1,4 +0,0 @@
D:\Programming\Workspace\SENG301\src\test\java\steps\PlaceholderSteps.java
D:\Programming\Workspace\SENG301\src\test\java\RunCucumberTests.java
D:\Programming\Workspace\SENG301\src\test\java\model\DataManagerTest.java
D:\Programming\Workspace\SENG301\src\test\java\controllers\MainControllerTest.java

@ -1,67 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<testsuite tests="1" failures="0" name="controllers.MainControllerTest" time="0.008" errors="0" skipped="0">
<properties>
<property name="java.runtime.name" value="Java(TM) SE Runtime Environment"/>
<property name="sun.boot.library.path" value="H:\Programs\Java\jdk1.8.0_102\jre\bin"/>
<property name="java.vm.version" value="25.102-b14"/>
<property name="java.vm.vendor" value="Oracle Corporation"/>
<property name="maven.multiModuleProjectDirectory" value="D:\Programming\Workspace\SENG301"/>
<property name="java.vendor.url" value="http://java.oracle.com/"/>
<property name="path.separator" value=";"/>
<property name="guice.disable.misplaced.annotation.check" value="true"/>
<property name="java.vm.name" value="Java HotSpot(TM) 64-Bit Server VM"/>
<property name="file.encoding.pkg" value="sun.io"/>
<property name="user.script" value=""/>
<property name="user.country" value="NZ"/>
<property name="sun.java.launcher" value="SUN_STANDARD"/>
<property name="sun.os.patch.level" value=""/>
<property name="java.vm.specification.name" value="Java Virtual Machine Specification"/>
<property name="user.dir" value="D:\Programming\Workspace\SENG301"/>
<property name="java.runtime.version" value="1.8.0_102-b14"/>
<property name="java.awt.graphicsenv" value="sun.awt.Win32GraphicsEnvironment"/>
<property name="java.endorsed.dirs" value="H:\Programs\Java\jdk1.8.0_102\jre\lib\endorsed"/>
<property name="os.arch" value="amd64"/>
<property name="java.io.tmpdir" value="C:\Users\Gondr\AppData\Local\Temp\"/>
<property name="line.separator" value="
"/>
<property name="java.vm.specification.vendor" value="Oracle Corporation"/>
<property name="user.variant" value=""/>
<property name="os.name" value="Windows 10"/>
<property name="classworlds.conf" value="H:\Programs\apache-maven-3.3.9\bin\m2.conf"/>
<property name="sun.jnu.encoding" value="Cp1252"/>
<property name="java.library.path" value="H:\Programs\Java\jdk1.8.0_102\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Program Files (x86)\Razer Chroma SDK\bin;H:\Programs\Razer Chroma SDK\bin;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;H:\Programs\Git\cmd;H:\Programs\Python;C:\TDM-GCC-64\bin;H:\Programs\apache-maven-3.3.9\bin;C:\Program Files (x86)\Skype\Phone\;."/>
<property name="java.specification.name" value="Java Platform API Specification"/>
<property name="java.class.version" value="52.0"/>
<property name="sun.management.compiler" value="HotSpot 64-Bit Tiered Compilers"/>
<property name="os.version" value="10.0"/>
<property name="user.home" value="C:\Users\Gondr"/>
<property name="user.timezone" value="Pacific/Auckland"/>
<property name="java.awt.printerjob" value="sun.awt.windows.WPrinterJob"/>
<property name="java.specification.version" value="1.8"/>
<property name="file.encoding" value="Cp1252"/>
<property name="user.name" value="Gondr"/>
<property name="java.class.path" value="H:\Programs\apache-maven-3.3.9\boot\plexus-classworlds-2.5.2.jar"/>
<property name="java.vm.specification.version" value="1.8"/>
<property name="sun.arch.data.model" value="64"/>
<property name="java.home" value="H:\Programs\Java\jdk1.8.0_102\jre"/>
<property name="sun.java.command" value="org.codehaus.plexus.classworlds.launcher.Launcher clean package"/>
<property name="java.specification.vendor" value="Oracle Corporation"/>
<property name="user.language" value="en"/>
<property name="awt.toolkit" value="sun.awt.windows.WToolkit"/>
<property name="java.vm.info" value="mixed mode"/>
<property name="java.version" value="1.8.0_102"/>
<property name="java.ext.dirs" value="H:\Programs\Java\jdk1.8.0_102\jre\lib\ext;C:\Windows\Sun\Java\lib\ext"/>
<property name="sun.boot.class.path" value="H:\Programs\Java\jdk1.8.0_102\jre\lib\resources.jar;H:\Programs\Java\jdk1.8.0_102\jre\lib\rt.jar;H:\Programs\Java\jdk1.8.0_102\jre\lib\sunrsasign.jar;H:\Programs\Java\jdk1.8.0_102\jre\lib\jsse.jar;H:\Programs\Java\jdk1.8.0_102\jre\lib\jce.jar;H:\Programs\Java\jdk1.8.0_102\jre\lib\charsets.jar;H:\Programs\Java\jdk1.8.0_102\jre\lib\jfr.jar;H:\Programs\Java\jdk1.8.0_102\jre\classes"/>
<property name="sun.stderr.encoding" value="cp850"/>
<property name="java.vendor" value="Oracle Corporation"/>
<property name="maven.home" value="H:\Programs\apache-maven-3.3.9"/>
<property name="file.separator" value="\"/>
<property name="java.vendor.url.bug" value="http://bugreport.sun.com/bugreport/"/>
<property name="sun.cpu.endian" value="little"/>
<property name="sun.io.unicode.encoding" value="UnicodeLittle"/>
<property name="sun.stdout.encoding" value="cp850"/>
<property name="sun.desktop" value="windows"/>
<property name="sun.cpu.isalist" value="amd64"/>
</properties>
<testcase classname="controllers.MainControllerTest" name="testLogin" time="0.008"/>
</testsuite>

@ -1,69 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<testsuite tests="3" failures="0" name="model.DataManagerTest" time="0.049" errors="0" skipped="0">
<properties>
<property name="java.runtime.name" value="Java(TM) SE Runtime Environment"/>
<property name="sun.boot.library.path" value="H:\Programs\Java\jdk1.8.0_102\jre\bin"/>
<property name="java.vm.version" value="25.102-b14"/>
<property name="java.vm.vendor" value="Oracle Corporation"/>
<property name="maven.multiModuleProjectDirectory" value="D:\Programming\Workspace\SENG301"/>
<property name="java.vendor.url" value="http://java.oracle.com/"/>
<property name="path.separator" value=";"/>
<property name="guice.disable.misplaced.annotation.check" value="true"/>
<property name="java.vm.name" value="Java HotSpot(TM) 64-Bit Server VM"/>
<property name="file.encoding.pkg" value="sun.io"/>
<property name="user.script" value=""/>
<property name="user.country" value="NZ"/>
<property name="sun.java.launcher" value="SUN_STANDARD"/>
<property name="sun.os.patch.level" value=""/>
<property name="java.vm.specification.name" value="Java Virtual Machine Specification"/>
<property name="user.dir" value="D:\Programming\Workspace\SENG301"/>
<property name="java.runtime.version" value="1.8.0_102-b14"/>
<property name="java.awt.graphicsenv" value="sun.awt.Win32GraphicsEnvironment"/>
<property name="java.endorsed.dirs" value="H:\Programs\Java\jdk1.8.0_102\jre\lib\endorsed"/>
<property name="os.arch" value="amd64"/>
<property name="java.io.tmpdir" value="C:\Users\Gondr\AppData\Local\Temp\"/>
<property name="line.separator" value="
"/>
<property name="java.vm.specification.vendor" value="Oracle Corporation"/>
<property name="user.variant" value=""/>
<property name="os.name" value="Windows 10"/>
<property name="classworlds.conf" value="H:\Programs\apache-maven-3.3.9\bin\m2.conf"/>
<property name="sun.jnu.encoding" value="Cp1252"/>
<property name="java.library.path" value="H:\Programs\Java\jdk1.8.0_102\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Program Files (x86)\Razer Chroma SDK\bin;H:\Programs\Razer Chroma SDK\bin;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;H:\Programs\Git\cmd;H:\Programs\Python;C:\TDM-GCC-64\bin;H:\Programs\apache-maven-3.3.9\bin;C:\Program Files (x86)\Skype\Phone\;."/>
<property name="java.specification.name" value="Java Platform API Specification"/>
<property name="java.class.version" value="52.0"/>
<property name="sun.management.compiler" value="HotSpot 64-Bit Tiered Compilers"/>
<property name="os.version" value="10.0"/>
<property name="user.home" value="C:\Users\Gondr"/>
<property name="user.timezone" value="Pacific/Auckland"/>
<property name="java.awt.printerjob" value="sun.awt.windows.WPrinterJob"/>
<property name="java.specification.version" value="1.8"/>
<property name="file.encoding" value="Cp1252"/>
<property name="user.name" value="Gondr"/>
<property name="java.class.path" value="H:\Programs\apache-maven-3.3.9\boot\plexus-classworlds-2.5.2.jar"/>
<property name="java.vm.specification.version" value="1.8"/>
<property name="sun.arch.data.model" value="64"/>
<property name="java.home" value="H:\Programs\Java\jdk1.8.0_102\jre"/>
<property name="sun.java.command" value="org.codehaus.plexus.classworlds.launcher.Launcher clean package"/>
<property name="java.specification.vendor" value="Oracle Corporation"/>
<property name="user.language" value="en"/>
<property name="awt.toolkit" value="sun.awt.windows.WToolkit"/>
<property name="java.vm.info" value="mixed mode"/>
<property name="java.version" value="1.8.0_102"/>
<property name="java.ext.dirs" value="H:\Programs\Java\jdk1.8.0_102\jre\lib\ext;C:\Windows\Sun\Java\lib\ext"/>
<property name="sun.boot.class.path" value="H:\Programs\Java\jdk1.8.0_102\jre\lib\resources.jar;H:\Programs\Java\jdk1.8.0_102\jre\lib\rt.jar;H:\Programs\Java\jdk1.8.0_102\jre\lib\sunrsasign.jar;H:\Programs\Java\jdk1.8.0_102\jre\lib\jsse.jar;H:\Programs\Java\jdk1.8.0_102\jre\lib\jce.jar;H:\Programs\Java\jdk1.8.0_102\jre\lib\charsets.jar;H:\Programs\Java\jdk1.8.0_102\jre\lib\jfr.jar;H:\Programs\Java\jdk1.8.0_102\jre\classes"/>
<property name="sun.stderr.encoding" value="cp850"/>
<property name="java.vendor" value="Oracle Corporation"/>
<property name="maven.home" value="H:\Programs\apache-maven-3.3.9"/>
<property name="file.separator" value="\"/>
<property name="java.vendor.url.bug" value="http://bugreport.sun.com/bugreport/"/>
<property name="sun.cpu.endian" value="little"/>
<property name="sun.io.unicode.encoding" value="UnicodeLittle"/>
<property name="sun.stdout.encoding" value="cp850"/>
<property name="sun.desktop" value="windows"/>
<property name="sun.cpu.isalist" value="amd64"/>
</properties>
<testcase classname="model.DataManagerTest" name="addRoute" time="0.049"/>
<testcase classname="model.DataManagerTest" name="addRide" time="0"/>
<testcase classname="model.DataManagerTest" name="addStop" time="0"/>
</testsuite>

@ -1,4 +0,0 @@
-------------------------------------------------------------------------------
Test set: controllers.MainControllerTest
-------------------------------------------------------------------------------
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.061 sec

@ -1,4 +0,0 @@
-------------------------------------------------------------------------------
Test set: model.DataManagerTest
-------------------------------------------------------------------------------
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.05 sec
Loading…
Cancel
Save