summaryrefslogtreecommitdiffstats
path: root/src/main/java/org/uic/barcode/ticket/api/impl/SimpleTrainValidity.java
blob: 610a26898b21207a836abc03fc4458a516597aed (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
package org.uic.barcode.ticket.api.impl;

import java.util.Collection;
import java.util.Date;
import java.util.LinkedHashSet;

import org.uic.barcode.ticket.api.spec.IBoardingOrArrivalType;
import org.uic.barcode.ticket.api.spec.ITrainValidity;

/**
 * The Class SimpleTrainValidity.
 */
public class SimpleTrainValidity implements ITrainValidity {
	
	
	/** The valid from. */
	protected Date validFrom;
	
	/** The valid until. */
	protected Date  validUntil;	  

   	/** The included carriers. */
    protected Collection<String>includedCarriers = new LinkedHashSet<String>();	  

   	/** The excluded carriers. */
    protected Collection<String>excludedCarriers = new LinkedHashSet<String>();	 	    
	    
    /** The included service brands. */
    protected Collection<Integer>includedServiceBrands = new LinkedHashSet<Integer>();	
    	
    /** The excluded service brands. */
    protected Collection<Integer>excludedServiceBrands = new LinkedHashSet<Integer>();	 
    
	/** The class code. */
	protected IBoardingOrArrivalType boardingOrArrival = IBoardingOrArrivalType.boarding;      
	
	/** The valid from utc coffset. */
	protected Long validFromUTCoffset;

	/** The valid until utc coffset. */
	protected Long validUntilUTCoffset;

	
	/**
	 * Gets the included carriers.
	 *
	 * @return the included carriers
	 */
	public Collection<String> getIncludedCarriers() {
		return includedCarriers;
	}


	/**
	 * Adds the included carrier.
	 *
	 * @param carrier the carrier
	 */
	public void addIncludedCarrier(String carrier) {
		this.includedCarriers.add(carrier);
	}

	/**
	 * Gets the excluded carriers.
	 *
	 * @return the excluded carriers
	 */
	public Collection<String> getExcludedCarriers() {
		return excludedCarriers;
	}

	/**
	 * Adds the excluded carrier.
	 *
	 * @param carrier the carrier
	 */
	public void addExcludedCarrier(String carrier) {
		this.excludedCarriers.add(carrier);
	}		
	
	/**
	 * Gets the included service brands.
	 *
	 * @return the included service brands
	 */
	public Collection<Integer> getIncludedServiceBrands() {
		return includedServiceBrands;
	}

	/**
	 * Adds the included service brand.
	 *
	 * @param includedServiceBrand the included service brand
	 */
	public void addIncludedServiceBrand(Integer includedServiceBrand) {
		this.includedServiceBrands.add(includedServiceBrand);
	}

	/**
	 * Gets the excluded service brands.
	 *
	 * @return the excluded service brands
	 */
	public Collection<Integer> getExcludedServiceBrands() {
		return excludedServiceBrands;
	}

	/**
	 * Adds the excluded service brand.
	 *
	 * @param excludedServiceBrand the excluded service brand
	 */
	public void addExcludedServiceBrand(Integer excludedServiceBrand) {
		this.excludedServiceBrands.add(excludedServiceBrand);
	}
	
	public Date getFromDate() {
		return validFrom;
	}

	public void setFromDate(Date validFrom) {
		this.validFrom = validFrom;
	}

	

	
	
	/**
	 * Gets the valid from UT coffset.
	 *
	 * @return the valid from UT coffset
	 */
	public Long getValidFromUTCoffset() {
		return validFromUTCoffset;
	}

	/**
	 * Sets the valid from UT coffset.
	 *
	 * @param validFromUTCoffset the new valid from UT coffset
	 */
	public void setValidFromUTCoffset(Long validFromUTCoffset) {
		this.validFromUTCoffset = validFromUTCoffset;
	}

	/**
	 * Gets the valid until UT coffset.
	 *
	 * @return the valid until UT coffset
	 */
	public Long getValidUntilUTCoffset() {
		return validUntilUTCoffset;
	}

	/**
	 * Sets the valid until UT coffset.
	 *
	 * @param validUntilUTCoffset the new valid until UT coffset
	 */
	public void setValidUntilUTCoffset(Long validUntilUTCoffset) {
		this.validUntilUTCoffset = validUntilUTCoffset;
	}

	/**
	 * Sets the until date.
	 *
	 * @param date the new until date
	 */
	@Override
	public void setUntilDate(Date validUntil) {
		this.validUntil = validUntil;		
	}


	public Date getUntilDate() {
		return validUntil;
	}




	@Override
	public IBoardingOrArrivalType getBoardingOrArrival() {
		return this.boardingOrArrival;
	}


	@Override
	public void setBoardingOrArrival(IBoardingOrArrivalType boardingOrArrival) {
		this.boardingOrArrival = boardingOrArrival;		
	}
		
	
	

}