leg.missionUID = task.getUID().toString();
leg.missionUID = task.getUID();
  private static boolean computeLegsFromItineraryElement(      Registry toReg,      List toSkelLegs,      Task task,       ItineraryElement ie) {    // create "skeleton" leg    Leg leg = new Leg();    int legType = getLegType(ie.getRole());    leg.legType = legType;    if (legType == Leg.LEG_TYPE_TRANSPORTING) {      // get the route      TransportationRoute transRoute =         getTransportationRoute(task, ie);      if (transRoute != null) {        leg.routeUID = DataRegistry.registerRoute(toReg, transRoute);      }    }    leg.startLoc =      DataRegistry.registerLocation(          toReg,           (GeolocLocation)ie.getStartLocation());    leg.startTime =      ie.getStartTime();    leg.endLoc =       DataRegistry.registerLocation(          toReg,          (GeolocLocation)ie.getEndLocation());    long endTime = ie.getEndTime();    leg.endTime = endTime;    // use task's UID as the mission ID    leg.missionUID = task.getUID().toString();    // use start/end values for preferred time ranges    leg.readyAtTime = leg.startTime;    leg.earliestEndTime = endTime;    leg.bestEndTime = endTime;    leg.latestEndTime = endTime;    // add leg to list    toSkelLegs.add(leg);    return true;  }