View Javadoc
1   /*
2    * Copyright 2007 Kasper B. Graversen
3    * 
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    * 
8    *     http://www.apache.org/licenses/LICENSE-2.0
9    * 
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package org.supercsv.benchmark.model;
17  
18  
19  /**
20   * POJO to use with cell processors.
21   * 
22   * @author James Bassett
23   */
24  public class TransportLocation {
25  	
26  	private String atcoCode;
27  	private Double easting;
28  	private Double northing;
29  	private Double longitude;
30  	private Double latitude;
31  	private String commonName;
32  	private String identifier;
33  	private String direction;
34  	private String street;
35  	private String landmark;
36  	private String natGazId;
37  	private String natGazLocality;
38  	private StopType stopType;
39  	private StopTypeAndName stopTypeAndName;
40  	private IconColour iconColour;
41  	
42  	public String getAtcoCode() {
43  		return atcoCode;
44  	}
45  	
46  	public void setAtcoCode(String atcoCode) {
47  		this.atcoCode = atcoCode;
48  	}
49  	
50  	public Double getEasting() {
51  		return easting;
52  	}
53  	
54  	public void setEasting(Double easting) {
55  		this.easting = easting;
56  	}
57  	
58  	public Double getNorthing() {
59  		return northing;
60  	}
61  	
62  	public void setNorthing(Double northing) {
63  		this.northing = northing;
64  	}
65  	
66  	public Double getLongitude() {
67  		return longitude;
68  	}
69  	
70  	public void setLongitude(Double longitude) {
71  		this.longitude = longitude;
72  	}
73  	
74  	public Double getLatitude() {
75  		return latitude;
76  	}
77  	
78  	public void setLatitude(Double latitude) {
79  		this.latitude = latitude;
80  	}
81  	
82  	public String getCommonName() {
83  		return commonName;
84  	}
85  	
86  	public void setCommonName(String commonName) {
87  		this.commonName = commonName;
88  	}
89  	
90  	public String getIdentifier() {
91  		return identifier;
92  	}
93  	
94  	public void setIdentifier(String identifier) {
95  		this.identifier = identifier;
96  	}
97  	
98  	public String getDirection() {
99  		return direction;
100 	}
101 	
102 	public void setDirection(String direction) {
103 		this.direction = direction;
104 	}
105 	
106 	public String getStreet() {
107 		return street;
108 	}
109 	
110 	public void setStreet(String street) {
111 		this.street = street;
112 	}
113 	
114 	public String getLandmark() {
115 		return landmark;
116 	}
117 	
118 	public void setLandmark(String landmark) {
119 		this.landmark = landmark;
120 	}
121 	
122 	public String getNatGazId() {
123 		return natGazId;
124 	}
125 	
126 	public void setNatGazId(String natGazId) {
127 		this.natGazId = natGazId;
128 	}
129 	
130 	public String getNatGazLocality() {
131 		return natGazLocality;
132 	}
133 	
134 	public void setNatGazLocality(String natGazLocality) {
135 		this.natGazLocality = natGazLocality;
136 	}
137 	
138 	public StopType getStopType() {
139 		return stopType;
140 	}
141 	
142 	public void setStopType(StopType stopType) {
143 		this.stopType = stopType;
144 	}
145 	
146 	public StopTypeAndName getStopTypeAndName() {
147 		return stopTypeAndName;
148 	}
149 	
150 	public void setStopTypeAndName(StopTypeAndName stopTypeAndName) {
151 		this.stopTypeAndName = stopTypeAndName;
152 	}
153 	
154 	public IconColour getIconColour() {
155 		return iconColour;
156 	}
157 	
158 	public void setIconColour(IconColour iconColour) {
159 		this.iconColour = iconColour;
160 	}
161 	
162 	public Object[] toObjectArray() {
163 		return new Object[] { atcoCode, easting, northing, longitude, latitude, commonName, identifier, direction,
164 			street, landmark, natGazId, natGazLocality, stopType, stopTypeAndName, iconColour };
165 	}
166 	
167 	public String[] toStringArray() {
168 		return new String[] { atcoCode, easting != null ? easting.toString() : null, northing != null ? northing.toString() : null, longitude != null ? longitude.toString() : null, latitude != null ? latitude.toString() : null, commonName, identifier, direction,
169 			street, landmark, natGazId, natGazLocality, stopType != null ? stopType.toString() : null, stopTypeAndName != null ? stopTypeAndName.toString() : null, iconColour != null ? iconColour.toString() : null };
170 	}
171 
172 	@Override
173 	public String toString() {
174 		return String
175 			.format(
176 				"TransportLocation [atcoCode=%s, easting=%s, northing=%s, longitude=%s, latitude=%s, commonName=%s, identifier=%s, direction=%s, street=%s, landmark=%s, natGazId=%s, natGazLocality=%s, stopType=%s, stopTypeAndName=%s, iconColour=%s]",
177 				atcoCode, easting, northing, longitude, latitude, commonName, identifier, direction, street, landmark,
178 				natGazId, natGazLocality, stopType, stopTypeAndName, iconColour);
179 	}
180 	
181 	
182 }