Merge remote-tracking branch 'origin/master'

main
Michael 9 years ago
commit cd1c505dc6

Binary file not shown.

@ -1,5 +1,7 @@
package seng202.group9.Controller;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import seng202.group9.Core.Airline;
import java.io.*;

@ -1,10 +1,14 @@
package seng202.group9.Controller;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import seng202.group9.Core.Airport;
import seng202.group9.Core.City;
import seng202.group9.Core.Country;
import javax.jws.Oneway;
import java.io.*;
import java.lang.reflect.Array;
import java.util.ArrayList;
public class AirportParser extends Parser {

@ -54,13 +54,36 @@ public class App extends Application
e.printStackTrace();
}
primaryStage.show();
/*
//testing out dataset
try {
currentDataset = new Dataset("test's", Dataset.getExisting);
}catch (DataException e){
e.printStackTrace();
}
/*
//testout single route adding
try {
currentDataset.addRoute("D2", "MAC", "WIN", "Y", "0", "NOW");
}catch (DataException e){
e.printStackTrace();
}
//testout single airport adding
try {
currentDataset.addAirport("Windows 10", "PC", "Windows", "WIN", "WIND", "0.0", "0.0", "0.0", "0.0", "U", "PC/Windows");
}catch (DataException e){
e.printStackTrace();
}
/*
//testout single airline adding
try {
currentDataset.addAirline("Dota2", "Valve", "D2", "DOT", "Defence of the Ancients", "Steam", "Y");
}catch (DataException e){
e.printStackTrace();
}
//testing out airport parser
try {
System.out.println(currentDataset.importAirport("res/Samples/Airports.txt"));
@ -78,8 +101,15 @@ public class App extends Application
System.out.println(currentDataset.importRoute("res/Samples/Routes.txt"));
} catch (DataException e) {
e.printStackTrace();
}
*/
}*/
//testing out flight parser
try {
System.out.println(currentDataset.importFlight("res/Samples/NZCH-WSSS.csv"));
} catch (DataException e) {
e.printStackTrace();
}
}
/**

@ -1,6 +1,8 @@
package seng202.group9.Controller;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import seng202.group9.Core.*;
import java.sql.Connection;
@ -13,7 +15,7 @@ import java.util.LinkedHashMap;
public class Dataset {
String name;
static boolean getExisting = true;//constructor variables for action
public static boolean getExisting = true;//constructor variables for action
static boolean createNew = false;//constructor variables for action
ArrayList<Airline> airlines;
ArrayList<Airport> airports;
@ -21,12 +23,12 @@ public class Dataset {
ArrayList<FlightPath> flightPaths;
ArrayList<Country> countries;
ArrayList<City> cities;
LinkedHashMap airlineDictionary;
LinkedHashMap airportDictionary;
LinkedHashMap routeDictionary;
LinkedHashMap flightPathDictionary;
LinkedHashMap countryDictionary;
LinkedHashMap cityDictionary;
LinkedHashMap<String, Airline> airlineDictionary;
LinkedHashMap<String, Airport> airportDictionary;
LinkedHashMap<String, Route> routeDictionary;
LinkedHashMap<String, FlightPath> flightPathDictionary;
LinkedHashMap<String, Country> countryDictionary;
LinkedHashMap<String, City> cityDictionary;
/**
*
@ -42,11 +44,11 @@ public class Dataset {
this.routes = new ArrayList<Route>();
this.cities = new ArrayList<City>();
this.countries = new ArrayList<Country>();
this.airlineDictionary = new LinkedHashMap();
this.airportDictionary = new LinkedHashMap();;
this.routeDictionary = new LinkedHashMap();;
this.countryDictionary = new LinkedHashMap();;
this.cityDictionary = new LinkedHashMap();;
this.airlineDictionary = new LinkedHashMap<String, Airline>();
this.airportDictionary = new LinkedHashMap<String, Airport>();;
this.routeDictionary = new LinkedHashMap<String, Route>();;
this.countryDictionary = new LinkedHashMap<String, Country>();;
this.cityDictionary = new LinkedHashMap<String, City>();;
if (action == getExisting){
updateDataset();
//after this make connections. ie filling in the country.cities airports.routes etc
@ -423,7 +425,7 @@ public class Dataset {
return message;
}
/**
* Imports Airline files to the dataset
* Imports Airport files to the dataset
* @param filePath
* @return Success Message
* @throws DataException
@ -557,7 +559,7 @@ public class Dataset {
}
/**
* Imports Airline files to dataset
* Imports Route files to dataset
* @param filePath
* @return Success Message
* @throws DataException
@ -585,6 +587,7 @@ public class Dataset {
nextID = Integer.parseInt(IDResult.getString("seq")) + 1;//for some reason sqlite3 stores incremental values as a string...
}
stmt.close();
stmt = c.createStatement();
String insertRouteQuery = "INSERT INTO `" + this.name + "_Routes` (`Airline`, `Source_Airport`, `Destination_Airport`," +
" `Codeshare`, `Stops`, `Equipment`) VALUES ";
@ -631,19 +634,17 @@ public class Dataset {
}
/**
* Imports Airline files to dataset
* Imports Flight files to dataset
* @param filePath
* @return Success Message
* @throws DataException
*/
/*
public String importFlight(String filePath) throws DataException {
FlightPathParser parser = new FlightPathParser(filePath);
//remember this still has to append the duplicate message to it.
//routes are identified in the diction by routeAirline + routeSourceAirport + routeArrvAirport + routeCodeShare + routeStops + routeEquip;
String message = parser.parse();
ArrayList<FlightPoint> flightsToImport = parser.getResult();
ArrayList<FlightPoint> flightPointsToImport = parser.getResult();
//check for dup
int numOfDuplicates = 0;
int nextID = -1;
@ -654,49 +655,69 @@ public class Dataset {
Class.forName("org.sqlite.JDBC");
c = DriverManager.getConnection("jdbc:sqlite:res/userdb.db");
stmt = c.createStatement();
String queryName = this.name.replace("'", "''").replace("\"", "\"\"");
String IDQuery = "SELECT * FROM `sqlite_sequence` WHERE `name` = '"+queryName+"_Routes' LIMIT 1;";
String queryName = this.name.replace("'", "''");
String IDQuery = "SELECT * FROM `sqlite_sequence` WHERE `name` = '"+queryName+"_Flight_Points' LIMIT 1;";
ResultSet IDResult = stmt.executeQuery(IDQuery);
while(IDResult.next()){
nextID = Integer.parseInt(IDResult.getString("seq")) + 1;//for some reason sqlite3 stores incremental values as a string...
}
stmt.close();
stmt = c.createStatement();
String insertFlightQuery = "INSERT INTO `" + this.name + "_Routes` (`Airline`, `Source_Airport`, `Destination_Airport`," +
" `Codeshare`, `Stops`, `Equipment`) VALUES ";
int numOfRoutes = 0;
for (int i = 0; i < flightsToImport.size(); i ++){
String routeIdentifier = flightsToImport.get(i).getType() + flightsToImport.get(i).getID() +
flightsToImport.get(i).getAltitude() + flightsToImport.get(i).getLatitude() +
flightsToImport.get(i).getLongitude();
//if (routeDictionary.containsKey(routeIdentifier)){
// numOfDuplicates ++;
//}else{
//route variables
String flightType = flightsToImport.get(i).getType().replace("\"", "\"\"");
String flightID = flightsToImport.get(i).getID().replace("\"", "\"\"");
double flightAltitude = flightsToImport.get(i).getAltitude();
double flightLatitude = flightsToImport.get(i).getLatitude();
double flightLongitude = flightsToImport.get(i).getLongitude();
//ADDED
String firstPt = flightPointsToImport.get(0).getName();
String lastPt = flightPointsToImport.get(flightPointsToImport.size() - 1).getName();
FlightPath flightPathToAdd = new FlightPath(firstPt, lastPt);
String insertFlightPathQuery = "INSERT INTO `" + this.name + "_Flight_Path` (`Source_Airport`, `Destination_Airport`)" +
"VALUES ( \"" + firstPt + "\",\"" + lastPt + "\") ";
stmt.execute(insertFlightPathQuery);
stmt.close();
stmt = c.createStatement();
int flightPathId = 0;
String getLastestIndex = "SELECT * FROM `sqlite_sequence` WHERE `name` = \"" + this.name.replace("\"", "\"\"") +
"_Flight_Path\" LIMIT 1;";
ResultSet lastestIdResult = stmt.executeQuery(getLastestIndex);
while(lastestIdResult.next()){
flightPathId = Integer.parseInt(lastestIdResult.getString("seq"));//for some reason sqlite3 stores incremental values as a string...
}
stmt.close();
lastestIdResult.close();
stmt = c.createStatement();
flightPathToAdd.setID(flightPathId);
//ADDED
String insertFlightPointQuery = "INSERT INTO `" + this.name + "_Flight_Points` (`Index_ID`, `Name`, `Type`," +
" `Altitude`, `Longitude`, `Latitude`) VALUES ";
int numOfFlights = 0;
for (int i = 0; i < flightPointsToImport.size(); i ++){
String flightPointIdentifier = flightPointsToImport.get(i).getType() + flightPointsToImport.get(i).getName() +
flightPointsToImport.get(i).getAltitude() + flightPointsToImport.get(i).getLatitude() +
flightPointsToImport.get(i).getLongitude();
String flightType = flightPointsToImport.get(i).getType().replace("\"", "\"\"");
String flightName = flightPointsToImport.get(i).getName().replace("\"", "\"\"");
double flightAltitude = flightPointsToImport.get(i).getAltitude();
double flightLatitude = flightPointsToImport.get(i).getLatitude();
double flightLongitude = flightPointsToImport.get(i).getLongitude();
//insert import into database
if (numOfRoutes > 0){
insertFlightQuery += ",";
if (numOfFlights > 0){
insertFlightPointQuery += ",";
}
insertFlightQuery += "(\""+flightType+"\", \"" + flightID + "\", \"" + flightAltitude + "\", " +
"\"" + flightLatitude + "\", " + flightLongitude + "\")";
flightsToImport.get(i).setID(nextID);
insertFlightPointQuery += "(" + flightPathId +", \""+ flightName +"\", \"" + flightType + "\", "+ flightAltitude + ", " +
"" + flightLatitude + ", " + flightLongitude + ")";
flightPointsToImport.get(i).setID(nextID);
//add data to dataset array.
//this is placed after incase the database messes up
flights.add(flightsToImport.get(i));
routeDictionary.put(routeIdentifier, flightsToImport.get(i));
flightPathToAdd.addFlightPoint(flightPointsToImport.get(i));
//routeDictionary.put(routeIdentifier, flightsToImport.get(i));
nextID++;
numOfRoutes++;
numOfFlights++;
//}
}
if (numOfRoutes > 0){
stmt.execute(insertRouteQuery);
if (numOfFlights > 0){
stmt.execute(insertFlightPointQuery);
stmt.close();
}
flightPaths.add(flightPathToAdd);
} catch ( Exception e ) {
System.err.println( e.getClass().getName() + ": " + e.getMessage() );
System.exit(0);
@ -705,10 +726,10 @@ public class Dataset {
createDataLinks();
return message;
}
/*
*/
/**
* This function updates the connections between airports citys countries etc.
*/
@ -717,6 +738,250 @@ public class Dataset {
}
/**
* Addes Single Airline to Program and Database.
* @param name
* @param alias
* @param IATA
* @param ICAO
* @param callsign
* @param country
* @param active
* @throws DataException
*/
public void addAirline(String name, String alias, String IATA, String ICAO, String callsign, String country, String active) throws DataException{
Airline airlineToAdd = new Airline(name, alias, IATA, ICAO, callsign, country, active);
addAirline(airlineToAdd);
}
public void addAirline(Airline airlineToAdd) throws DataException{
if (airlineToAdd.getIATA().length() != 0 && airlineToAdd.getIATA().length() != 2){
throw new DataException("IATA is either empty or length of 2 Letters.");
}
if (airlineToAdd.getICAO().length() != 0 && airlineToAdd.getICAO().length() != 3){
throw new DataException("ICAO is either empty or length of 3 Letters.");
}
if (airlineToAdd.getActive().length() != 1){
throw new DataException ("Active must be Y or N.");
}
for (String key : airlineDictionary.keySet()){
airlineDictionary.get(key).hasDuplicate(airlineToAdd);
}
//checking is done now we add it to the dictionary and the database
//query database.
Connection c = null;
Statement stmt = null;
try {
Class.forName("org.sqlite.JDBC");
c = DriverManager.getConnection("jdbc:sqlite:res/userdb.db");
//add the airline
stmt = c.createStatement();
String insertAirlineQuery = "INSERT INTO `" + this.name + "_Airline` (`Name`, `Alias`, `IATA`, `ICAO`" +
", `Callsign`, `Country`, `Active`) VALUES (\""+airlineToAdd.getName()+"\", \"" + airlineToAdd.getAlias() + "\", " +
"\"" + airlineToAdd.getIATA() + "\", \"" + airlineToAdd.getICAO() + "\", \"" + airlineToAdd.getCallSign() + "\", " +
"\"" + airlineToAdd.getCountry() + "\", \"" + airlineToAdd.getActive() + "\");";
stmt.execute(insertAirlineQuery);
//get the airline id
stmt = c.createStatement();
String airlineIDQuery = "SELECT * FROM `sqlite_sequence` WHERE `name` = \""+this.name+"_Airline\" LIMIT 1;";
ResultSet airlineIDRes= stmt.executeQuery(airlineIDQuery);
int airlineID = 0;
while (airlineIDRes.next()){
airlineID = Integer.parseInt(airlineIDRes.getString("seq"));
}
airlineToAdd.setID(airlineID);
airlines.add(airlineToAdd);
airlineDictionary.put(airlineToAdd.getName(), airlineToAdd);
} catch ( Exception e ) {
System.err.println( e.getClass().getName() + ": " + e.getMessage() );
System.exit(0);
}
}
public void addAirport(String name, String city, String country, String IATA_FFA, String ICAO, String latitude, String longitude,
String altitude, String timezone, String DST, String olsonTz) throws DataException{
try{
double latitudeVal = Double.parseDouble(latitude);
double longitudeVal = Double.parseDouble(longitude);
double altitudeVal = Double.parseDouble(altitude);
double timezoneVal = Double.parseDouble(timezone);
Airport airportToAdd = new Airport(name, city, country, IATA_FFA, ICAO, latitudeVal, longitudeVal, altitudeVal);
City cityToAdd = new City(city, country, timezoneVal, olsonTz);
Country countryToAdd = new Country(DST, country);
addAirport(airportToAdd);
addCity(cityToAdd);
addCountry(countryToAdd);
}catch (NumberFormatException e){
throw new DataException("Latitude, Longitude, Altitude and Timezone must be numbers");
}
}
public void addAirport(Airport airportToAdd) throws DataException{
if (airportToAdd.getIATA_FFA() != "" && airportToAdd.getIATA_FFA().length() != 3){
throw new DataException("IATA/FFA either empty or 3 letters");
}
if (airportToAdd.getICAO() != "" && airportToAdd.getICAO().length() != 4){
throw new DataException("ICAO either empty or 4 letters");
}
for (String key : airportDictionary.keySet()){
airportDictionary.get(key).hasDuplicate(airportToAdd);
}
//checking is done now we add it to the dictionary and the database
//query database.
Connection c = null;
Statement stmt = null;
try {
Class.forName("org.sqlite.JDBC");
c = DriverManager.getConnection("jdbc:sqlite:res/userdb.db");
//add the airport
stmt = c.createStatement();
String insertAirportQuery = "INSERT INTO `" + this.name + "_Airport` (`Name`, `City`, `Country`, `IATA/FFA`, " +
"`ICAO`, `Latitude`, `Longitude`, `Altitude`) VALUES (\""+airportToAdd.getName()+"\", \""+airportToAdd.getCity()+"\", " +
"\""+airportToAdd.getCountry()+"\", \""+airportToAdd.getIATA_FFA()+"\", \""+airportToAdd.getICAO()+"\", " +
""+airportToAdd.getLatitude()+", "+airportToAdd.getLongitude()+", "+airportToAdd.getAltitude()+");";
stmt.execute(insertAirportQuery);
//get the airport id
stmt = c.createStatement();
String airportIDQuery = "SELECT * FROM `sqlite_sequence` WHERE `name` = \""+this.name+"_Airport\" LIMIT 1;";
ResultSet airportIDRes= stmt.executeQuery(airportIDQuery);
int airportID = 0;
while (airportIDRes.next()){
airportID = Integer.parseInt(airportIDRes.getString("seq"));
}
airportToAdd.setID(airportID);
airports.add(airportToAdd);
airportDictionary.put(airportToAdd.getName(), airportToAdd);
} catch ( Exception e ) {
System.err.println( e.getClass().getName() + ": " + e.getMessage() );
System.exit(0);
}
}
public void addCity(City city){
if (!cityDictionary.containsKey(city.getName())){
Connection c = null;
Statement stmt = null;
try {
Class.forName("org.sqlite.JDBC");
c = DriverManager.getConnection("jdbc:sqlite:res/userdb.db");
//add the city
stmt = c.createStatement();
String cityName = city.getName().replace("\"", "\"\"");
String countryName = city.getCountry().replace("\"", "\"\"");
String olson = city.getTimeOlson().replace("\"", "\"\"");
String insertCityQuery = "INSERT INTO `" + this.name + "_City` (`City_Name`, `Country_Name`, `Timezone`, " +
"`Olson_Timezone`) VALUES (\""+cityName+"\", \""+countryName+"\", "+city.getTimezone() + ", \""+olson+"\");";
stmt.execute(insertCityQuery);
stmt.close();
cityDictionary.put(city.getName(), city);
cities.add(city);
} catch ( Exception e ) {
System.err.println( e.getClass().getName() + ": " + e.getMessage() );
System.exit(0);
}
}
}
public void addCountry(Country country){
if (!countryDictionary.containsKey(country.getName())){
Connection c = null;
Statement stmt = null;
try {
Class.forName("org.sqlite.JDBC");
c = DriverManager.getConnection("jdbc:sqlite:res/userdb.db");
//add the city
stmt = c.createStatement();
String countryName = country.getName().replace("\"", "\"\"");
String countryDST = country.getDST().replace("\"", "\"\"");
String insertCityQuery = "INSERT INTO `" + this.name + "_Country` (`Country_Name`, `DST`) VALUES" +
" (\""+countryName+"\", \""+countryDST+"\");";
stmt.execute(insertCityQuery);
stmt.close();
countryDictionary.put(country.getName(), country);
countries.add(country);
} catch ( Exception e ) {
System.err.println( e.getClass().getName() + ": " + e.getMessage() );
System.exit(0);
}
}
}
/**
* Adds one single route to the program.
* @param airline
* @param sourceAirport
* @param destAirport
* @param codeshare
* @param stops
* @param equipment
* @throws DataException
*/
public void addRoute(String airline, String sourceAirport, String destAirport, String codeshare, String stops, String equipment) throws DataException{
int stopsVal = 0;
try{
stopsVal = Integer.parseInt(stops);
}catch (NumberFormatException e){
throw new DataException("Stops must be a greater than or equal to 0.");
}
if (stopsVal < 0){
throw new DataException("Stops must be a greater than or equal to 0.");
}
Route routeToAdd = new Route(airline, sourceAirport, destAirport, codeshare, stopsVal, equipment);
addRoute(routeToAdd);
}
public void addRoute(Route routeToAdd) throws DataException{
if (routeToAdd.getAirline().length() != 2 && routeToAdd.getAirline().length() != 3){
throw new DataException("Airline ICAO code must be 2 or 3 letters.");
}
if (routeToAdd.departsFrom().length() != 3 && routeToAdd.departsFrom().length() != 4){
throw new DataException("Airport Source Airport IATA must be 3 letters or 4 letters if ICAO.");
}
if (routeToAdd.arrivesAt().length() != 3 && routeToAdd.arrivesAt().length() != 4){
throw new DataException("Airport Destination Airport IATA must be 3 letters or 4 letters if ICAO.");
}
if (routeToAdd.getCode().length() != 0 && routeToAdd.getCode().length() != 1){
throw new DataException("Codeshare has to be empty or Y.");
}
for (String key : routeDictionary.keySet()){
routeDictionary.get(key).hasDuplicate(routeToAdd);
}
//checking is done now we add it to the dictionary and the database
//query database.
Connection c = null;
Statement stmt = null;
try {
Class.forName("org.sqlite.JDBC");
c = DriverManager.getConnection("jdbc:sqlite:res/userdb.db");
//add the airline
stmt = c.createStatement();
String airline = routeToAdd.getAirline().replace("\"", "\"\"");
String sourceAir = routeToAdd.departsFrom().replace("\"", "\"\"");
String destAir = routeToAdd.arrivesAt().replace("\"", "\"\"");
String equipment = routeToAdd.getEquipment().replace("\"", "\"\"");
String insertRouteQuery = "INSERT INTO `" + this.name + "_Routes` (`Airline`, `Source_Airport`, `Destination_Airport`," +
" `Codeshare`, `Stops`, `Equipment`) VALUES (\""+airline+"\", \""+sourceAir+"\", \""+destAir+"\", " +
"\""+routeToAdd.getCode()+"\", "+routeToAdd.getStops()+", \""+equipment+"\")";
stmt.execute(insertRouteQuery);
//get the airline id
stmt = c.createStatement();
String routeIDQuery = "SELECT * FROM `sqlite_sequence` WHERE `name` = \""+this.name+"_Route\" LIMIT 1;";
ResultSet routeIDRes= stmt.executeQuery(routeIDQuery);
int routeID = 0;
while (routeIDRes.next()){
routeID = Integer.parseInt(routeIDRes.getString("seq"));
}
routeToAdd.setID(routeID);
routes.add(routeToAdd);
//routeAirline + routeSourceAirport + routeArrvAirport + routeCodeShare + routeStops + routeEquip
String routeKey = routeToAdd.getAirline() + routeToAdd.departsFrom() + routeToAdd.arrivesAt() + routeToAdd.getCode() + routeToAdd.getStops() + routeToAdd.getEquipment();
routeDictionary.put(routeKey, routeToAdd);
} catch ( Exception e ) {
System.err.println( e.getClass().getName() + ": " + e.getMessage() );
System.exit(0);
}
}
public ArrayList<Airline> getAirlines() {
return airlines;
}

