summaryrefslogtreecommitdiffstats
path: root/src/org/uic/barcode/ticket/api/spec/ITariff.java
blob: 6561430094597ff4733c1a74674f32fa7caab38f (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
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
/*
 * 
 */
package org.uic.barcode.ticket.api.spec;

import java.util.Collection;

/**
 * The Interface ITariff.
 * 
 * ITariff describes the tariff of an open ticket, reservation or  or IRT
 * 
 * 
 */
public interface ITariff {

	/**
	 * Gets the number of passengers associated with that tariff.
	 *
	 * @return the number of passengers associated with that tariff
	 */
	public int getNumberOfPassengers();


	/**
	 * Sets the number of passengers associated with that tariff.
	 *
	 * @param numberOfPassengers the new number of passengers associated with that tariff
	 */
	public void setNumberOfPassengers(int numberOfPassengers);


	/**
	 * Gets the passenger type.
	 *
	 * @return the passenger type
	 */
	public IPassengerType getPassengerType();


	/**
	 * Sets the passenger type.
	 *
	 * @param passengerType the new passenger type
	 */
	public void setPassengerType(IPassengerType passengerType);

	/**
	 * Gets the upper limit of the age of the passenger to qualify for that tariff.
	 *
	 * @return the upper age limit
	 */
	public int getAgeBelow();

	/**
	 * Sets the upper limit of the age of the passenger to qualify for that tariff.
	 *
	 * @param ageBelow the new upper limit of the age of the passenger to qualify for that tariff
	 */
	public void setAgeBelow(int ageBelow);


	/**
	 * Gets the lower limit of the age of the passenger to qualify for that tariff.
	 *
	 * @return  the lower limit of the age of the passenger to qualify for that tariff
	 */
	public int getAgeAbove();


	/**
	 * Sets the lower limit of the age of the passenger to qualify for that tariff.
	 *
	 * @param ageAbove  the new lower limit of the age of the passenger to qualify for that tariff
	 */
	public void setAgeAbove(int ageAbove);


	/**
	 * Gets the traveler ids.
	 *
	 *  This provides a link to the travelers listed in the data in case the travelers have to be named (e.g. Eurail passes)
	 *  -- 	 the number indicates the position in the traveler list starting from 1 		 
	 *
	 * @return the traveler ids
	 */
	public Collection<Integer> getTravelerIds() ;


	/**
	 * Adds the traveler id.
	 *
	 *  This provides a link to the travelers listed in the data in case the travelers have to be named (e.g. Eurail passes)
	 *  -- 	 the number indicates the position in the traveler list starting from 1 	
	 *  	 
	 * @param travelerId the traveler id
	 */
	public void addTravelerId(Integer travelerId);

	/**
	 * Checks if this tariff is restricted to the country of residence given in the traveler data.
	 *
	 * @return true, if is restricted to country of residence
	 */
	public boolean isRestrictedToCountryOfResidence();



	/**
	 * Sets if this tariff is restricted to the country of residence given in the traveler data.
	 *
	 * @param restrictedToCountryOfResidence the new restricted to country of residence
	 */
	public void setRestrictedToCountryOfResidence(boolean restrictedToCountryOfResidence);


	/**
	 * Gets the restricted to route section.
	 * 
	 * This limits the tariff to a route section.
	 * This could be used in case the age restrictions vary along the route.
	 * 
	 * @return the restricted to route section
	 */
	public IRouteSection getRestrictedToRouteSection();


	/**
	 * Sets the restricted to route section.
	 * 
	 * This limits the tariff to a route section.
	 * This could be used in case the age restrictions vary along the route.	 
	 *
	 * @param restrictedToRouteSection the new restricted to route section
	 */
	public void setRestrictedToRouteSection(IRouteSection restrictedToRouteSection);


    /**
     * Sets the series data details.
     * 
     * Add series details in case the tariff is based on data from UIC leaflet 108.1.     
     *
     * @param seriesDataDetails the new series data details
     */
    public void setSeriesDataDetails(ISeriesDataDetails seriesDataDetails);
	

    /**
     * Gets the series data details.
     *
     * Add series details in case the tariff is based on data from UIC leaflet 108.1.   
     *      
     * @return the series data details
     */
    public ISeriesDataDetails getSeriesDataDetails();

	/**
	 * Gets the tariff code.
	 *
	 * @return the tariff code
	 */
	public String getTariffId() ;


	/**
	 * Sets the tariff code.
	 *
	 * @param tariffId the new tariff code
	 */
	public void setTariffId(String tariffId);


	/**
	 * Gets the human readable tariff description.
	 *
	 * @return the human readable tariff description
	 */
	public String getTariffDescription();


	/**
	 * Sets the human readable tariff description.
	 *
	 * @param tariffDescription the new human readable tariff description
	 */
	public void setTariffDescription(String tariffDescription);

	/**
	 * Gets the list of reduction cards required to qualify for that tariff.
	 * 
	 *
	 * @return the reduction cards required to qualify for that tariff
	 */
	public Collection<ICardReference> getReductionCards();


	/**
	 * Adds a reduction card required to qualify for that tariff.
	 *
	 * @param reductionCard the reduction card
	 */
	public void addReductionCard(ICardReference reductionCard);
}