Set [] categories = sortAssetsByCategory(expandAsset(parentTask.getDirectObject()));
Set [] categories = sortAssetsByCategory(expandAsset(parentTask, parentTask.getDirectObject()));
  public Vector getSubtasks(Task parentTask) {    Vector childTasks = new Vector ();    if (isInfoEnabled())      info (".getSubtasks - received task " + (i++) + " total.");    if (isDebugEnabled()) {      int mode = getMode (parentTask);      debug (".getSubtasks - mode for task " + parentTask.getUID () + " is " + 	     ((mode==LEVEL_6_MODE) ? "LEVEL_6" : ((mode==LEVEL_2_MODE) ? "LEVEL_2" : "DONT_PROCESS")));    }    // if the incoming task is already a low fidelity task, we don't need to do anything to it    if (prepHelper.hasPrepNamed(parentTask, GLMTransConst.LOW_FIDELITY)) {      // pass through      Asset lowFiAsset = parentTask.getDirectObject();      Task subTask = makeTask (parentTask, lowFiAsset, null);      NewLowFidelityAssetPG lowFiPG = 	(NewLowFidelityAssetPG)ldmf.createPropertyGroup(LowFidelityAssetPG.class);      lowFiPG.setOriginalAsset (lowFiAsset);      attachPG(lowFiAsset, lowFiPG); // now subobject has pointer back to parent      if (isDebugEnabled()) 	debug (".getSubtasks - processing task " + parentTask.getUID () + 	       " by attaching low fi pg to it's d.o. - " + lowFiAsset);      childTasks.addElement (subTask);    }    else if ((getMode(parentTask) == LEVEL_2_MODE) && 	     ((parentTask.getDirectObject() instanceof AssetGroup) ||      // it doesn't make sense to aggregate an individual item asset	      (parentTask.getDirectObject() instanceof AggregateAsset)) && 	     !isPersonTask(parentTask)) {      if (isDebugEnabled()) 	debug (".getSubtasks - processing task " + parentTask.getUID () + 	       " in LOW fidelity mode. d.o. is " + parentTask.getDirectObject());      Set [] categories = sortAssetsByCategory(expandAsset(parentTask.getDirectObject()));      for (int i = 0; i < NUM_TRANSPORT_CLASSES; i++) {	if (!categories[i].isEmpty())	  childTasks.add(getLowFidelityTask (parentTask, categories[i]));      }    }    else {      if (isDebugEnabled()) 	debug (".getSubtasks - processing task " + parentTask.getUID () + 	       " in HIGH fidelity mode. d.o. is " + parentTask.getDirectObject());      Vector itemsToMove = expandAsset((Asset)parentTask.getDirectObject());      for (int i = 0; i < itemsToMove.size (); i++) {	Task subTask = makeTask (parentTask, (Asset) itemsToMove.elementAt(i), null);	childTasks.addElement (subTask);      }    }    return childTasks;  }