@ -205,7 +205,7 @@ public class Airline {
}
/**
* Function Overload of addRoutes this allow the adding of a list to route
* @param routes
* @param routesToAdd array list of routes to add routes
*/
public void addRoutes(ArrayList<Route> routesToAdd){
for (int i = 0; i < routesToAdd.size(); i ++){
@ -228,6 +228,29 @@ public class Airline {
public void delRoutes(int index){
routes.remove(index);
}
/**
* checks if the airline has a duplicate unique entry to another. Used for validating
* @param airline
* @return
*/
public void hasDuplicate(Airline airline) throws DataException{
if (this.name.equals(airline.getName())){
throw new DataException("This Airline Name already Exists, Please Choose Another.");
}
if (!this.IATA.equals("") && this.IATA.equals(airline.getIATA())){
throw new DataException("This IATA Code already Exists, Please Choose Another.");
}
if (!this.ICAO.equals("") && this.ICAO.equals(airline.getICAO())){
throw new DataException("This ICAO Code already Exists, Please Choose Another.");
}
if (!this.alias.equals("") && this.alias.equals(airline.getAlias())){
throw new DataException("This Alias already Exists, Please Choose Another.");
}
if (!this.callSign.equals("") && this.callSign.equals(airline.getCallSign())){
throw new DataException("This Callsign already Exists, Please Choose Another.");
}
}
/**
* returns the name of the airline when concatenated to a string.
*/

@ -195,9 +195,9 @@ public class Airport {
* gets the IATA/FFA of the airport
* @return IATA/FFA Code
*/
public String IATA_FFA(){
return IATA_FFA;
}
// public String IATA_FFA(){
// return IATA_FFA;
// }
/**
* gets the altitude of the airport
* @return Altitude of Airport
@ -304,9 +304,21 @@ public class Airport {
distance = 6371 * c;
return distance;
}
public void hasDuplicate(Airport airport) throws DataException{
if (!airport.getName().equals("") && airport.getName().equals(this.name)){
throw new DataException("Airport Name already Exists, Please Choose Another.");
}
if (!airport.getIATA_FFA().equals("") && airport.getIATA_FFA().equals(this.name)){
throw new DataException("Airport IATA/FFA already Exists, Please Choose Another.");
}
if (!airport.getICAO().equals("") && airport.getICAO().equals(this.name)){
throw new DataException("Airport ICAO already Exists, Please Choose Another.");
}
}
/**
* Information of the airport returned in String format.
*/
@Override
public String toString(){
return this.city+" Airport has ICAO: "+this.ICAO+", IATA/FFA: "+this.IATA_FFA+" and is located at ("+this.latitude+", "+this.longitude

@ -20,6 +20,13 @@ public class FlightPath {
this.arrivalAirport = arrivalAirport;
this.flightPoints = new ArrayList<FlightPoint>();
}
public FlightPath(String departureAirport, String arrivalAirport){
this.ID = -1;
this.departureAirport = departureAirport;
this.arrivalAirport = arrivalAirport;
this.flightPoints = new ArrayList<FlightPoint>();
}
public ArrayList<FlightPoint> getFlightPoints() {
return flightPoints;

@ -15,14 +15,14 @@ public class FlightPoint {
private double latitude;
private double longitude;
public FlightPoint(String type, String via, double altitude, double latitude, double longitude){
public FlightPoint(String type, String name, double altitude, double latitude, double longitude){
//extra calculations will have to be used to find heading, legdistance and total distance. If necessary
//Type 1 file the file the lecturers gave us
this.name = "";
this.name = name;
this.ID = -1;
this.indexID = -1;
this.type = type;
this.via = via;
this.via = "";
this.heading = 0;
this.altitude = altitude;
this.legDistance = 0.0;

@ -158,7 +158,18 @@ public class Route {
public String arrivesAt(){
return arrivalAirport;
}
/**
* Checks is passed route is a duplicate of the current one if so it throws an DataException
*/
public void hasDuplicate(Route route) throws DataException{
//routeAirline + routeSourceAirport + routeArrvAirport + routeCodeShare + routeStops + routeEquip
if (route.getAirline().equals(this.airline) && route.departsFrom().equals(this.departureAirport)
&& route.arrivesAt().equals(this.arrivalAirport) && route.getCode().equals(this.codeShare)
&& route.getStops() == this.stops && route.getEquipment().equals(this.equipment)){
throw new DataException("This Route already exists.");
}
}
@Override
public String toString(){

@ -0,0 +1,104 @@
package seng202.group9.GUI;
import javafx.collections.FXCollections;
import javafx.fxml.FXML;
import javafx.scene.control.Alert;
import javafx.scene.control.TableColumn;
import javafx.scene.control.TableView;
import javafx.scene.control.TextField;
import javafx.scene.control.cell.PropertyValueFactory;
import seng202.group9.Controller.App;
import seng202.group9.Controller.Dataset;
import seng202.group9.Core.Airline;
/**
* Created by Sunguin on 2016/09/13.
*/
public class AirlineRDController extends MenuController {
@FXML
private TableView<Airline> tableView;
@FXML
private TableColumn<Airline, String> airlIDcol;
@FXML
private TableColumn<Airline, String> airlNamecol;
@FXML
private TableColumn<Airline, String> airlAliascol;
@FXML
private TableColumn<Airline, String> airlIATAcol;
@FXML
private TableColumn<Airline, String> airlICAOcol;
@FXML
private TableColumn<Airline, String> airlCallsigncol;
@FXML
private TableColumn<Airline, String> airlCountrycol;
@FXML
private TableColumn<Airline, String> airlActivecol;
@FXML
private TextField airlNameBox;
@FXML
private TextField airlAliasBox;
@FXML
private TextField airlIATABox;
@FXML
private TextField airlICAOBox;
@FXML
private TextField airlCallsignBox;
@FXML
private TextField airlCountryBox;
@FXML
private TextField airlActiveBox;
App parent;
public void setApp(App parent){
this.parent = parent;
}
private Dataset theDataSet = null;
public void loadTables() {
airlIDcol.setCellValueFactory(new PropertyValueFactory<Airline, String>("ID"));
airlNamecol.setCellValueFactory(new PropertyValueFactory<Airline, String>("Name"));
airlAliascol.setCellValueFactory(new PropertyValueFactory<Airline, String>("Alias"));
//Need to check IATA and ICAO
airlIATAcol.setCellValueFactory(new PropertyValueFactory<Airline, String>("ICAO"));
airlICAOcol.setCellValueFactory(new PropertyValueFactory<Airline, String>("IATA"));
airlCallsigncol.setCellValueFactory(new PropertyValueFactory<Airline, String>("CallSign"));
airlCountrycol.setCellValueFactory(new PropertyValueFactory<Airline, String>("Country"));
airlActivecol.setCellValueFactory(new PropertyValueFactory<Airline, String>("Active"));
theDataSet = this.parent.getCurrentDataset();
tableView.setItems(FXCollections.observableArrayList(theDataSet.getAirlines()));
}
//Dummy function to test the add button.
//Will edit when ID is added automatically.
public void addAirlineSingle() {
try {
theDataSet.addAirline(
airlNameBox.getText(),
airlAliasBox.getText(),
airlIATABox.getText(),
airlICAOBox.getText(),
airlCallsignBox.getText(),
airlCountryBox.getText(),
airlActiveBox.getText());
airlNameBox.clear();
airlAliasBox.clear();
airlIATABox.clear();
airlICAOBox.clear();
airlCallsignBox.clear();
airlCountryBox.clear();
airlActiveBox.clear();
tableView.setItems(FXCollections.observableArrayList(theDataSet.getAirlines()));
} catch ( Exception e ) {
Alert alert = new Alert(Alert.AlertType.ERROR);
alert.setTitle("Airline Data Error");
alert.setHeaderText("Error adding a custom airline entry.");
alert.setContentText(e.getMessage());
alert.showAndWait();
}
}
}

@ -0,0 +1,151 @@
package seng202.group9.GUI;
import javafx.beans.InvalidationListener;
import javafx.collections.FXCollections;
import javafx.collections.ListChangeListener;
import javafx.collections.ObservableList;
import javafx.fxml.FXML;
import javafx.scene.control.*;
import javafx.scene.control.cell.PropertyValueFactory;
import javafx.util.Callback;
import seng202.group9.Controller.App;
import seng202.group9.Controller.Dataset;
import seng202.group9.Core.Airport;
import seng202.group9.Core.City;
import seng202.group9.Core.Country;
/**
* Created by Sunguin on 2016/09/13.
*/
public class AirportRDController extends MenuController{
@FXML
private TableView<Airport> tableViewAirportRD;
@FXML
private TableColumn<Airport, String> airpIDcol;
@FXML
private TableColumn<Airport, String> airpNamecol;
@FXML
private TableColumn<Airport, String> airpCitycol;
@FXML
private TableColumn<Airport, String> airpCountrycol;
@FXML
private TableColumn<Airport, String> airpIATAFFAcol;
@FXML
private TableColumn<Airport, String> airpICAOcol;
@FXML
private TableColumn<Airport, String> airpLatitudecol;
@FXML
private TableColumn<Airport, String> airpLongitudecol;
@FXML
private TableColumn<Airport, String> airpAltitudecol;
@FXML
private TableColumn<Airport, City> airpTimezonecol;
@FXML
private TableColumn<Airport, Country> airpDSTcol;
@FXML
private TableColumn<Airport, City> airpTzcol;
@FXML
private TextField airpNameBox;
@FXML
private TextField airpCityBox;
@FXML
private TextField airpCountryBox;
@FXML
private TextField airpIATAFFABox;
@FXML
private TextField airpICAOBox;
@FXML
private TextField airpLatitudeBox;
@FXML
private TextField airpLongitudeBox;
@FXML
private TextField airpAltitudeBox;
@FXML
private TextField airpTimezoneBox;
@FXML
private TextField airpDSTBox;
@FXML
private TextField airpTzBox;
private Dataset theDataSet = null;
App parent;
public void setApp(App parent){
this.parent = parent;
}
public void loadTables() {
airpIDcol.setCellValueFactory(new PropertyValueFactory<Airport, String>("ID"));
airpNamecol.setCellValueFactory(new PropertyValueFactory<Airport, String>("Name"));
airpCitycol.setCellValueFactory(new PropertyValueFactory<Airport, String>("City"));
airpCountrycol.setCellValueFactory(new PropertyValueFactory<Airport, String>("Country"));
airpIATAFFAcol.setCellValueFactory(new PropertyValueFactory<Airport, String>("IATA_FFA"));
airpICAOcol.setCellValueFactory(new PropertyValueFactory<Airport, String>("ICAO"));
airpLatitudecol.setCellValueFactory(new PropertyValueFactory<Airport, String>("Latitude"));
airpLongitudecol.setCellValueFactory(new PropertyValueFactory<Airport, String>("Longitude"));
airpAltitudecol.setCellValueFactory(new PropertyValueFactory<Airport, String>("Altitude"));
airpTimezonecol.setCellValueFactory(new PropertyValueFactory<Airport, City>("Timezone"));
airpDSTcol.setCellValueFactory(new PropertyValueFactory<Airport, Country>("DST"));
airpTzcol.setCellValueFactory(new PropertyValueFactory<Airport, City>("Tz"));
// airpTimezonecol.setCellFactory(new Callback<TableColumn<Airport, String>, TableCell<Airport, City>>() {
//
// @Override
// public TableCell<Airport, City> call(TableColumn<Airport, City> param) {
// TableCell<Airport, City> timeZoneCell = new TableCell<Airport, City>() {
// @Override
// protected void updateItem(City timezone, boolean empty) {
// if (timezone != null) {
// Label timeZoneLabel = new Label(timezone.getTimeOlson());
// setGraphic(timeZoneLabel);
// }
// }
// };
//
// return timeZoneCell;
// }
// });
theDataSet = this.parent.getCurrentDataset();
tableViewAirportRD.setItems(FXCollections.observableArrayList(theDataSet.getAirports()));
}
public void addAirportSingle() {
try {
theDataSet.addAirport(
airpNameBox.getText(),
airpCityBox.getText(),
airpCountryBox.getText(),
airpIATAFFABox.getText(),
airpICAOBox.getText(),
airpLatitudeBox.getText(),
airpLongitudeBox.getText(),
airpAltitudeBox.getText(),
airpTimezoneBox.getText(),
airpDSTBox.getText(),
airpTzBox.getText());
airpCityBox.clear();
airpCountryBox.clear();
airpIATAFFABox.clear();
airpICAOBox.clear();
airpLatitudeBox.clear();
airpLongitudeBox.clear();
airpAltitudeBox.clear();
airpTimezoneBox.clear();
airpDSTBox.clear();
airpTzBox.clear();
tableViewAirportRD.setItems(FXCollections.observableArrayList(theDataSet.getAirports()));
} catch ( Exception e ) {
Alert alert = new Alert(Alert.AlertType.ERROR);
alert.setTitle("Airline Data Error");
alert.setHeaderText("Error adding a custom airport entry.");
alert.setContentText(e.getMessage());
alert.showAndWait();
}
}
}

@ -1,22 +1,125 @@
package seng202.group9.GUI;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.event.EventHandler;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.control.ListView;
import javafx.scene.control.TableColumn;
import javafx.scene.control.TableView;
import javafx.scene.control.cell.PropertyValueFactory;
import javafx.scene.input.MouseEvent;
import seng202.group9.Controller.App;
import seng202.group9.Controller.Dataset;
import seng202.group9.Core.FlightPath;
import seng202.group9.Core.FlightPoint;
import java.net.URL;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.ResourceBundle;
/**
* Controller for the Flights Raw Data Scene.
* Created by Liam Beckett on 13/09/2016.
*/
public class FlightRawDataController implements Initializable {
App parent;
private Dataset theDataSet = null;
App parent;
public void setApp(App parent){
this.parent = parent;
}
@FXML
private TableView<FlightPoint> flightTableView;
@FXML
private TableColumn<FlightPoint, String> flightIdCol;
@FXML
private TableColumn<FlightPoint, String> flightNameCol;
@FXML
private TableColumn<FlightPoint, String> flightTypeCol;
@FXML
private TableColumn<FlightPoint, String> flightViaCol;
@FXML
private TableColumn<FlightPoint, String> flightAltitudeCol;
@FXML
private TableColumn<FlightPoint, String> flightLatCol;
@FXML
private TableColumn<FlightPoint, String> flightLongCol;
@FXML
private TableColumn<FlightPoint, String> flightHeadCol;
@FXML
private TableColumn<FlightPoint, String> flightLegDisCol;
@FXML
private TableColumn<FlightPoint, String> flightTotDisCol;
@FXML
ListView<String> flightPathListView;
final ObservableList<String> flightList = FXCollections.observableArrayList();
/**
* Loads the Flight paths into the List View and waits for a mouse clicked event for which it will update the table
* to display the selected Flight paths points. Called from the MenuController.
*/
public void flightPathListView() {
try {
ArrayList<FlightPath> flightPaths = new ArrayList();
flightPaths = theDataSet.getFlightPaths();
for(int i = 0; i<flightPaths.size(); i++ ) {
int pathID = flightPaths.get(i).getID();
String pathSource = flightPaths.get(i).departsFrom();
String pathDestin = flightPaths.get(i).arrivesAt();
String flightPathDisplayName = Integer.toString(pathID) + "_" + pathSource + "_" + pathDestin;
flightList.add(flightPathDisplayName);
}
flightPathListView.setOnMouseClicked(new EventHandler<MouseEvent>() {
public void handle(MouseEvent event) {
String flightPathDisplayNameClicked = flightPathListView.getSelectionModel().getSelectedItem();
String[] segments = flightPathDisplayNameClicked.split("_");
String pathIdClicked = segments[0];
ArrayList<FlightPath> flightPaths;
flightPaths = theDataSet.getFlightPaths();
ArrayList<FlightPoint> flightPoints = flightPaths.get(Integer.parseInt(pathIdClicked)-1).getFlight();
flightTableView.setItems(FXCollections.observableArrayList(flightPoints));
}
});
flightPathListView.setItems(flightList);
} catch (Exception e) {
e.printStackTrace();
}
}
/**
* Function used to load the table for the Flight points initially from the MenuController
*/
public void loadTables() {
flightIdCol.setCellValueFactory(new PropertyValueFactory<FlightPoint, String>("ID"));
flightNameCol.setCellValueFactory(new PropertyValueFactory<FlightPoint, String>("Name"));
flightTypeCol.setCellValueFactory(new PropertyValueFactory<FlightPoint, String>("Type"));
flightViaCol.setCellValueFactory(new PropertyValueFactory<FlightPoint, String>("Via"));
flightAltitudeCol.setCellValueFactory(new PropertyValueFactory<FlightPoint, String>("Altitude"));
flightLatCol.setCellValueFactory(new PropertyValueFactory<FlightPoint, String>("Latitude"));
flightLongCol.setCellValueFactory(new PropertyValueFactory<FlightPoint, String>("Longitude"));
flightHeadCol.setCellValueFactory(new PropertyValueFactory<FlightPoint, String>("Heading"));
flightLegDisCol.setCellValueFactory(new PropertyValueFactory<FlightPoint, String>("Leg_Dist"));
flightTotDisCol.setCellValueFactory(new PropertyValueFactory<FlightPoint, String>("Tot_Dist"));
theDataSet = this.parent.getCurrentDataset();
ArrayList<FlightPath> flightPaths;
flightPaths = theDataSet.getFlightPaths();
int firstID = flightPaths.get(0).getID();
ArrayList<FlightPoint> flightPoints = flightPaths.get(0).getFlight();
flightTableView.setItems(FXCollections.observableArrayList(flightPoints));
}
public void initialize(URL arg0, ResourceBundle arg1) {
// TODO Auto-generated method stub

@ -1,22 +1,57 @@
package seng202.group9.GUI;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.control.ListView;
import seng202.group9.Controller.App;
import seng202.group9.Controller.Dataset;
import seng202.group9.Core.FlightPath;
import java.net.URL;
import java.util.ArrayList;
import java.util.ResourceBundle;
/**
* Controller for the Flights Summary Scene.
* Created by Liam Beckett on 13/09/2016.
*/
public class FlightSummaryController implements Initializable {
App parent;
private Dataset theDataSet = null;
App parent;
public void setApp(App parent){
this.parent = parent;
}
@FXML
ListView<String> flightPathListView;
final ObservableList<String> flightList = FXCollections.observableArrayList();
/**
* Loads the Flight paths into the List View and is called from the MenuController.
*/
public void flightPathListView() {
try {
theDataSet = this.parent.getCurrentDataset();
ArrayList<FlightPath> flightPaths = new ArrayList();
flightPaths = theDataSet.getFlightPaths();
for(int i = 0; i<flightPaths.size(); i++ ){
int pathID = flightPaths.get(i).getID();
String pathSource = flightPaths.get(i).departsFrom();
String pathDestin = flightPaths.get(i).arrivesAt();
String flightPathDisplayName = Integer.toString(pathID) + "_" + pathSource + "_" + pathDestin;
flightList.add(flightPathDisplayName);
}
flightPathListView.setItems(flightList);
} catch (Exception e) {
e.printStackTrace();
}
}
public void initialize(URL arg0, ResourceBundle arg1) {
// TODO Auto-generated method stub

@ -37,8 +37,29 @@ public class MenuController implements Initializable{
*/
public void viewAirlineRawData() {
try {
parent.replaceSceneContent("menu.fxml");
System.out.println("Loaded Airline Raw Data.");
AirlineRDController summaryController = (AirlineRDController) parent.replaceSceneContent("airline_raw_data.fxml");
summaryController.setApp(parent);
summaryController.loadTables();
} catch (Exception e) {
e.printStackTrace();
}
}
public void viewAirportRawData() {
try {
AirportRDController summaryController = (AirportRDController) parent.replaceSceneContent("airport_raw_data.fxml");
summaryController.setApp(parent);
summaryController.loadTables();
} catch (Exception e) {
e.printStackTrace();
}
}
public void viewRouteRawData() {
try {
RouteRDController summaryController = (RouteRDController) parent.replaceSceneContent("route_raw_data.fxml");
summaryController.setApp(parent);
//summaryController.loadTables();
} catch (Exception e) {
e.printStackTrace();
}
@ -55,6 +76,7 @@ public class MenuController implements Initializable{
try {
FlightSummaryController summaryController = (FlightSummaryController) parent.replaceSceneContent("flight_data_summary.fxml");
summaryController.setApp(parent);
summaryController.flightPathListView();
} catch (Exception e) {
e.printStackTrace();
}
@ -68,12 +90,15 @@ public class MenuController implements Initializable{
FlightRawDataController rawDataController = (FlightRawDataController)
parent.replaceSceneContent("flight_raw_data.fxml");
rawDataController.setApp(parent);
rawDataController.loadTables();
rawDataController.flightPathListView();
} catch (Exception e) {
e.printStackTrace();
}
}
public void initialize(URL arg0, ResourceBundle arg1) {
// TODO Auto-generated method stub

@ -0,0 +1,14 @@
package seng202.group9.GUI;
import seng202.group9.Controller.App;
/**
* Created by Sunguin on 2016/09/14.
*/
public class RouteRDController extends MenuController {
App parent;
public void setApp(App parent){
this.parent = parent;
}
}

@ -1,127 +1,98 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.shape.*?>
<?import javafx.geometry.*?>
<?import javafx.scene.text.*?>
<?import javafx.scene.control.*?>
<?import java.lang.*?>
<?import javafx.scene.layout.*?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.TableColumn?>
<?import javafx.scene.control.TableView?>
<?import javafx.scene.control.TextField?>
<?import javafx.scene.layout.ColumnConstraints?>
<?import javafx.scene.layout.GridPane?>
<?import javafx.scene.layout.Pane?>
<?import javafx.scene.layout.RowConstraints?>
<?import javafx.scene.shape.Rectangle?>
<?import javafx.scene.text.Font?>
<GridPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="533.0" prefWidth="600.0" xmlns:fx="http://javafx.com/fxml/1" xmlns="http://javafx.com/javafx/8">
<GridPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="600.0" prefWidth="800.0" xmlns="http://javafx.com/javafx/8.0.60" xmlns:fx="http://javafx.com/fxml/1" fx:controller="seng202.group9.GUI.AirlineRDController">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints maxHeight="125.0" minHeight="0.0" prefHeight="9.0" vgrow="SOMETIMES" />
<RowConstraints maxHeight="457.0" minHeight="10.0" prefHeight="403.0" vgrow="SOMETIMES" />
<RowConstraints maxHeight="129.0" minHeight="10.0" prefHeight="111.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<MenuBar GridPane.columnSpan="2">
<menus>
<Menu mnemonicParsing="false" text="File">
<items>
<MenuItem mnemonicParsing="false" onAction="#importAirports" text="Import Airports" />
<MenuItem mnemonicParsing="false" onAction="#importAirlines" text="Import Airlines" />
<MenuItem mnemonicParsing="false" onAction="#importRoutes" text="Import Routes" />
<MenuItem mnemonicParsing="false" onAction="#importFlightData" text="Import Flight Data" />
<SeparatorMenuItem mnemonicParsing="false" />
<MenuItem mnemonicParsing="false" text="Close" />
</items>
</Menu>
<Menu mnemonicParsing="false" text="View" />
<Menu mnemonicParsing="false" text="Analysis" />
<Menu mnemonicParsing="false" text="Help">
<items>
<MenuItem mnemonicParsing="false" text="Getting Started" />
</items>
</Menu>
</menus>
</MenuBar>
<Pane prefHeight="141.0" prefWidth="306.0" GridPane.columnSpan="2" GridPane.rowIndex="1">
<Pane prefHeight="410.0" prefWidth="773.0" GridPane.columnSpan="2">
<children>
<ScrollPane layoutX="-1.0" layoutY="9.0" prefHeight="513.0" prefWidth="600.0" vbarPolicy="ALWAYS">
<content>
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="200.0" prefWidth="200.0" />
</content>
</ScrollPane>
<Label layoutX="14.0" layoutY="14.0" text="Airline Raw Data">
<font>
<Font size="29.0" />
</font>
</Label>
<ScrollPane layoutX="14.0" layoutY="59.0" prefHeight="243.0" prefWidth="561.0">
<content>
<TableView prefHeight="245.0" prefWidth="755.0">
<Button layoutX="10.0" layoutY="420.0" mnemonicParsing="false" prefHeight="25.0" prefWidth="125.0" text="Analyse" />
<Button layoutX="661.0" layoutY="420.0" mnemonicParsing="false" onAction="#addAirlineSingle" prefHeight="25.0" prefWidth="125.0" text="Add" />
<Pane layoutX="23.0" layoutY="60.0" prefHeight="309.0" prefWidth="757.0">
<children>
<TableView fx:id="tableView" layoutX="1.0" prefHeight="309.0" prefWidth="755.0">
<columns>
<TableColumn prefWidth="83.0" text="Airline ID" />
<TableColumn prefWidth="137.0" text="Name" />
<TableColumn minWidth="0.0" prefWidth="129.0" text="Alias" />
<TableColumn minWidth="0.0" prefWidth="69.0" text="IATA" />
<TableColumn minWidth="0.0" prefWidth="67.0" text="ICAO" />
<TableColumn minWidth="0.0" prefWidth="93.0" text="Callsign" />
<TableColumn minWidth="0.0" prefWidth="84.0" text="Country" />
<TableColumn minWidth="8.0" prefWidth="92.0" text="Active" />
<TableColumn fx:id="airlIDcol" prefWidth="83.0" text="Airline ID" />
<TableColumn fx:id="airlNamecol" prefWidth="137.0" text="Name" />
<TableColumn fx:id="airlAliascol" minWidth="0.0" prefWidth="129.0" text="Alias" />
<TableColumn fx:id="airlIATAcol" minWidth="0.0" prefWidth="69.0" text="IATA" />
<TableColumn fx:id="airlICAOcol" minWidth="0.0" prefWidth="67.0" text="ICAO" />
<TableColumn fx:id="airlCallsigncol" minWidth="0.0" prefWidth="93.0" text="Callsign" />
<TableColumn fx:id="airlCountrycol" minWidth="0.0" prefWidth="84.0" text="Country" />
<TableColumn fx:id="airlActivecol" minWidth="8.0" prefWidth="92.0" text="Active" />
</columns>
</TableView>
</content>
</ScrollPane>
<ScrollPane hbarPolicy="ALWAYS" layoutX="14.0" layoutY="311.0" prefHeight="47.0" prefViewportHeight="29.0" prefViewportWidth="1095.0" prefWidth="561.0" vbarPolicy="NEVER">
<content>
<Pane prefHeight="49.0" prefWidth="776.0">
<children>
<TextField layoutX="6.0" layoutY="2.0" prefHeight="25.0" prefWidth="80.0" promptText="Airline ID">
<padding>
<Insets left="2.0" right="2.0" />
</padding>
</TextField>
<TextField layoutX="86.0" layoutY="2.0" prefHeight="25.0" prefWidth="137.0" promptText="Name">
<padding>
<Insets left="2.0" right="2.0" />
</padding>
</TextField>
<TextField layoutX="223.0" layoutY="2.0" prefHeight="25.0" prefWidth="125.0" promptText="Alias">
<padding>
<Insets left="2.0" right="2.0" />
</padding>
</TextField>
<TextField layoutX="350.0" layoutY="2.0" prefHeight="25.0" prefWidth="67.0" promptText="IATA">
<padding>
<Insets left="2.0" right="2.0" />
</padding>
</TextField>
<TextField layoutX="418.0" layoutY="2.0" prefHeight="25.0" prefWidth="69.0" promptText="ICAO">
<padding>
<Insets left="2.0" right="2.0" />
</padding>
</TextField>
<TextField layoutX="487.0" layoutY="2.0" prefHeight="25.0" prefWidth="87.0" promptText="Callsign">
<padding>
<Insets left="2.0" right="2.0" />
</padding>
</TextField>
<TextField layoutX="574.0" layoutY="2.0" prefHeight="25.0" prefWidth="87.0" promptText="Country">
<padding>
<Insets left="2.0" right="2.0" />
</padding>
</TextField>
<TextField layoutX="659.0" layoutY="2.0" prefHeight="25.0" prefWidth="93.0" promptText="Active">
<padding>
<Insets left="2.0" right="2.0" />
</padding>
</TextField>
</children>
</Pane>
</content>
</ScrollPane>
<Button layoutX="14.0" layoutY="367.0" mnemonicParsing="false" prefHeight="25.0" prefWidth="125.0" text="Analyse" />
<Button layoutX="452.0" layoutY="367.0" mnemonicParsing="false" prefHeight="25.0" prefWidth="125.0" text="Add" />
</children>
</Pane>
<Pane layoutX="23.0" layoutY="379.0" prefHeight="31.0" prefWidth="757.0">
<children>
<TextField fx:id="airlNameBox" layoutX="92.0" layoutY="2.0" prefHeight="25.0" prefWidth="137.0" promptText="Name">
<padding>
<Insets left="2.0" right="2.0" />
</padding>
</TextField>
<TextField fx:id="airlAliasBox" layoutX="229.0" layoutY="2.0" prefHeight="25.0" prefWidth="125.0" promptText="Alias">
<padding>
<Insets left="2.0" right="2.0" />
</padding>
</TextField>
<TextField fx:id="airlIATABox" layoutX="354.0" layoutY="2.0" prefHeight="25.0" prefWidth="67.0" promptText="IATA">
<padding>
<Insets left="2.0" right="2.0" />
</padding>
</TextField>
<TextField fx:id="airlICAOBox" layoutX="421.0" layoutY="2.0" prefHeight="25.0" prefWidth="69.0" promptText="ICAO">
<padding>
<Insets left="2.0" right="2.0" />
</padding>
</TextField>
<TextField fx:id="airlCallsignBox" layoutX="490.0" layoutY="2.0" prefHeight="25.0" prefWidth="87.0" promptText="Callsign">
<padding>
<Insets left="2.0" right="2.0" />
</padding>
</TextField>
<TextField fx:id="airlCountryBox" layoutX="577.0" layoutY="2.0" prefHeight="25.0" prefWidth="87.0" promptText="Country">
<padding>
<Insets left="2.0" right="2.0" />
</padding>
</TextField>
<TextField fx:id="airlActiveBox" layoutX="664.0" layoutY="2.0" prefHeight="25.0" prefWidth="93.0" promptText="Active">
<padding>
<Insets left="2.0" right="2.0" />
</padding>
</TextField>
<Label layoutY="2.0" prefHeight="25.0" prefWidth="93.0" text="Enter Values:" />
</children>
</Pane>
</children>
</Pane>
<Pane prefHeight="114.0" prefWidth="202.0" GridPane.columnSpan="2" GridPane.rowIndex="2">
<Pane prefHeight="114.0" prefWidth="202.0" GridPane.columnSpan="2" GridPane.rowIndex="1">
<children>
<Rectangle arcHeight="5.0" arcWidth="5.0" fill="#ec1fff35" height="114.0" layoutY="1.0" stroke="BLACK" strokeType="INSIDE" width="584.0" />
<Rectangle arcHeight="5.0" arcWidth="5.0" fill="#ec1fff35" height="145.0" stroke="BLACK" strokeType="INSIDE" width="800.0" />
</children>
</Pane>
</children>

@ -1,146 +1,126 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.shape.*?>
<?import javafx.geometry.*?>
<?import javafx.scene.text.*?>
<?import javafx.scene.control.*?>
<?import java.lang.*?>
<?import javafx.scene.layout.*?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.ScrollPane?>
<?import javafx.scene.control.TableColumn?>
<?import javafx.scene.control.TableView?>
<?import javafx.scene.control.TextField?>
<?import javafx.scene.layout.ColumnConstraints?>
<?import javafx.scene.layout.GridPane?>
<?import javafx.scene.layout.Pane?>
<?import javafx.scene.layout.RowConstraints?>
<?import javafx.scene.shape.Rectangle?>
<?import javafx.scene.text.Font?>
<GridPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="533.0" prefWidth="600.0" xmlns:fx="http://javafx.com/fxml/1" xmlns="http://javafx.com/javafx/8">
<GridPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="600.0" prefWidth="800.0" xmlns="http://javafx.com/javafx/8.0.60" xmlns:fx="http://javafx.com/fxml/1" fx:controller="seng202.group9.GUI.AirportRDController">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints maxHeight="125.0" minHeight="0.0" prefHeight="9.0" vgrow="SOMETIMES" />
<RowConstraints maxHeight="457.0" minHeight="10.0" prefHeight="403.0" vgrow="SOMETIMES" />
<RowConstraints maxHeight="129.0" minHeight="10.0" prefHeight="111.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<MenuBar GridPane.columnSpan="2">
<menus>
<Menu mnemonicParsing="false" text="File">
<items>
<MenuItem mnemonicParsing="false" onAction="#importAirports" text="Import Airports" />
<MenuItem mnemonicParsing="false" onAction="#importAirlines" text="Import Airlines" />
<MenuItem mnemonicParsing="false" onAction="#importRoutes" text="Import Routes" />
<MenuItem mnemonicParsing="false" onAction="#importFlightData" text="Import Flight Data" />
<SeparatorMenuItem mnemonicParsing="false" />
<MenuItem mnemonicParsing="false" text="Close" />
</items>
</Menu>
<Menu mnemonicParsing="false" text="View" />
<Menu mnemonicParsing="false" text="Analysis" />
<Menu mnemonicParsing="false" text="Help">
<items>
<MenuItem mnemonicParsing="false" text="Getting Started" />
</items>
</Menu>
</menus>
</MenuBar>
<Pane prefHeight="141.0" prefWidth="306.0" GridPane.columnSpan="2" GridPane.rowIndex="1">
<Pane prefHeight="141.0" prefWidth="600.0" GridPane.columnSpan="2">
<children>
<ScrollPane layoutX="-1.0" layoutY="9.0" prefHeight="513.0" prefWidth="600.0" vbarPolicy="ALWAYS">
<content>
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="200.0" prefWidth="200.0" />
</content>
</ScrollPane>
<Label layoutX="14.0" layoutY="14.0" text="Airport Raw Data">
<font>
<Font size="29.0" />
</font>
</Label>
<ScrollPane layoutX="14.0" layoutY="59.0" prefHeight="243.0" prefWidth="563.0">
<content>
<TableView prefHeight="245.0" prefWidth="1094.0">
<columns>
<TableColumn prefWidth="83.0" text="Airport ID" />
<TableColumn prefWidth="137.0" text="Name" />
<TableColumn minWidth="0.0" prefWidth="129.0" text="City" />
<TableColumn minWidth="0.0" prefWidth="96.0" text="Country" />
<TableColumn minWidth="0.0" prefWidth="87.0" text="IATA/FAA" />
<TableColumn minWidth="0.0" prefWidth="48.0" text="ICAO" />
<TableColumn minWidth="0.0" prefWidth="82.0" text="Latitude" />
<TableColumn minWidth="8.0" prefWidth="92.0" text="Longitude" />
<TableColumn minWidth="0.0" prefWidth="78.0" text="Altitude" />
<TableColumn minWidth="0.0" text="Timezone" />
<TableColumn minWidth="0.0" prefWidth="0.0" text="DST" />
<TableColumn minWidth="0.0" prefWidth="181.0" text="Tz database time zone" />
</columns>
</TableView>
</content>
</ScrollPane>
<ScrollPane hbarPolicy="ALWAYS" layoutX="14.0" layoutY="311.0" prefHeight="47.0" prefViewportHeight="29.0" prefViewportWidth="1095.0" prefWidth="563.0" vbarPolicy="NEVER">
<ScrollPane hbarPolicy="ALWAYS" layoutX="14.0" layoutY="364.0" prefHeight="47.0" prefViewportHeight="29.0" prefViewportWidth="1095.0" prefWidth="770.0" vbarPolicy="NEVER">
<content>
<Pane prefHeight="49.0" prefWidth="1097.0">
<Pane prefHeight="29.0" prefWidth="1219.0">
<children>
<TextField layoutX="6.0" layoutY="2.0" prefHeight="25.0" prefWidth="80.0" promptText="Airport ID">
<TextField fx:id="airpNameBox" layoutX="89.0" layoutY="2.0" prefHeight="25.0" prefWidth="137.0" promptText="Name">
<padding>
<Insets left="2.0" right="2.0" />
</padding>
</TextField>
<TextField layoutX="86.0" layoutY="2.0" prefHeight="25.0" prefWidth="137.0" promptText="Name">
<TextField fx:id="airpCityBox" layoutX="226.0" layoutY="2.0" prefHeight="25.0" prefWidth="129.0" promptText="City">
<padding>
<Insets left="2.0" right="2.0" />
</padding>
</TextField>
<TextField layoutX="223.0" layoutY="2.0" prefHeight="25.0" prefWidth="130.0" promptText="City">
<TextField fx:id="airpCountryBox" layoutX="355.0" layoutY="2.0" prefHeight="25.0" prefWidth="96.0" promptText="Country">
<padding>
<Insets left="2.0" right="2.0" />
</padding>
</TextField>
<TextField layoutX="353.0" layoutY="2.0" prefHeight="25.0" prefWidth="95.0" promptText="Country">
<TextField fx:id="airpIATAFFABox" layoutX="451.0" layoutY="2.0" prefHeight="25.0" prefWidth="87.0" promptText="IATA/FAA">
<padding>
<Insets left="2.0" right="2.0" />
</padding>
</TextField>
<TextField layoutX="448.0" layoutY="2.0" prefHeight="25.0" prefWidth="87.0" promptText="IATA/FAA">
<TextField fx:id="airpICAOBox" layoutX="538.0" layoutY="2.0" prefHeight="25.0" prefWidth="48.0" promptText="ICAO">
<padding>
<Insets left="2.0" right="2.0" />
</padding>
</TextField>
<TextField layoutX="535.0" layoutY="2.0" prefHeight="25.0" prefWidth="48.0" promptText="ICAO">
<TextField fx:id="airpLatitudeBox" layoutX="586.0" layoutY="2.0" prefHeight="25.0" prefWidth="82.0" promptText="Latitude">
<padding>
<Insets left="2.0" right="2.0" />
</padding>
</TextField>
<TextField layoutX="583.0" layoutY="2.0" prefHeight="25.0" prefWidth="84.0" promptText="Latitude">
<TextField fx:id="airpLongitudeBox" layoutX="668.0" layoutY="2.0" prefHeight="25.0" prefWidth="92.0" promptText="Longitude">
<padding>
<Insets left="2.0" right="2.0" />
</padding>
</TextField>
<TextField layoutX="667.0" layoutY="2.0" prefHeight="25.0" prefWidth="89.0" promptText="Longitude">
<TextField fx:id="airpAltitudeBox" layoutX="760.0" layoutY="2.0" prefHeight="25.0" prefWidth="78.0" promptText="Altitude">
<padding>
<Insets left="2.0" right="2.0" />
</padding>
</TextField>
<TextField layoutX="756.0" layoutY="2.0" prefHeight="25.0" prefWidth="80.0" promptText="Altitude">
<TextField fx:id="airpTimezoneBox" layoutX="838.0" layoutY="2.0" prefHeight="25.0" prefWidth="80.0" promptText="Timezone">
<padding>
<Insets left="2.0" right="2.0" />
</padding>
</TextField>
<TextField layoutX="836.0" layoutY="2.0" prefHeight="25.0" prefWidth="81.0" promptText="Timezone">
<TextField fx:id="airpTzBox" layoutX="1023.0" layoutY="3.0" prefHeight="25.0" prefWidth="182.0" promptText="Tz database time zone">
<padding>
<Insets left="2.0" right="2.0" />
</padding>
</TextField>
<TextField layoutX="917.0" layoutY="2.0" prefHeight="25.0" prefWidth="176.0" promptText="Tz database time zone">
<TextField fx:id="airpDSTBox" layoutX="918.0" layoutY="2.0" prefHeight="25.0" prefWidth="102.0" promptText="DST">
<padding>
<Insets left="2.0" right="2.0" />
</padding>
</TextField>
<Label layoutY="2.0" prefHeight="25.0" prefWidth="87.0" text="Enter Values:" />
</children>
</Pane>
</content>
</ScrollPane>
<Button layoutX="14.0" layoutY="367.0" mnemonicParsing="false" prefHeight="25.0" prefWidth="125.0" text="Analyse" />
<Button layoutX="452.0" layoutY="367.0" mnemonicParsing="false" prefHeight="25.0" prefWidth="125.0" text="Add" />
<Button layoutX="10.0" layoutY="420.0" mnemonicParsing="false" prefHeight="25.0" prefWidth="125.0" text="Analyse" />
<Button layoutX="661.0" layoutY="420.0" mnemonicParsing="false" onAction="#addAirportSingle" prefHeight="25.0" prefWidth="125.0" text="Add" />
<Pane layoutX="15.0" layoutY="60.0" prefHeight="295.0" prefWidth="772.0">
<children>
<TableView fx:id="tableViewAirportRD" prefHeight="293.0" prefWidth="770.0">
<columns>
<TableColumn fx:id="airpIDcol" prefWidth="83.0" text="Airport ID" />
<TableColumn fx:id="airpNamecol" prefWidth="137.0" text="Name" />
<TableColumn fx:id="airpCitycol" minWidth="0.0" prefWidth="129.0" text="City" />
<TableColumn fx:id="airpCountrycol" minWidth="0.0" prefWidth="96.0" text="Country" />
<TableColumn fx:id="airpIATAFFAcol" minWidth="0.0" prefWidth="87.0" text="IATA/FAA" />
<TableColumn fx:id="airpICAOcol" minWidth="0.0" prefWidth="48.0" text="ICAO" />
<TableColumn fx:id="airpLatitudecol" minWidth="0.0" prefWidth="82.0" text="Latitude" />
<TableColumn fx:id="airpLongitudecol" minWidth="8.0" prefWidth="92.0" text="Longitude" />
<TableColumn fx:id="airpAltitudecol" minWidth="0.0" prefWidth="78.0" text="Altitude" />
<TableColumn fx:id="airpTimezonecol" minWidth="0.0" text="Timezone" />
<TableColumn fx:id="airpDSTcol" prefWidth="102.0" text="DST" />
<TableColumn fx:id="airpTzcol" minWidth="0.0" prefWidth="182.0" text="Tz database time zone" />
</columns>
</TableView>
</children></Pane>
</children>
</Pane>
<Pane prefHeight="114.0" prefWidth="202.0" GridPane.columnSpan="2" GridPane.rowIndex="2">
<Pane prefHeight="153.0" prefWidth="800.0" GridPane.columnSpan="2" GridPane.rowIndex="1">
<children>
<Rectangle arcHeight="5.0" arcWidth="5.0" fill="#ec1fff35" height="114.0" layoutY="1.0" stroke="BLACK" strokeType="INSIDE" width="584.0" />
<Rectangle arcHeight="5.0" arcWidth="5.0" fill="#ec1fff35" height="142.0" layoutY="1.0" stroke="BLACK" strokeType="INSIDE" width="800.0" />
</children>
</Pane>
</children>

@ -2,12 +2,14 @@
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.ListView?>
<?import javafx.scene.control.ScrollPane?>
<?import javafx.scene.control.TextArea?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.ColumnConstraints?>
<?import javafx.scene.layout.GridPane?>
<?import javafx.scene.layout.Pane?>
<?import javafx.scene.layout.RowConstraints?>
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.shape.Rectangle?>
<?import javafx.scene.text.Font?>
@ -15,79 +17,108 @@
<VBox maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="800.0" prefWidth="800.0" xmlns="http://javafx.com/javafx/8.0.65" xmlns:fx="http://javafx.com/fxml/1" fx:controller="seng202.group9.GUI.FlightSummaryController">
<children>
<ScrollPane prefHeight="800.0" prefWidth="800.0">
<ScrollPane hbarPolicy="NEVER" prefHeight="800.0" prefWidth="800.0" vbarPolicy="NEVER">
<content>
<AnchorPane prefHeight="800.0" prefWidth="800.0">
<AnchorPane prefHeight="600.0" prefWidth="800.0">
<children>
<HBox alignment="CENTER" prefHeight="300.0" prefWidth="583.0" AnchorPane.topAnchor="25.0">
<GridPane prefHeight="600.0" prefWidth="800.0">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" maxWidth="493.0" minWidth="10.0" prefWidth="484.0" />
<ColumnConstraints hgrow="SOMETIMES" maxWidth="393.0" minWidth="10.0" prefWidth="316.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints maxHeight="261.0" minHeight="0.0" prefHeight="48.0" vgrow="SOMETIMES" />
<RowConstraints maxHeight="711.0" minHeight="10.0" prefHeight="542.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<AnchorPane prefHeight="300.0" prefWidth="330.0">
<GridPane GridPane.rowIndex="1">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" maxWidth="237.0" minWidth="10.0" prefWidth="168.0" />
<ColumnConstraints hgrow="SOMETIMES" maxWidth="316.0" minWidth="10.0" prefWidth="316.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints maxHeight="172.0" minHeight="0.0" prefHeight="44.0" vgrow="SOMETIMES" />
<RowConstraints maxHeight="461.0" minHeight="10.0" prefHeight="454.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<Pane layoutY="-6.0" prefHeight="60.0" prefWidth="330.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<Pane prefHeight="461.0" prefWidth="175.0" GridPane.rowIndex="1">
<children>
<ListView fx:id="flightPathListView" layoutX="20.0" layoutY="27.0" prefHeight="404.0" prefWidth="125.0" />
<Label layoutX="26.0" layoutY="4.0" text="Flight Path File(s)">
<font>
<Font size="15.0" />
</font>
</Label>
</children>
</Pane>
<Pane prefHeight="60.0" prefWidth="330.0">
<children>
<Text layoutX="21.0" layoutY="40.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Flight Data Summary">
<font>
<Font size="29.0" />
<Font size="48.0" />
</font>
</Text>
</children>
</Pane>
<Pane layoutY="52.0" prefHeight="240.0" prefWidth="480.0" AnchorPane.bottomAnchor="0.0">
<Pane prefHeight="934.0" prefWidth="474.0" GridPane.columnIndex="1" GridPane.rowIndex="1">
<children>
<Rectangle arcHeight="5.0" arcWidth="5.0" fill="#0d93e0" height="220.0" layoutX="170.0" layoutY="10.0" smooth="false" stroke="BLACK" strokeType="INSIDE" strokeWidth="0.0" width="160.0" />
<Pane layoutX="25.0" layoutY="10.0" prefHeight="220.0" prefWidth="120.0">
<children>
<ListView prefHeight="220.0" prefWidth="120.0" />
</children>
</Pane>
<Rectangle arcHeight="5.0" arcWidth="5.0" fill="#0d93e0" height="432.0" layoutX="5.0" layoutY="-1.0" smooth="false" stroke="BLACK" strokeType="INSIDE" strokeWidth="0.0" width="305.0" />
</children>
<padding>
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
</padding>
</Pane>
</children>
</AnchorPane>
<AnchorPane prefHeight="300.0" prefWidth="253.0">
</GridPane>
<GridPane GridPane.columnIndex="1" GridPane.rowIndex="1">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints maxHeight="347.0" minHeight="10.0" prefHeight="346.0" vgrow="SOMETIMES" />
<RowConstraints maxHeight="356.0" minHeight="10.0" prefHeight="152.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<Pane layoutY="200.0" prefHeight="100.0" prefWidth="253.0">
<Pane prefHeight="160.0" prefWidth="295.0" GridPane.rowIndex="1">
<children>
<Button layoutX="20.0" layoutY="14.0" mnemonicParsing="false" prefHeight="25.0" prefWidth="65.0" text="Airports">
<Button layoutX="33.0" layoutY="82.0" mnemonicParsing="false" prefHeight="25.0" prefWidth="65.0" text="Airports">
<font>
<Font size="12.0" />
</font>
</Button>
<Button layoutX="94.0" layoutY="14.0" mnemonicParsing="false" prefHeight="25.0" prefWidth="65.0" text="Routes">
<Button layoutX="126.0" layoutY="81.0" mnemonicParsing="false" prefHeight="25.0" prefWidth="65.0" text="Routes">
<font>
<Font size="12.0" />
</font>
</Button>
<Button layoutX="169.0" layoutY="14.0" mnemonicParsing="false" prefHeight="25.0" prefWidth="65.0" text="Airlines">
<Button layoutX="218.0" layoutY="81.0" mnemonicParsing="false" prefHeight="25.0" prefWidth="65.0" text="Airlines">
<font>
<Font size="12.0" />
</font>
</Button>
<Button layoutX="20.0" layoutY="61.0" mnemonicParsing="false" prefHeight="25.0" prefWidth="214.0" text="Flight Raw Data" />
<Button layoutX="33.0" layoutY="129.0" mnemonicParsing="false" prefHeight="25.0" prefWidth="250.0" text="Flight Raw Data" />
</children>
<padding>
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
</padding>
</Pane>
<Pane prefHeight="200.0" prefWidth="253.0">
<Pane prefHeight="200.0" prefWidth="200.0">
<children>
<TextArea layoutX="20.0" layoutY="20.0" prefHeight="160.0" prefWidth="213.0">
<Pane prefHeight="350.0" prefWidth="316.0">
<children>
<ListView layoutX="25.0" layoutY="16.0" prefHeight="318.0" prefWidth="266.0" />
</children>
<padding>
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
</padding>
</TextArea>
</Pane>
</children>
<padding>
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
</padding>
</Pane>
</children>
</AnchorPane>
</GridPane>
</children>
</HBox>
</GridPane>
</children>
</AnchorPane>
</content>

@ -1,71 +1,103 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.*?>
<?import javafx.scene.text.*?>
<?import javafx.scene.paint.*?>
<?import javafx.geometry.*?>
<?import javafx.scene.effect.*?>
<?import javafx.scene.shape.*?>
<?import java.lang.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.ListView?>
<?import javafx.scene.control.ScrollPane?>
<?import javafx.scene.control.TableColumn?>
<?import javafx.scene.control.TableView?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.ColumnConstraints?>
<?import javafx.scene.layout.GridPane?>
<?import javafx.scene.layout.Pane?>
<?import javafx.scene.layout.RowConstraints?>
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.text.Font?>
<?import javafx.scene.text.Text?>
<VBox maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="seng202.group9.GUI.FlightRawDataController">
<VBox maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="600.0" prefWidth="800.0" xmlns="http://javafx.com/javafx/8.0.65" xmlns:fx="http://javafx.com/fxml/1" fx:controller="seng202.group9.GUI.FlightRawDataController">
<children>
<AnchorPane prefHeight="371.0" prefWidth="600.0">
<children>
<HBox prefHeight="300.0" prefWidth="583.0">
<ScrollPane hbarPolicy="NEVER" prefHeight="603.0" prefWidth="751.0" vbarPolicy="NEVER">
<content>
<AnchorPane prefHeight="371.0" prefWidth="600.0">
<children>
<AnchorPane prefHeight="300.0" prefWidth="330.0">
<GridPane prefHeight="600.0" prefWidth="800.0">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints maxHeight="193.0" minHeight="10.0" prefHeight="33.0" vgrow="SOMETIMES" />
<RowConstraints maxHeight="193.0" minHeight="10.0" prefHeight="73.0" vgrow="SOMETIMES" />
<RowConstraints maxHeight="504.0" minHeight="10.0" prefHeight="434.0" vgrow="SOMETIMES" />
<RowConstraints maxHeight="62.0" minHeight="10.0" prefHeight="62.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<Pane layoutY="-6.0" prefHeight="60.0" prefWidth="274.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="309.0" AnchorPane.topAnchor="0.0">
<GridPane GridPane.rowIndex="2">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" maxWidth="393.0" minWidth="10.0" prefWidth="176.0" />
<ColumnConstraints hgrow="SOMETIMES" maxWidth="651.0" minWidth="10.0" prefWidth="624.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<Text layoutX="15.0" layoutY="40.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Flight Raw Data">
<font>
<Font size="29.0" />
</font>
</Text>
</children>
</Pane>
<Pane layoutY="52.0" prefHeight="240.0" prefWidth="583.0" AnchorPane.bottomAnchor="0.0">
<children>
<Pane layoutX="15.0" prefHeight="220.0" prefWidth="120.0">
<Pane prefHeight="434.0" prefWidth="304.0">
<children>
<ScrollBar layoutX="100.0" orientation="VERTICAL" prefHeight="240.0" prefWidth="17.0" />
<ListView prefHeight="240.0" prefWidth="100.0" />
<Group layoutX="60.0" layoutY="31.0" />
<ListView fx:id="flightPathListView" layoutX="25.0" layoutY="27.0" prefHeight="384.0" prefWidth="125.0" />
<Label layoutX="31.0" layoutY="4.0" text="Flight Path File(s)">
<font>
<Font size="15.0" />
</font>
</Label>
</children>
</Pane>
<ScrollPane layoutX="141.0" prefHeight="240.0" prefWidth="430.0">
<content>
<TableView prefHeight="238.0" prefWidth="750.0">
<GridPane prefHeight="473.0" prefWidth="650.0" GridPane.columnIndex="1">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" maxWidth="617.0" minWidth="10.0" prefWidth="607.0" />
<ColumnConstraints hgrow="SOMETIMES" maxWidth="318.0" minWidth="10.0" prefWidth="43.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints maxHeight="414.0" minHeight="10.0" prefHeight="374.0" vgrow="SOMETIMES" />
<RowConstraints maxHeight="137.0" minHeight="1.0" prefHeight="60.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<Pane GridPane.rowIndex="1">
<children>
<Button layoutX="540.0" layoutY="10.0" mnemonicParsing="false" text="Analyse" GridPane.rowIndex="1" />
</children>
</Pane>
<TableView fx:id="flightTableView">
<columns>
<TableColumn prefWidth="75.0" text="ID" />
<TableColumn prefWidth="75.0" text="Type" />
<TableColumn prefWidth="75.0" text="Via" />
<TableColumn prefWidth="75.0" text="Altitude" />
<TableColumn prefWidth="75.0" text="Latitude" />
<TableColumn prefWidth="75.0" text="Longitude" />
<TableColumn prefWidth="75.0" text="Leg Dist" />
<TableColumn prefWidth="75.0" text="Tot Dist" />
<TableColumn prefWidth="75.0" text="Heading (True)" />
<TableColumn prefWidth="75.0" text="Name" />
<TableColumn fx:id="flightIdCol" prefWidth="75.0" text="ID" />
<TableColumn fx:id="flightNameCol" prefWidth="100.0" text="Name" />
<TableColumn fx:id="flightTypeCol" prefWidth="75.0" text="Type" />
<TableColumn fx:id="flightViaCol" prefWidth="100.0" text="Via" />
<TableColumn fx:id="flightAltitudeCol" prefWidth="75.0" text="Altitude" />
<TableColumn fx:id="flightLatCol" prefWidth="100.0" text="Latitude" />
<TableColumn fx:id="flightLongCol" prefWidth="100.0" text="Longitude" />
<TableColumn fx:id="flightHeadCol" prefWidth="100.0" text="Heading" />
<TableColumn fx:id="flightLegDisCol" prefWidth="75.0" text="Leg Dist" />
<TableColumn fx:id="flightTotDisCol" prefWidth="75.0" text="Tot Dist" />
</columns>
</TableView>
</content>
</ScrollPane>
</children>
</GridPane>
</children>
</GridPane>
<Pane prefHeight="135.0" prefWidth="400.0" GridPane.rowIndex="1">
<children>
<Text layoutX="24.0" layoutY="45.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Flight Raw Data">
<font>
<Font size="48.0" />
</font>
</Text>
</children>
<padding>
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
</padding>
</Pane>
</children>
</AnchorPane>
</GridPane>
</children>
</HBox>
<ScrollBar layoutX="583.0" orientation="VERTICAL" prefHeight="371.0" prefWidth="17.0" />
<Button layoutX="501.0" layoutY="315.0" mnemonicParsing="false" text="Analyse" />
</children>
</AnchorPane>
</AnchorPane>
</content>
</ScrollPane>
</children>
</VBox>

@ -6,7 +6,7 @@
<?import javafx.scene.control.SeparatorMenuItem?>
<?import javafx.scene.layout.VBox?>
<VBox maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8.0.65" xmlns:fx="http://javafx.com/fxml/1" fx:controller="seng202.group9.GUI.MenuController">
<VBox maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8.0.60" xmlns:fx="http://javafx.com/fxml/1" fx:controller="seng202.group9.GUI.MenuController">
<children>
<MenuBar>
<menus>
@ -25,7 +25,7 @@
<Menu mnemonicParsing="false" text="Airport">
<items>
<MenuItem mnemonicParsing="false" text="Summary" />
<MenuItem mnemonicParsing="false" text="Raw Data" />
<MenuItem mnemonicParsing="false" onAction="#viewAirportRawData" text="Raw Data" />
</items>
</Menu>
<Menu mnemonicParsing="false" text="Airline">
@ -37,7 +37,7 @@
<Menu mnemonicParsing="false" text="Route">
<items>
<MenuItem mnemonicParsing="false" text="Summary" />
<MenuItem mnemonicParsing="false" text="Raw Data" />
<MenuItem mnemonicParsing="false" onAction="#viewRouteRawData" text="Raw Data" />
</items>
</Menu>
<Menu mnemonicParsing="false" text="Flight">

@ -1,74 +1,37 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.shape.*?>
<?import javafx.geometry.*?>
<?import javafx.scene.text.*?>
<?import javafx.scene.control.*?>
<?import java.lang.*?>
<?import javafx.scene.layout.*?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.ScrollPane?>
<?import javafx.scene.control.TableColumn?>
<?import javafx.scene.control.TableView?>
<?import javafx.scene.control.TextField?>
<?import javafx.scene.layout.ColumnConstraints?>
<?import javafx.scene.layout.GridPane?>
<?import javafx.scene.layout.Pane?>
<?import javafx.scene.layout.RowConstraints?>
<?import javafx.scene.shape.Rectangle?>
<?import javafx.scene.text.Font?>
<GridPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="533.0" prefWidth="600.0" xmlns:fx="http://javafx.com/fxml/1" xmlns="http://javafx.com/javafx/8">
<GridPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="600.0" prefWidth="800.0" xmlns="http://javafx.com/javafx/8.0.60" xmlns:fx="http://javafx.com/fxml/1" fx:controller="seng202.group9.GUI.RouteRDController">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints maxHeight="125.0" minHeight="0.0" prefHeight="9.0" vgrow="SOMETIMES" />
<RowConstraints maxHeight="457.0" minHeight="10.0" prefHeight="403.0" vgrow="SOMETIMES" />
<RowConstraints maxHeight="129.0" minHeight="10.0" prefHeight="111.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<MenuBar GridPane.columnSpan="2">
<menus>
<Menu mnemonicParsing="false" text="File">
<items>
<MenuItem mnemonicParsing="false" onAction="#importAirports" text="Import Airports" />
<MenuItem mnemonicParsing="false" onAction="#importAirlines" text="Import Airlines" />
<MenuItem mnemonicParsing="false" onAction="#importRoutes" text="Import Routes" />
<MenuItem mnemonicParsing="false" onAction="#importFlightData" text="Import Flight Data" />
<SeparatorMenuItem mnemonicParsing="false" />
<MenuItem mnemonicParsing="false" text="Close" />
</items>
</Menu>
<Menu mnemonicParsing="false" text="View" />
<Menu mnemonicParsing="false" text="Analysis" />
<Menu mnemonicParsing="false" text="Help">
<items>
<MenuItem mnemonicParsing="false" text="Getting Started" />
</items>
</Menu>
</menus>
</MenuBar>
<Pane prefHeight="141.0" prefWidth="306.0" GridPane.columnSpan="2" GridPane.rowIndex="1">
<Pane prefHeight="141.0" prefWidth="306.0" GridPane.columnSpan="2">
<children>
<ScrollPane layoutX="-1.0" layoutY="9.0" prefHeight="513.0" prefWidth="600.0" vbarPolicy="ALWAYS">
<content>
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="200.0" prefWidth="200.0" />
</content>
</ScrollPane>
<Label layoutX="14.0" layoutY="14.0" text="Route Raw Data">
<font>
<Font size="29.0" />
</font>
</Label>
<ScrollPane layoutX="14.0" layoutY="59.0" prefHeight="243.0" prefWidth="559.0">
<content>
<TableView prefHeight="245.0" prefWidth="1025.0">
<columns>
<TableColumn prefWidth="67.0" text="Airline" />
<TableColumn prefWidth="86.0" text="Airline ID" />
<TableColumn minWidth="0.0" prefWidth="124.0" text="Source airport" />
<TableColumn minWidth="0.0" prefWidth="141.0" text="Source airport ID" />
<TableColumn minWidth="0.0" prefWidth="160.0" text="Destination airport" />
<TableColumn minWidth="0.0" prefWidth="184.0" text="Destination airport ID" />
<TableColumn minWidth="0.0" prefWidth="95.0" text="Codeshare" />
<TableColumn minWidth="0.0" prefWidth="69.0" text="Stops" />
<TableColumn prefWidth="98.0" text="Equipment" />
</columns>
</TableView>
</content>
</ScrollPane>
<ScrollPane hbarPolicy="ALWAYS" layoutX="14.0" layoutY="311.0" prefHeight="47.0" prefViewportHeight="29.0" prefViewportWidth="1095.0" prefWidth="559.0" vbarPolicy="NEVER">
<ScrollPane hbarPolicy="ALWAYS" layoutX="10.0" layoutY="364.0" prefHeight="47.0" prefViewportHeight="29.0" prefViewportWidth="1095.0" prefWidth="776.0" vbarPolicy="NEVER">
<content>
<Pane prefHeight="49.0" prefWidth="1021.0">
<children>
@ -102,17 +65,17 @@
<Insets left="2.0" right="2.0" />
</padding>
</TextField>
<TextField layoutX="758.0" layoutY="2.0" prefHeight="25.0" prefWidth="99.0" promptText="Codeshare">
<TextField fx:id="rCodeshareCol" layoutX="758.0" layoutY="2.0" prefHeight="25.0" prefWidth="99.0" promptText="Codeshare">
<padding>
<Insets left="2.0" right="2.0" />
</padding>
</TextField>
<TextField layoutX="857.0" layoutY="2.0" prefHeight="25.0" prefWidth="65.0" promptText="Stops">
<TextField fx:id="rStopsCol" layoutX="857.0" layoutY="2.0" prefHeight="25.0" prefWidth="65.0" promptText="Stops">
<padding>
<Insets left="2.0" right="2.0" />
</padding>
</TextField>
<TextField layoutX="922.0" layoutY="2.0" prefHeight="25.0" prefWidth="98.0" promptText="Equipment">
<TextField fx:id="rEquipmentCol" layoutX="922.0" layoutY="2.0" prefHeight="25.0" prefWidth="98.0" promptText="Equipment">
<padding>
<Insets left="2.0" right="2.0" />
</padding>
@ -121,13 +84,30 @@
</Pane>
</content>
</ScrollPane>
<Button layoutX="14.0" layoutY="367.0" mnemonicParsing="false" prefHeight="25.0" prefWidth="125.0" text="Analyse" />
<Button layoutX="452.0" layoutY="367.0" mnemonicParsing="false" prefHeight="25.0" prefWidth="125.0" text="Add" />
<Button layoutX="10.0" layoutY="420.0" mnemonicParsing="false" prefHeight="25.0" prefWidth="125.0" text="Analyse" />
<Button layoutX="661.0" layoutY="420.0" mnemonicParsing="false" onAction="#addRouteSingle" prefHeight="25.0" prefWidth="125.0" text="Add" />
<Pane layoutX="8.0" layoutY="53.0" prefHeight="300.0" prefWidth="776.0">
<children>
<TableView fx:id="tableViewRouteRD" layoutX="-1.0" prefHeight="300.0" prefWidth="784.0">
<columns>
<TableColumn fx:id="rAirlineCol" prefWidth="67.0" text="Airline" />
<TableColumn fx:id="rAirlineIDCol" prefWidth="86.0" text="Airline ID" />
<TableColumn fx:id="rSourceCol" minWidth="0.0" prefWidth="124.0" text="Source airport" />
<TableColumn fx:id="rSourceIDCol" minWidth="0.0" prefWidth="141.0" text="Source airport ID" />
<TableColumn fx:id="rDestCol" minWidth="0.0" prefWidth="160.0" text="Destination airport" />
<TableColumn fx:id="rDestIDCol" minWidth="0.0" prefWidth="184.0" text="Destination airport ID" />
<TableColumn minWidth="0.0" prefWidth="95.0" text="Codeshare" />
<TableColumn minWidth="0.0" prefWidth="69.0" text="Stops" />
<TableColumn prefWidth="98.0" text="Equipment" />
</columns>
</TableView>
</children>
</Pane>
</children>
</Pane>
<Pane prefHeight="114.0" prefWidth="202.0" GridPane.columnSpan="2" GridPane.rowIndex="2">
<Pane prefHeight="114.0" prefWidth="202.0" GridPane.columnSpan="2" GridPane.rowIndex="1">
<children>
<Rectangle arcHeight="5.0" arcWidth="5.0" fill="#ec1fff35" height="114.0" layoutY="1.0" stroke="BLACK" strokeType="INSIDE" width="584.0" />
<Rectangle arcHeight="5.0" arcWidth="5.0" fill="#ec1fff35" height="144.0" layoutY="1.0" stroke="BLACK" strokeType="INSIDE" width="800.0" />
</children>
</Pane>
</children>

Loading…
Cancel
Save