예제 #1
0
  /**
   * _more_
   *
   * @param entry _more_
   * @return _more_
   */
  @Override
  public String getEntryName(Entry entry) {
    String name = super.getEntryName(entry);
    if (!Utils.stringDefined(name)) {
      name = entry.getValue(0, "");
    }

    //        System.err.println("NAME:" + name);
    return name;
  }
예제 #2
0
 /**
  * @param request _more_
  * @param entry _more_
  */
 private void georeferenceEntry(Request request, Entry entry) {
   if (entry.isGeoreferenced()) {
     return;
   }
   // TODO: if the entry has a location then don't do this?
   String address = entry.getValue(0, (String) null);
   String city = entry.getValue(1, (String) null);
   String state = entry.getValue(2, (String) null);
   if (!Utils.stringDefined(address)) {
     return;
   }
   String fullAddress = address + "," + city + "," + state;
   double[] loc = GeoUtils.getLocationFromAddress(fullAddress);
   if (loc == null) {
     System.err.println("no geo for address:" + fullAddress);
   } else {
     System.err.println("got geo for address:" + fullAddress);
     entry.setLatitude(loc[0]);
     entry.setLongitude(loc[1]);
   }
 }