summaryrefslogtreecommitdiffstats
path: root/src/org/uic/ticket/api/spec/IViaStation.java
blob: aa10a014ceb54bc1b0080fd828779968dd033528 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
/*
 * 
 */
package org.uic.ticket.api.spec;

import java.util.Collection;


/**
 * The Interface IViaStation.
 * 
 * IViaStation describes a route description or a part of a route description by
 *  via station according to UIC leaflet 108.1
 *  
 *  Note:  as route description with via stations can contain alternative routes and can include 
 *  other routes the data structure is used recursively! 
 *  
 *  
 *  ViaStation could be
 *  	- a simple station
 *    or
 *  	- a list of alternative routes defined as a list of other IViaStations
 *    or 
 *      - a route defined as a list of other IViaStations
 *  
 *  
 *  
 */
public interface IViaStation extends IRegionalValidity {
	
	/**
	 * Gets the station code table.
	 *
	 * Defines the station code table to be used to retrieve station information. 
	 * Default in this case is the UIC station codes table for standard UIC 
	 * station code from MERITS (UIC country code + 5 digit local code) 
	 * 
	 * The station code table should be included only in case it differs from the station 
	 * code table used in the travel document!
	 * 
	 * @return the station code table
	 */
	public IStationCodeTable getStationCodeTable();

	/**
	 * Sets the station code table.
	 *
	 * Defines the station code table to be used to retrieve station information. 
	 * Default in this case is the UIC station codes table for standard UIC 
	 * station code from MERITS (UIC country code + 5 digit local code) 
 	 * 
	 * The station code table should be included only in case it differs from the station 
	 * code table used in the travel document!
	 * 	
	 * @param stationCodeTable the new station code table
	 */
	public void setStationCodeTable(IStationCodeTable stationCodeTable);
	
	/**
	 * Gets the station code.
	 *
	 * @return the station code
	 */
	public String getStation();
	
	/**
	 * Sets the station code.
	 *
	 * @param station the new station code
	 */
	public void setStation(String station);
	
	
	/**
	 * Gets the alternative routes.
	 *
	 * @return the alternative routes
	 */
	public Collection<IViaStation> getAlternativeRoutes();
	
	/**
	 * Adds an alternative route.
	 *
	 * @param route the alternative route
	 */
	public void addAlternativeRoute(IViaStation route);
	
	/**
	 * Gets the route.
	 *
	 * @return the route
	 */
	public Collection<IViaStation> getRoute();
	
	/**
	 * Adds the route station.
	 *
	 * @param viaStation the via station
	 */
	public void addRouteStation(IViaStation viaStation);
	
	/**
	 * Checks if the via station is a border point.
	 *
	 * @return true, if is border point
	 */
	public boolean isBorder();
	
	/**
	 * Sets if the via station is a border point.
	 *
	 * @param border the new border point flag
	 */
	public void setBorder(boolean border);
	
	/**
	 * Gets the carriers.
	 * 
	 * The carriers along the route should preferably be indicated as a list within 
	 * the ticket, and not in the via stations.
	 *
	 * @return the carriers
	 */
	public Collection<String> getCarriers();
	
	/**
	 * Adds the carrier.
	 *	 
	 * The carriers along the route should preferably be indicated as a list within 
	 * the ticket, and not in the via stations.
	 * 	 *
	 * @param carrier the carrier
	 */
	public void addCarrier(String carrier);
	
	/**
	 * Gets the route id.
	 * 
	 * A route id indicating the route in a lookup table.
	 *
	 * @return the route id
	 */
	public int getRouteId();
	
	/**
	 * Sets the route id.
	 *
	 * A route id indicating the route in a lookup table.
	 * 	 
	 * @param routeId the new route id
	 */
	public void setRouteId(int routeId);


	/**
	 * Gets the series id as defined in the price data according to UIC leaflet 108.1.
	 *
	 * @return the series id as defined in the price data according to UIC leaflet 108.1.
	 */
	public int getSeriesId();
	
	/**
	 * Sets the series id as defined in the price data according to UIC leaflet 108.1..
	 *
	 * @param seriesId the new series id as defined in the price data according to UIC leaflet 108.1.
	 */
	public void setSeriesId(int seriesId);
	

}