@Override
    public GeoServiceItem get(final String placeName) {
        logger.debug("Get: " + placeName);
        final String url = protocol + "://" + host + ":" + port
                + "/geocode?name=" + placeName;
        try {
            return restTemplate.getForObject(url, GeoServiceItem.class);
        } catch (RestClientException rce) {
            if (logger.isDebugEnabled()) {
                logger.debug(
                    "Unable to get geocode from geoservice at " + url, rce);
            } else {
                logger.error("Unable to get geocode from geoservice at " + url);
                logger.error("host: " + host);
                logger.error("port: " + port);
                logger.error("protocol: " + protocol);
            }
            return new GeoServiceItem(placeName, placeName, null);
        }
    }
@ Override public GeoServiceItem get ( final String placeName ) { logger . debug ( "Get: " + placeName ) ; final String url = protocol + "://" + host + ":" + port + "/geocode?name=" + placeName ; try { return restTemplate . getForObject ( url , GeoServiceItem . class ) ; } catch ( RestClientException rce ) { if ( logger . isDebugEnabled ( ) ) { logger . debug ( "Unable to get geocode from geoservice at " + url , rce ) ; } else { logger . error ( "Unable to get geocode from geoservice at " + url ) ; logger . error ( "host: " + host ) ; logger . error ( "port: " + port ) ; logger . error ( "protocol: " + protocol ) ; } return new GeoServiceItem ( placeName , placeName , null ) ; } }
{@inheritDoc}