/**
  * This method provides HashMap for users to select each data source item type.
  *
  * @return ItemTypeTable
  */
 public static Map<String, String> getItemType() {
   Map<String, String> itemTypeTable = new HashMap<String, String>();
   for (DataSource ds : getDataGroup().getDataSource()) {
     for (SourceItem si : ds.getSourceItem()) {
       itemTypeTable.put(si.getItemName().trim(), si.getItemType().trim());
     }
   }
   return itemTypeTable;
 }
 public static Map<String, SourceItem> getDataFieldSourceItem() {
   Map<String, SourceItem> dataFieldSourceItem = new HashMap<String, SourceItem>();
   for (DataSource ds : getDataGroup().getDataSource()) {
     for (SourceItem si : ds.getSourceItem()) {
       dataFieldSourceItem.put(si.getItemName().trim(), si);
     }
   }
   return dataFieldSourceItem;
 }
 public static Map<String, String> getItemActualSource() {
   Map<String, String> itemActualSource = new HashMap<String, String>();
   for (DataSource ds : getDataGroup().getDataSource()) {
     for (SourceItem si : ds.getSourceItem()) {
       itemActualSource.put(
           si.getItemName().trim(), si.getActualSource() == null ? "" : si.getActualSource());
     }
   }
   return itemActualSource;
 }
  /** This method provides a HashMap for users to select data item for each data group. */
  public static Map<String, List<SourceItem>> getSourceItem() {
    Map<String, List<SourceItem>> sourceItems = new HashMap<String, List<SourceItem>>();
    List<SourceItem> sortedItemList = null;

    DynamicSearchSourceItemComparator dssic = new DynamicSearchSourceItemComparator();

    for (DataSource dataSource : getDataGroup().getDataSource()) {
      sortedItemList = new ArrayList<SourceItem>();
      for (SourceItem item : dataSource.getSourceItem()) {
        sortedItemList.add(item);
      }
      Collections.sort(sortedItemList, dssic);
      sourceItems.put(dataSource.getSourceName(), sortedItemList);
    }
    return sourceItems;
  }