コード例 #1
0
  public static Map<String, String> getPackageNames() {
    Map<String, String> packageNames = new HashMap<String, String>();
    for (DataSource ds : getDataGroup().getDataSource()) {
      packageNames.put(ds.getSourceName(), ds.getSourcePackageName());
    }

    return packageNames;
  }
コード例 #2
0
 /**
  * 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;
 }
コード例 #3
0
 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;
 }
コード例 #4
0
 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;
 }
コード例 #5
0
  /** 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;
  }