Advertisement
Guest User

Untitled

a guest
Mar 7th, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 5 1.18 KB | None | 0 0
  1. public void settingActiveElementWell(TallySondeo tally, StatusWell currentStatus) {
  2.         logger.debug("settingActiveElementWell");
  3.         if (!tally.empty()){
  4.            
  5.             ElementWell last = HelperElementWell.lastElementSondeo(tally.getElements());
  6.        
  7.             if (last != null){
  8.                
  9.                 ElementWell lastSecond = HelperElementWell.lastFromLastElement(tally.getElements(), ElementWellStatus.DRILLSTRING,
  10.                         last.getPosition());
  11.                 if (lastSecond == null){
  12.                     if (currentStatus.getDepthTool() > 0){
  13.                         last.setActive(Boolean.TRUE);
  14.                         currentStatus.setPositionActiveElementWell(last.getPosition());
  15.                     }else{
  16.                         last.setActive(Boolean.FALSE);
  17.                         currentStatus.setPositionActiveElementWell(0);
  18.                     }
  19.                 }
  20.                 else{
  21.                     if (last.getLengthKellyDown() >= currentStatus.getDepthTool() &&
  22.                             lastSecond.getLengthKellyDown() < currentStatus.getDepthTool()){
  23.                         last.setActive(Boolean.TRUE);
  24.                         currentStatus.setPositionActiveElementWell(last.getPosition());
  25.                     }else{
  26.                         last.setActive(Boolean.FALSE);
  27.                         currentStatus.setPositionActiveElementWell(0);
  28.                     }
  29.                 }
  30.             }
  31.  
  32.         }
  33.         logger.debug("position active " + currentStatus.getPositionActiveElementWell());
  34.        
  35.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement