summaryrefslogtreecommitdiff
path: root/src/main/java/com/benburwell/planes/data
diff options
context:
space:
mode:
authorBen Burwell <ben.burwell@trifecta.com>2016-11-20 02:38:23 -0500
committerBen Burwell <ben.burwell@trifecta.com>2016-11-20 02:39:13 -0500
commit7411558abf4aba7d600bb9fc713d36032e4a6df3 (patch)
tree56ccca55dc7175bf3bca88e123334ed3da878333 /src/main/java/com/benburwell/planes/data
parentf1e32ed443bafc03448f0f3b36c712b9293e71e7 (diff)
Show routes
Diffstat (limited to 'src/main/java/com/benburwell/planes/data')
-rw-r--r--src/main/java/com/benburwell/planes/data/Intersection.java50
1 files changed, 50 insertions, 0 deletions
diff --git a/src/main/java/com/benburwell/planes/data/Intersection.java b/src/main/java/com/benburwell/planes/data/Intersection.java
new file mode 100644
index 0000000..453d6bc
--- /dev/null
+++ b/src/main/java/com/benburwell/planes/data/Intersection.java
@@ -0,0 +1,50 @@
+package com.benburwell.planes.data;
+
+import org.apache.commons.csv.CSVRecord;
+
+/**
+ * @author ben
+ */
+public class Intersection extends AbstractCSVReader {
+ private String airway1;
+ private String airway2;
+ private String center;
+ private double latitude;
+ private double longitude;
+ private int numberedFix;
+
+ @Override
+ public void readRecord(CSVRecord record) {
+ String[] airways = record.get("Airways").split(" ");
+ this.airway1 = airways[0];
+ this.airway2 = airways[1];
+ this.center = record.get("Center");
+ this.latitude = Double.valueOf(record.get("Latitude"));
+ this.longitude = Double.valueOf(record.get("Longitude"));
+ this.numberedFix = Integer.valueOf(record.get("Numbered Fix"));
+ }
+
+ public String getAirway1() {
+ return airway1;
+ }
+
+ public String getAirway2() {
+ return airway2;
+ }
+
+ public String getCenter() {
+ return center;
+ }
+
+ public double getLatitude() {
+ return latitude;
+ }
+
+ public double getLongitude() {
+ return longitude;
+ }
+
+ public int getNumberedFix() {
+ return numberedFix;
+ }
+}