projHash.clear(); Iterator taskIt = tasks.iterator(); while (taskIt.hasNext()) { Task task = (Task) taskIt.next(); Workflow wf = task.getWorkflow(); if (wf == null) { if(logger.isErrorEnabled()) { logger.error("Projection task: " + task.getUID() + " at " + dgPlugin.getOrgName() + " has Null workflow"); } continue; } Task parTask = wf.getParentTask(); if (parTask == null) { if(logger.isErrorEnabled()) { logger.error("Projection task with no parent"); } continue; } if (!(parTask.getVerb().equals (Constants.Verb.GENERATEPROJECTIONS))) { if(logger.isErrorEnabled()) { logger.error("Projection task with non generate projections parent"); } continue; } HashMap assetMap = (HashMap) projHash.get(parTask); if (assetMap == null) { assetMap = new HashMap(); projHash.put(parTask, assetMap); } Asset asset = task.getDirectObject(); ArrayList tasksWAsset = (ArrayList) assetMap.get(asset); if (tasksWAsset == null) { tasksWAsset = new ArrayList(); assetMap.put(asset, tasksWAsset); } tasksWAsset.add(task); }
regenerateTaskHash(tasks,projHash);
  protected void regenerateProjectionHash(Collection tasks) {    projHash.clear();    Iterator taskIt = tasks.iterator();    while (taskIt.hasNext()) {      Task task = (Task) taskIt.next();      Workflow wf = task.getWorkflow();      if (wf == null) {	if(logger.isErrorEnabled()) {          logger.error("Projection task: " + task.getUID() + " at " + dgPlugin.getOrgName() + " has Null workflow");	}        continue;      }      Task parTask = wf.getParentTask();      if (parTask == null) {	if(logger.isErrorEnabled()) {          logger.error("Projection task with no parent");	}        continue;      }      if (!(parTask.getVerb().equals          (Constants.Verb.GENERATEPROJECTIONS))) {	if(logger.isErrorEnabled()) {          logger.error("Projection task with non generate projections parent");	}        continue;      }      HashMap assetMap = (HashMap) projHash.get(parTask);      if (assetMap == null) {        assetMap = new HashMap();        projHash.put(parTask, assetMap);      }      Asset asset = task.getDirectObject();      ArrayList tasksWAsset = (ArrayList) assetMap.get(asset);      if (tasksWAsset == null) {        tasksWAsset = new ArrayList();        assetMap.put(asset, tasksWAsset);      }      tasksWAsset.add(task);    }  }