@Override public void process(LsfIndex source) { TidePredictionFinder finder = TidePredictionFactory.create(source); try { for (double i = source.getStartTime(); i < source.getEndTime(); i += 60) { long time = (long) (i * 1000); addValue(time, "Tide height", finder.getTidePrediction(new Date(time), false)); } } catch (Exception e) { e.printStackTrace(); } }
@Override public boolean canBeApplied(LsfIndex index) { return TidePredictionFactory.create(index) != null; }