/** * Creates a new Geotag entry for the given attachment and track. NOTE: I'm basically ignoring * errors here for now. Note that DataAccessExceptions do NOT actually propagate up the call stack * from here. They are caught and logged, but do NOT stop or undo the creation of the attachment. * * @param fileName * @param track * @throws DataAccessException */ public void createGeotag(String fileName, GpsTrack track) throws DataAccessException { try { Attachment attachment = new AttachmentDao().findByFileName(fileName); Geotag tag = new Geotag(track.getCenter()); tag.setAttachmentId(attachment.getAttachmentId()); tag.setMapId(attachment.getAttachmentId()); new GeotagDao().create(tag); } catch (Exception e) { log.error("Unable to create geotag for attachment.", e); } }