leg.missionUID = task.getUID().toString();
leg.missionUID = task.getUID();
  private static boolean computeLegFromTask(      Registry toReg,      List toSkelLegs,      Task task) {    // get the start location    GeolocLocation startGeoloc = getStartLocation(task);    if (startGeoloc == null) {      // no start location?      return false;    }    String startLoc =       DataRegistry.registerLocation(toReg, startGeoloc);    // get the end location    GeolocLocation endGeoloc = getEndLocation(task);    if (endGeoloc == null) {      // no end location?      return false;    }    String endLoc =       DataRegistry.registerLocation(toReg, endGeoloc);    // create a "Transport" Leg    Leg leg = new Leg();    leg.legType = getLegType(task.getVerb());    leg.startLoc = startLoc;    leg.endLoc = endLoc;    // use task's UID as the mission ID    leg.missionUID = task.getUID().toString();    if (DEBUG) {      System.out.println(          "DataComputer.computeLegFromTask - for leg " + leg +           ", start geoloc " + startLoc + " end geoloc " + endLoc + " leg type " + leg.legType);    }    // get the time information    if (!(setEstimatedTimes(leg, task))) {      // no start/end times?      return false;    }    if (!(setPreferredStartTime(leg, task))) {      // okay, use startTime      leg.readyAtTime = leg.startTime;    }    if (!(setPreferredEndTimes(leg, task))) {      // okay, use endTime      long endTime = leg.endTime;      leg.earliestEndTime = endTime;      leg.bestEndTime = endTime;      leg.latestEndTime = endTime;    }    if (leg.legType == Leg.LEG_TYPE_TRANSPORTING) {      // get the route      TransportationRoute transRoute =         getTransportationRoute(task, null);      if (transRoute != null) {        leg.routeUID = DataRegistry.registerRoute(toReg, transRoute);      }    }    // add leg to list    toSkelLegs.add(leg);    // success!    return true;  }