diff --git a/src/main/java/org/leolo/nrdatad/model/TrainScheduleLocation.java b/src/main/java/org/leolo/nrdatad/model/TrainScheduleLocation.java new file mode 100644 index 0000000..7673887 --- /dev/null +++ b/src/main/java/org/leolo/nrdatad/model/TrainScheduleLocation.java @@ -0,0 +1,161 @@ +package org.leolo.nrdatad.model; + +public class TrainScheduleLocation { + + private int recordSequence = 0; + private TrainScheduleLocationRecordIdentity recordIdentity; + private String tiploc; + private int tiplocInstance; + private long wttArrival; + private long wttDeparture; + private long wttPass; + private long publicArrival; + private long publicDeparture; + private String platform; + /** + * Line used for departure + */ + private String line; + /** + * Path used for arrival + */ + private String path; + /** + * This is extra time to allow for a speed restriction on the railway. + * + * It may also be called 'Box Time', as the Working Timetable encloses engineering allowances in a box or square brackets. + */ + private long engineeringAllowance; + /** + * This is extra time to ensure the train path doesn't conflict with others at a junction, or where trains running at different speeds are operating over a route. + * + * It may also be called 'Circle Time', as the Working Timetable encloses pathing allowances in a circle or brackets. + */ + private long pathingAllowance; + /** + * This is extra time to provide a margin or buffer for late running on a day-to-day basis. + * + * It may also be called 'Diamond Time', as the Working Timetable encloses performance allowances in a diamond or angle-brackets. + */ + private long performanceAllowance; + + public int getRecordSequence() { + return recordSequence; + } + + public void setRecordSequence(int recordSequence) { + this.recordSequence = recordSequence; + } + + public TrainScheduleLocationRecordIdentity getRecordIdentity() { + return recordIdentity; + } + + public void setRecordIdentity(TrainScheduleLocationRecordIdentity recordIdentity) { + this.recordIdentity = recordIdentity; + } + + public String getTiploc() { + return tiploc; + } + + public void setTiploc(String tiploc) { + this.tiploc = tiploc; + } + + public int getTiplocInstance() { + return tiplocInstance; + } + + public void setTiplocInstance(int tiplocInstance) { + this.tiplocInstance = tiplocInstance; + } + + public long getWttArrival() { + return wttArrival; + } + + public void setWttArrival(long wttArrival) { + this.wttArrival = wttArrival; + } + + public long getWttDeparture() { + return wttDeparture; + } + + public void setWttDeparture(long wttDeparture) { + this.wttDeparture = wttDeparture; + } + + public long getWttPass() { + return wttPass; + } + + public void setWttPass(long wttPass) { + this.wttPass = wttPass; + } + + public long getPublicArrival() { + return publicArrival; + } + + public void setPublicArrival(long publicArrival) { + this.publicArrival = publicArrival; + } + + public long getPublicDeparture() { + return publicDeparture; + } + + public void setPublicDeparture(long publicDeparture) { + this.publicDeparture = publicDeparture; + } + + public String getPlatform() { + return platform; + } + + public void setPlatform(String platform) { + this.platform = platform; + } + + public String getLine() { + return line; + } + + public void setLine(String line) { + this.line = line; + } + + public String getPath() { + return path; + } + + public void setPath(String path) { + this.path = path; + } + + public long getEngineeringAllowance() { + return engineeringAllowance; + } + + public void setEngineeringAllowance(long engineeringAllowance) { + this.engineeringAllowance = engineeringAllowance; + } + + public long getPathingAllowance() { + return pathingAllowance; + } + + public void setPathingAllowance(long pathingAllowance) { + this.pathingAllowance = pathingAllowance; + } + + public long getPerformanceAllowance() { + return performanceAllowance; + } + + public void setPerformanceAllowance(long performanceAllowance) { + this.performanceAllowance = performanceAllowance; + } +} diff --git a/src/main/java/org/leolo/nrdatad/model/TrainScheduleLocationRecordIdentity.java b/src/main/java/org/leolo/nrdatad/model/TrainScheduleLocationRecordIdentity.java new file mode 100644 index 0000000..92f68fe --- /dev/null +++ b/src/main/java/org/leolo/nrdatad/model/TrainScheduleLocationRecordIdentity.java @@ -0,0 +1,27 @@ +package org.leolo.nrdatad.model; + +public enum TrainScheduleLocationRecordIdentity { + + ORIGINATE("LO"), + INTERMEDIATE("LI"), + TERMINATE("LT"); + + private String code; + + private TrainScheduleLocationRecordIdentity(String code) { + this.code = code; + } + + public static TrainScheduleLocationRecordIdentity parseCode(String code) { + if (code == null) { + return null; + } + for (TrainScheduleLocationRecordIdentity e : TrainScheduleLocationRecordIdentity.values()) { + if (e.code.equalsIgnoreCase(code)) { + return e; + } + } + return null; + } + +} diff --git a/src/main/java/org/leolo/nrdatad/model/TrainScheduleSector.java b/src/main/java/org/leolo/nrdatad/model/TrainScheduleSector.java new file mode 100644 index 0000000..cf4c101 --- /dev/null +++ b/src/main/java/org/leolo/nrdatad/model/TrainScheduleSector.java @@ -0,0 +1,89 @@ +package org.leolo.nrdatad.model; + +public class TrainScheduleSector { + /** + * A sequence number of the schedule sector which are belongs to same schedule + */ + private int sectorId; + /** + * Service brand + */ + private String serviceBranding; + /** + * Train category + */ + private String trainCategory; + /** + * Formerly used to denote the business sector running the service; now represent the Portion ID for services which join or split + */ + private String businessSector; + /** + * Planned speed of the train service + */ + private int speed; + /** + * Reservation recommendations: + *