public String getCutComplexCityName() { String cutComplexCityName = this.city; String[] complexCityNameArr = null; String complexCityDelimeter = ""; if (this.city.indexOf(GeocodeString.COMPLEX_CITY_SIGN) != this.city.lastIndexOf(GeocodeString.COMPLEX_CITY_SIGN)) { complexCityNameArr = this.city.split(GeocodeString.COMPLEX_CITY_SIGN); complexCityDelimeter = GeocodeString.COMPLEX_CITY_SIGN; } else if (this.city.indexOf(" ") != this.city.lastIndexOf(" ")) { complexCityNameArr = this.city.split(" "); complexCityDelimeter = " "; } else if (this.city.indexOf(GeocodeString.COMPLEX_CITY_SIGN) > -1) { cutComplexCityName = this.city.replace(GeocodeString.COMPLEX_CITY_SIGN, " "); } if (complexCityNameArr != null && complexCityNameArr.length >= GeocodeString.COUNT_WORD_CUT_COMPLEX_CITY) { cutComplexCityName = complexCityNameArr[0] + complexCityDelimeter + complexCityNameArr[1]; } if (!GeocodingConstants.VIRGIN_ISLANDS_STATE.equals(this.state)) { return getAddressLine1WithSpace() + cutComplexCityName + " " + (state == null ? "" : state + " ") + postalCode; } return getAddressLine1WithSpace() + cutComplexCityName + " " + GeocodingConstants.VIRGIN_ISLANDS_GEOCODE_REQUEST_ADDRESS; }
public String getAddressWithoutCity() { if (!GeocodingConstants.VIRGIN_ISLANDS_STATE.equals(this.state)) { return getAddressLine1WithSpace() + (state == null ? "" : state + " ") + postalCode + (country == null ? "" : " " + country); } return getAddressLine1WithSpace() + GeocodingConstants.VIRGIN_ISLANDS_GEOCODE_REQUEST_ADDRESS; }
public String getFullAddress() { /* TODO: Virgin Islands Hardcode */ if (!GeocodingConstants.VIRGIN_ISLANDS_STATE.equals(this.state)) { return getAddressLine1WithSpace() + city + " " + (state == null ? "" : state + " ") + postalCode + (country == null ? "" : " " + country); } return getAddressLine1WithSpace() + city + " " + GeocodingConstants.VIRGIN_ISLANDS_GEOCODE_REQUEST_ADDRESS; }