3 changed files with 277 additions and 0 deletions
@ -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; |
||||
} |
||||
} |
||||
@ -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; |
||||
} |
||||
|
||||
} |
||||
@ -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: |
||||
* <ul> |
||||
* <li>A - Reservations compulsory</li> |
||||
* <li>E - Reservations for bicycles essential</li> |
||||
* <li>R - Reservations recommended</li> |
||||
* <li>S - Reservations possible from any station</li> |
||||
* </ul> |
||||
*/ |
||||
private String reservation; |
||||
/** |
||||
* Up to two characters from the following: |
||||
* |
||||
* C - Buffet Service |
||||
* F - Restaurant Car available for First Class passengers |
||||
* H - Hot food available |
||||
* M - Meal included for First Class passengers |
||||
* P - Wheelchair only reservations |
||||
* R - Restaurant |
||||
* T - Trolley service |
||||
*/ |
||||
private String catering; |
||||
/** |
||||
* Power type |
||||
*/ |
||||
private String powerType; |
||||
/** |
||||
* Timing load |
||||
*/ |
||||
private String timingLoad; |
||||
/** |
||||
* Signalling ID, also referred to as headcode, not to be confused with below. For passenger services, this is the headcode of the service. For anonymous freight services this will be blank. |
||||
* |
||||
* @see TrainScheduleSector.headcode |
||||
*/ |
||||
private String signalId; |
||||
/** |
||||
* National Reservation System headcode, designated by train operator, not to be confused with signal ID. |
||||
* |
||||
* @see TrainScheduleSector.signalId |
||||
*/ |
||||
private String headcode; |
||||
/** |
||||
* Operating characteristics |
||||
*/ |
||||
private String operatingCharacteristic; |
||||
/** |
||||
* Sleeping accommodation available: |
||||
* |
||||
* B - First and standard class
|
||||
* F - First Class only |
||||
* S - Standard class only |
||||
*/ |
||||
private String sleeper; |
||||
/** |
||||
* Divides trains into service groups and used for revenue reasons |
||||
*/ |
||||
private String trainServiceCode; |
||||
/** |
||||
* Seating classes available: |
||||
* |
||||
* Blank or B - First and standard |
||||
* S - Standard class only |
||||
*/ |
||||
private String trainClass; |
||||
} |
||||
Loading…
Reference in new issue