001    /*
002     * Apache License
003     * Version 2.0, January 2004
004     * http://www.apache.org/licenses/
005     *
006     * Copyright 2008 by chenillekit.org
007     *
008     * Licensed under the Apache License, Version 2.0 (the "License");
009     * you may not use this file except in compliance with the License.
010     * You may obtain a copy of the License at
011     *
012     * http://www.apache.org/licenses/LICENSE-2.0
013     */
014    
015    package org.chenillekit.google.utils;
016    
017    import java.io.Serializable;
018    import java.util.Locale;
019    
020    /**
021     * simple class to hold a location for geocoding.
022     *
023     * @version $Id: GeoCodeLocation.java 471 2009-05-09 09:28:38Z homburgs $
024     */
025    public class GeoCodeLocation implements Serializable
026    {
027        private Locale locale;
028        private String street;
029        private String country;
030        private String state;
031        private String zipCode;
032        private String city;
033    
034        public GeoCodeLocation()
035        {
036            this.locale = Locale.getDefault();
037        }
038    
039        public GeoCodeLocation(String street, String country, String state, String zipCode, String city)
040        {
041            this.locale = Locale.getDefault();
042            this.street = street;
043            this.country = country;
044            this.state = state;
045            this.zipCode = zipCode;
046            this.city = city;
047        }
048    
049        public GeoCodeLocation(final Locale locale, final String street, final String country, final String state,
050                               final String zipCode, final String city)
051        {
052            this.locale = locale;
053            this.street = street;
054            this.country = country;
055            this.state = state;
056            this.zipCode = zipCode;
057            this.city = city;
058        }
059    
060        public String getStreet()
061        {
062            return street != null ? street : "";
063        }
064    
065        public void setStreet(String street)
066        {
067            this.street = street;
068        }
069    
070        public String getCountry()
071        {
072            return country != null ? country : "";
073        }
074    
075        public void setCountry(String country)
076        {
077            this.country = country;
078        }
079    
080        public String getState()
081        {
082            return state != null ? state : "";
083        }
084    
085        public void setState(String state)
086        {
087            this.state = state;
088        }
089    
090        public String getZipCode()
091        {
092            return zipCode != null ? zipCode : "";
093        }
094    
095        public void setZipCode(String zipCode)
096        {
097            this.zipCode = zipCode;
098        }
099    
100        public String getCity()
101        {
102            return city != null ? city : "";
103        }
104    
105        public void setCity(String city)
106        {
107            this.city = city;
108        }
109    
110        public Locale getLocale()
111        {
112            return locale;
113        }
114    
115        public void setLocale(Locale locale)
116        {
117            this.locale = locale;
118        }
119    }