LogisticsInventoryPG logInvPG = (LogisticsInventoryPG) invAsset.searchForPropertyGroup(LogisticsInventoryPG.class);  SupplyClassPG pg = (SupplyClassPG) logInvPG.getResource().searchForPropertyGroup(SupplyClassPG.class); String supplyType = pg.getSupplyType();  header = header + " supplyType=" + supplyType;
  protected void logHeaderStartToXMLOutput(Inventory invAsset,                                           Organization anOrg,                                           boolean level2Inv,                                           boolean humanReadable) {    String orgId = anOrg.getItemIdentificationPG().getItemIdentification();    String itemId = invAsset.getItemIdentificationPG().getItemIdentification();    int idx = itemId.indexOf(':');    itemId = itemId.substring(idx + 1);    String header;    if (humanReadable) {      header = "<" + INVENTORY_HEADER_PERSON_READABLE_TAG + " org=" + orgId + " item=" + itemId;    } else {      header = "<" + INVENTORY_HEADER_GUI_TAG + " org=" + orgId + " item=" + itemId;    }    header = header + " unit=" + getUnitForAsset(invAsset);    TypeIdentificationPG typeIdPG = logInvPG.getResource().getTypeIdentificationPG();    if (typeIdPG == null) {      logger.warn("No typeIdentificationPG for asset");    }    String nomenclature = typeIdPG.getNomenclature();    if (nomenclature == null) {      nomenclature = itemId;    }    if (level2Inv) {      //SupplyClassPG supplyPG = (SupplyClassPG) logInvPG.getResource().searchForPropertyGroup(SupplyClassPG.class);      //if (supplyPG != null) {      //nomenclature = supplyPG.getSupplyType();      //}      nomenclature = "";    }    header = header + " nomenclature=" + nomenclature;    if (humanReadable) {      header = header + " cDay=" + (new Date(startCDay.getTime())) + ">";    } else {      header = header + " cDay=" + startCDay.getTime() + ">";    }    writeNoCycleLn(header);  }