001 002/* 003 * Copyright (C) 2010 Archie L. Cobbs. All rights reserved. 004 * 005 * $Id$ 006 */ 007 008package org.dellroad.jibxbindings.pidf.lo; 009 010import org.dellroad.jibxbindings.ParseUtil; 011import org.jibx.runtime.JiBXParseException; 012 013/** 014 * The {@code <ca:civicAddress>} element as defined in RFC 5139. 015 */ 016public class CivicAddress implements Cloneable { 017 018// CHECKSTYLE OFF: MemberName 019// CHECKSTYLE OFF: ParameterNameCheck 020 private String country; 021 private CAValue A1; 022 private CAValue A2; 023 private CAValue A3; 024 private CAValue A4; 025 private CAValue A5; 026 private CAValue A6; 027 private CAValue PRM; 028 private CAValue PRD; 029 private CAValue RD; 030 private CAValue STS; 031 private CAValue POD; 032 private CAValue POM; 033 private CAValue RDSEC; 034 private CAValue RDBR; 035 private CAValue RDSUBBR; 036 private CAValue HNO; 037 private CAValue HNS; 038 private CAValue LMK; 039 private CAValue LOC; 040 private CAValue FLR; 041 private CAValue NAM; 042 private CAValue PC; 043 private CAValue BLD; 044 private CAValue UNIT; 045 private CAValue ROOM; 046 private CAValue SEAT; 047 private CAValue PLC; 048 private CAValue PCN; 049 private CAValue POBOX; 050 private CAValue ADDCODE; 051 052 /** 053 * Get country code, which (if not null) should always be a two-letter, all-caps country code. 054 */ 055 public String getCountry() { 056 return this.country; 057 } 058 public void setCountry(String country) { 059 this.country = country; 060 } 061 062 public CAValue getA1() { 063 return this.A1; 064 } 065 public void setA1(CAValue A1) { 066 this.A1 = A1; 067 } 068 069 public CAValue getA2() { 070 return this.A2; 071 } 072 public void setA2(CAValue A2) { 073 this.A2 = A2; 074 } 075 076 public CAValue getA3() { 077 return this.A3; 078 } 079 public void setA3(CAValue A3) { 080 this.A3 = A3; 081 } 082 083 public CAValue getA4() { 084 return this.A4; 085 } 086 public void setA4(CAValue A4) { 087 this.A4 = A4; 088 } 089 090 public CAValue getA5() { 091 return this.A5; 092 } 093 public void setA5(CAValue A5) { 094 this.A5 = A5; 095 } 096 097 public CAValue getA6() { 098 return this.A6; 099 } 100 public void setA6(CAValue A6) { 101 this.A6 = A6; 102 } 103 104 public CAValue getPRM() { 105 return this.PRM; 106 } 107 public void setPRM(CAValue PRM) { 108 this.PRM = PRM; 109 } 110 111 public CAValue getPRD() { 112 return this.PRD; 113 } 114 public void setPRD(CAValue PRD) { 115 this.PRD = PRD; 116 } 117 118 public CAValue getRD() { 119 return this.RD; 120 } 121 public void setRD(CAValue RD) { 122 this.RD = RD; 123 } 124 125 public CAValue getSTS() { 126 return this.STS; 127 } 128 public void setSTS(CAValue STS) { 129 this.STS = STS; 130 } 131 132 public CAValue getPOD() { 133 return this.POD; 134 } 135 public void setPOD(CAValue POD) { 136 this.POD = POD; 137 } 138 139 public CAValue getPOM() { 140 return this.POM; 141 } 142 public void setPOM(CAValue POM) { 143 this.POM = POM; 144 } 145 146 public CAValue getRDSEC() { 147 return this.RDSEC; 148 } 149 public void setRDSEC(CAValue RDSEC) { 150 this.RDSEC = RDSEC; 151 } 152 153 public CAValue getRDBR() { 154 return this.RDBR; 155 } 156 public void setRDBR(CAValue RDBR) { 157 this.RDBR = RDBR; 158 } 159 160 public CAValue getRDSUBBR() { 161 return this.RDSUBBR; 162 } 163 public void setRDSUBBR(CAValue RDSUBBR) { 164 this.RDSUBBR = RDSUBBR; 165 } 166 167 public CAValue getHNO() { 168 return this.HNO; 169 } 170 public void setHNO(CAValue HNO) { 171 this.HNO = HNO; 172 } 173 174 public CAValue getHNS() { 175 return this.HNS; 176 } 177 public void setHNS(CAValue HNS) { 178 this.HNS = HNS; 179 } 180 181 public CAValue getLMK() { 182 return this.LMK; 183 } 184 public void setLMK(CAValue LMK) { 185 this.LMK = LMK; 186 } 187 188 public CAValue getLOC() { 189 return this.LOC; 190 } 191 public void setLOC(CAValue LOC) { 192 this.LOC = LOC; 193 } 194 195 public CAValue getFLR() { 196 return this.FLR; 197 } 198 public void setFLR(CAValue FLR) { 199 this.FLR = FLR; 200 } 201 202 public CAValue getNAM() { 203 return this.NAM; 204 } 205 public void setNAM(CAValue NAM) { 206 this.NAM = NAM; 207 } 208 209 public CAValue getPC() { 210 return this.PC; 211 } 212 public void setPC(CAValue PC) { 213 this.PC = PC; 214 } 215 216 public CAValue getBLD() { 217 return this.BLD; 218 } 219 public void setBLD(CAValue BLD) { 220 this.BLD = BLD; 221 } 222 223 public CAValue getUNIT() { 224 return this.UNIT; 225 } 226 public void setUNIT(CAValue UNIT) { 227 this.UNIT = UNIT; 228 } 229 230 public CAValue getROOM() { 231 return this.ROOM; 232 } 233 public void setROOM(CAValue ROOM) { 234 this.ROOM = ROOM; 235 } 236 237 public CAValue getSEAT() { 238 return this.SEAT; 239 } 240 public void setSEAT(CAValue SEAT) { 241 this.SEAT = SEAT; 242 } 243 244 public CAValue getPLC() { 245 return this.PLC; 246 } 247 public void setPLC(CAValue PLC) { 248 this.PLC = PLC; 249 } 250 251 public CAValue getPCN() { 252 return this.PCN; 253 } 254 public void setPCN(CAValue PCN) { 255 this.PCN = PCN; 256 } 257 258 public CAValue getPOBOX() { 259 return this.POBOX; 260 } 261 public void setPOBOX(CAValue POBOX) { 262 this.POBOX = POBOX; 263 } 264 265 public CAValue getADDCODE() { 266 return this.ADDCODE; 267 } 268 public void setADDCODE(CAValue ADDCODE) { 269 this.ADDCODE = ADDCODE; 270 } 271// CHECKSTYLE ON: MemberName 272// CHECKSTYLE ON: ParameterNameCheck 273 274 /** 275 * Deserialize the {@link #getCountry country} value, which must be a two-letter, all-caps country code. 276 */ 277 public static String deserializeCountry(String string) throws JiBXParseException { 278 return ParseUtil.deserializeMatching("[A-Z]{2}", string); 279 } 280 281// Cloneable 282 283 @Override 284 public CivicAddress clone() { 285 final CivicAddress clone; 286 try { 287 clone = (CivicAddress)super.clone(); 288 } catch (CloneNotSupportedException e) { 289 throw new RuntimeException(e); 290 } 291 clone.A1 = this.A1 != null ? this.A1.clone() : null; 292 clone.A2 = this.A2 != null ? this.A2.clone() : null; 293 clone.A3 = this.A3 != null ? this.A3.clone() : null; 294 clone.A4 = this.A4 != null ? this.A4.clone() : null; 295 clone.A5 = this.A5 != null ? this.A5.clone() : null; 296 clone.A6 = this.A6 != null ? this.A6.clone() : null; 297 clone.PRM = this.PRM != null ? this.PRM.clone() : null; 298 clone.PRD = this.PRD != null ? this.PRD.clone() : null; 299 clone.RD = this.RD != null ? this.RD.clone() : null; 300 clone.STS = this.STS != null ? this.STS.clone() : null; 301 clone.POD = this.POD != null ? this.POD.clone() : null; 302 clone.POM = this.POM != null ? this.POM.clone() : null; 303 clone.RDSEC = this.RDSEC != null ? this.RDSEC.clone() : null; 304 clone.RDBR = this.RDBR != null ? this.RDBR.clone() : null; 305 clone.RDSUBBR = this.RDSUBBR != null ? this.RDSUBBR.clone() : null; 306 clone.HNO = this.HNO != null ? this.HNO.clone() : null; 307 clone.HNS = this.HNS != null ? this.HNS.clone() : null; 308 clone.LMK = this.LMK != null ? this.LMK.clone() : null; 309 clone.LOC = this.LOC != null ? this.LOC.clone() : null; 310 clone.FLR = this.FLR != null ? this.FLR.clone() : null; 311 clone.NAM = this.NAM != null ? this.NAM.clone() : null; 312 clone.PC = this.PC != null ? this.PC.clone() : null; 313 clone.BLD = this.BLD != null ? this.BLD.clone() : null; 314 clone.UNIT = this.UNIT != null ? this.UNIT.clone() : null; 315 clone.ROOM = this.ROOM != null ? this.ROOM.clone() : null; 316 clone.SEAT = this.SEAT != null ? this.SEAT.clone() : null; 317 clone.PLC = this.PLC != null ? this.PLC.clone() : null; 318 clone.PCN = this.PCN != null ? this.PCN.clone() : null; 319 clone.POBOX = this.POBOX != null ? this.POBOX.clone() : null; 320 clone.ADDCODE = this.ADDCODE != null ? this.ADDCODE.clone() : null; 321 return clone; 322 } 323} 324