System.err.println(getCluster().getMessageAddress() + " LoadAllocator:createCapacity() got unexpected verb :" + verb);
System.err.println(getMessageAddress() + " LoadAllocator:createCapacity() got unexpected verb :" + verb);
  private Capacity createCapacity(Class proto_class, String verb){    Asset asset = theLDMF.createPrototype(proto_class, "AssetPrototype");    NewTypeIdentificationPG typeIdProp = null ;    int unit = Volume.GALLONS;    try {      typeIdProp =        (NewTypeIdentificationPG)theLDMF        .createPropertyGroup( TypeIdentificationPGImpl.class );      if (verb.equals(Constants.Verb.LOAD)) {        if (asset instanceof BulkPOL){          typeIdProp.setTypeIdentification(CapacityType.FUELHANDLING);          typeIdProp.setNomenclature(CapacityType.FUELHANDLING);          unit = Volume.GALLONS;        }        else if (asset instanceof Ammunition) {          typeIdProp.setTypeIdentification(CapacityType.AMMUNITIONHANDLING);          typeIdProp.setNomenclature(CapacityType.AMMUNITIONHANDLING);          unit = Mass.TONS;        }        else {          System.err.println(getCluster().getMessageAddress() + " LoadAllocator:createCapacity() got unexpected asset type :" + asset);          return null;        }      }      else if (verb.equals(Constants.Verb.TRANSPORT)) {         if (asset instanceof BulkPOL){          typeIdProp.setTypeIdentification(CapacityType.FUELTRANSPORTATION);          typeIdProp.setNomenclature(CapacityType.FUELTRANSPORTATION);          unit = Volume.GALLONS;        }        else if (asset instanceof Ammunition) {          typeIdProp.setTypeIdentification(CapacityType.AMMUNITIONTRANSPORTATION);          typeIdProp.setNomenclature(CapacityType.AMMUNITIONTRANSPORTATION);          unit = Mass.TONS;        }        else {          System.err.println(getCluster().getMessageAddress() + " LoadAllocator:createCapacity() got unexpected asset type :" + asset);          return null;        }      }      else {        System.err.println(getCluster().getMessageAddress() + " LoadAllocator:createCapacity() got unexpected verb :" + verb);        return null;      }    } catch (Exception exc) {      System.out.println(getCluster().getMessageAddress() + " LoadAllocator - problem creating a Capacity asset.");      exc.printStackTrace();    }    asset.setTypeIdentificationPG(typeIdProp);    //    // Create a ScheduledContentPG    //    Vector cses = new Vector() ;    // later - fix CapacityScheduleElement and use it instead    NewQuantityScheduleElement cse = new QuantityScheduleElementImpl();    // from org CSSCapability    // e.g., FuelHandling Volume=105000gallons Duration=1days    CSSCapabilityPG cssPG = thisOrg.getCSSCapabilityPG();    CSSCapability css = null;    double qty = 105000d;    if (cssPG != null) {      css = getCSSCapabilityType(cssPG, typeIdProp.getTypeIdentification());    }    if (css == null) {      System.out.println(getCluster().getMessageAddress() + "LoadAllocatorPlugin  - No capacity for "                         + typeIdProp.getTypeIdentification()                         + " in CSSCapabilityType - using default value");    } else      qty = css.getCapacity().getQuantity().getValue(unit);    //System.out.println(getCluster().getMessageAddress() + " LoadAllocator using " + qty +    //                   "as capacity for " + typeIdProp.getTypeIdentification());    cse.setQuantity(qty);    /*cse.setQuantity(1050d);*/    cse.setStartTime(oplanStartTime);    cse.setEndTime(oplanEndTime);    cses.addElement(cse);    NewSchedule sched =  GLMFactory.newQuantitySchedule(cses.elements(),                                                        PlanScheduleType.ACTUAL_CAPACITY);    // Create a NewScheduledContentPG for the container.    //    NewScheduledContentPG nscp =      (NewScheduledContentPG) new ScheduledContentPGImpl();    nscp.setAsset(asset);    nscp.setSchedule(sched);    Capacity c;    try {      c =(org.cougaar.glm.ldm.asset.Capacity) theLDMF.createAsset(Capacity.class);    } catch (Exception exc) {      System.out.println(getCluster().getMessageAddress() + " LoadAllocator - problem creating a Capacity asset.");      exc.printStackTrace();      c = new Capacity();    }    c.setScheduledContentPG(nscp);    c.setTypeIdentificationPG(typeIdProp);    //    // Set the availability on this asset.    //    Schedule ss = theLDMF.newSimpleSchedule( new Date(oplanStartTime),                                             new Date (oplanEndTime));    ((NewRoleSchedule)c.getRoleSchedule()).setAvailableSchedule( ss );//      System.out.println(getCluster().getMessageAddress() + " LoadAllocator created Capacity Object "//                         + c.getUID());    return c;  }    