@Test public void parseGeoIdInvalidId () { assertThat(GeoNamesServiceImpl.parseGeoId("GEO:"), is(nullValue())); }
public static Long parseGeoId(String idString) { String s = idString.replaceFirst(GEONAMES.getIdPrefix(), ""); Long id = null; if (StringUtils.isNotBlank(s)) { try { id = Long.parseLong(s); } catch (NumberFormatException ex) { } } return id; }
GeoNamesServiceImpl implements GeoNamesService { public static Long parseGeoId(String idString) { String s = idString.replaceFirst(GEONAMES.getIdPrefix(), ""); Long id = null; if (StringUtils.isNotBlank(s)) { try { id = Long.parseLong(s); } catch (NumberFormatException ex) { } } return id; } }
GeoNamesServiceImpl implements GeoNamesService { public static Long parseGeoId(String idString) { String s = idString.replaceFirst(GEONAMES.getIdPrefix(), ""); Long id = null; if (StringUtils.isNotBlank(s)) { try { id = Long.parseLong(s); } catch (NumberFormatException ex) { } } return id; }  }
GeoNamesServiceImpl implements GeoNamesService { public static Long parseGeoId(String idString) { String s = idString.replaceFirst(GEONAMES.getIdPrefix(), ""); Long id = null; if (StringUtils.isNotBlank(s)) { try { id = Long.parseLong(s); } catch (NumberFormatException ex) { } } return id; }  @Override boolean hasTermForLocale(String locality); @Override LatLng findLatLng(String geoNameTermOrLocale); static Long parseGeoId(String idString); LatLng getCentroid(Long id); }
GeoNamesServiceImpl implements GeoNamesService { public static Long parseGeoId(String idString) { String s = idString.replaceFirst(GEONAMES.getIdPrefix(), ""); Long id = null; if (StringUtils.isNotBlank(s)) { try { id = Long.parseLong(s); } catch (NumberFormatException ex) { } } return id; }  @Override boolean hasTermForLocale(String locality); @Override LatLng findLatLng(String geoNameTermOrLocale); static Long parseGeoId(String idString); LatLng getCentroid(Long id); static final TermImpl GEO_TERM_EARTH; }