_gp.getLoggingService().info("Adding - " + task.getUID () + " for "+ receiver + " - " + typeID + " - " + quantity);
_gp.getLoggingService().info("Adding - " + task.getUID () + " for "+ receiverID + " - " + typeID + " - " + quantity);
  protected void addContentsInfo(GLMAsset container, List agglist) {    ArrayList typeIDs = new ArrayList();    ArrayList nomenclatures = new ArrayList();    ArrayList weights = new ArrayList();    ArrayList receivers = new ArrayList();    for (Iterator iterator = agglist.iterator();         iterator.hasNext();) {      Task task = (Task) iterator.next();      TypeIdentificationPG typeIdentificationPG =          task.getDirectObject().getTypeIdentificationPG();      String typeID;      String nomenclature;      if (typeIdentificationPG != null) {        typeID = typeIdentificationPG.getTypeIdentification();        if ((typeID == null) || (typeID.equals(""))) {          typeID = UNKNOWN;        }        nomenclature = typeIdentificationPG.getNomenclature();        if ((nomenclature == null) || (nomenclature.equals(""))) {          nomenclature = UNKNOWN;        }      } else {        typeID = UNKNOWN;        nomenclature = UNKNOWN;      }      typeIDs.add(typeID);      nomenclatures.add(nomenclature);      double quantity = task.getPreferredValue(AspectType.QUANTITY);      Mass mass = Mass.newMass(quantity, Mass.SHORT_TONS);      weights.add(mass);      Object receiver =          task.getPrepositionalPhrase(Constants.Preposition.FOR);      if (receiver != null)        receiver = ((PrepositionalPhrase) receiver).getIndirectObject();      String receiverID;      // Add field with recipient      if (receiver == null) {        receiverID = UNKNOWN;        _gp.getLoggingService().error("Filler.addContentsInfo - Task " + task.getUID() + " had no FOR prep.");      } else if (receiver instanceof String) {        receiverID = (String) receiver;      } else if (!(receiver instanceof Asset)) {        receiverID = UNKNOWN;      } else {        ItemIdentificationPG itemIdentificationPG =            ((Asset) receiver).getItemIdentificationPG();        if ((itemIdentificationPG == null) ||            (itemIdentificationPG.getItemIdentification() == null) ||            (itemIdentificationPG.getItemIdentification().equals(""))) {          receiverID = UNKNOWN;        } else {          receiverID = itemIdentificationPG.getItemIdentification();        }      }      _gp.getLoggingService().info("Adding - " + task.getUID () + " for "+ receiver + " - " + typeID + " - " + quantity);      packer.addToReceiver (receiverID, typeID, quantity);      receivers.add(receiverID);    }    // Contents    NewContentsPG contentsPG =        PropertyGroupFactory.newContentsPG();    contentsPG.setNomenclatures(nomenclatures);    contentsPG.setTypeIdentifications(typeIDs);    contentsPG.setWeights(weights);    contentsPG.setReceivers(receivers);    container.setContentsPG(contentsPG);  }