String mtName = new String ("Overall"); PrepositionalPhrase ppFor = raTsk.getPrepositionalPhrase(Constants.Preposition.FOR); if ( ppFor != null) { MaintainedItem mt = (MaintainedItem) ppFor.getIndirectObject(); mtName = new String (mt.getNomenclature());
String mtName = new String ("Overall"); PrepositionalPhrase ppFor = raTsk.getPrepositionalPhrase(Constants.Preposition.FOR); if ( ppFor != null) { MaintainedItem mt = (MaintainedItem) ppFor.getIndirectObject(); mtName = new String (mt.getNomenclature()); }  HashMap assetMap = (HashMap) retMap.get(mtName); if (assetMap == null) { assetMap = new HashMap(); retMap.put(mtName, assetMap); }  ArrayList arl = new ArrayList();  String asstName = new String ("All Assets"); PrepositionalPhrase ppWith = raTsk.getPrepositionalPhrase(Constants.Preposition.WITH); if (ppWith != null) { Asset usedAsset = (Asset) ppWith.getIndirectObject(); asstName = new String (usedAsset.getTypeIdentificationPG().getNomenclature()); }  assetMap.put (asstName, arl);  List phasedResults = ar.getPhasedAspectValueResults();  for ( int ii=0; ii < phasedResults.size(); ii ++) { AspectValue[] avs = (AspectValue[]) phasedResults.get(ii); arl.add(avs); }
  private HashMap getAssetAV3s (PlanServiceContext psc)  {    Collection raTasks = psc.getServerPluginSupport().queryForSubscriber(readinessTaskPred);    Iterator taskItr = raTasks.iterator();    HashMap retMap = null;//    System.out.println ("Query returned: " + raTasks.size() + " Expansion objects");    if (! taskItr.hasNext())      return null;    else      retMap = new HashMap();    while (taskItr.hasNext())    {      Task raTsk = (Task) taskItr.next();      AllocationResult ar = raTsk.getPlanElement().getEstimatedResult();      if (ar == null)        continue;      // index first by name of unit type (aka maintained item name)      String mtName = new String ("Overall");      PrepositionalPhrase ppFor = raTsk.getPrepositionalPhrase(Constants.Preposition.FOR);      if ( ppFor != null)      {        MaintainedItem mt = (MaintainedItem) ppFor.getIndirectObject();        mtName = new String (mt.getNomenclature());      }      HashMap assetMap = (HashMap) retMap.get(mtName);      if (assetMap == null)      {         assetMap = new HashMap();         retMap.put(mtName, assetMap);      }            ArrayList arl = new ArrayList();      String asstName = new String ("All Assets");      PrepositionalPhrase ppWith = raTsk.getPrepositionalPhrase(Constants.Preposition.WITH);      if (ppWith != null)      {        Asset usedAsset = (Asset) ppWith.getIndirectObject();        asstName = new String (usedAsset.getTypeIdentificationPG().getNomenclature());      }            assetMap.put (asstName, arl);      List phasedResults = ar.getPhasedAspectValueResults();      for ( int ii=0; ii < phasedResults.size(); ii ++)      {        AspectValue[] avs = (AspectValue[]) phasedResults.get(ii);        arl.add(avs);      }    }    return retMap;  }