Exemple #1
0
 @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();
   }
 }
Exemple #2
0
 @Override
 public boolean canBeApplied(LsfIndex index) {
   return TidePredictionFactory.create(index) != null;
 }