Package eu.balticdiversity.search.models

Examples of eu.balticdiversity.search.models.SimpleDarwinRecord


    ResultSet rs = null;
    try {
      p = getConnection().prepareStatement(sql);
      rs = p.executeQuery();
      while (rs.next()) {
        SimpleDarwinRecord entry = toSimpleDarwinRecord(rs);
        results.add(entry);
      }
    } finally {
      Utils.close(p, rs);
    }
View Full Code Here


    // String recordBasisFK = rs.getString(21);
    String recordBasis = rs.getString(22);
    String collectionURI = rs.getString(23);
   
    String id = resolveID(sourceID, documentID, unitID);
    SimpleDarwinRecord entry = new SimpleDarwinRecord(id, collectionURI, sourceID);
   
    entry.setLocality(locationText);
    entry.setScientificName(taxonName);
    entry.setVernacularName(finnishName, "fi");
    entry.setVernacularName(swedishName, "sv");
    entry.setEventStartEndDate(dateText);
    entry.setRecordedBy(teamText);
    entry.setBasisOfRecord(recordBasis);
    entry.setOccurrenceRemarks(notes);
   
    try {
      entry.setIndividualCount(Integer.valueOf(abundanceString));
    } catch (NumberFormatException e) { }
   
    if (given(latitudeMin, latitudeMax, longitudeMin, longitudeMax)) {
      entry.setDecimalLatitude(avg(latitudeMin, latitudeMax));
      entry.setDecimalLongitude(avg(longitudeMin, longitudeMax));
      entry.setCoordinatePrecision(Math.max(getDifference(latitudeMin, latitudeMax), getDifference(longitudeMin, longitudeMax)));
    }
   
    return entry;
  }
View Full Code Here

TOP

Related Classes of eu.balticdiversity.search.models.SimpleDarwinRecord

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.