コード例 #1
0
  protected void writeContents() throws IOException {
    DataRepository data = getDataRepository();
    if (data == null) return;
    init(data);

    // get the [Use_Rollup] data element for the current
    // project. If it is null, return immediately.
    String prefix = getPrefix();
    if (prefix == null) return;
    String useRollupName = DataRepository.createDataName(prefix, "Use_Rollup");
    ListData rollupIDs = getList(data, useRollupName);
    if (rollupIDs == null) return;

    String tableStart = TABLE_START, tableEnd = "", tableRow;
    for (int i = 0; i < rollupIDs.size(); i++) {
      tableRow = getFragment(data, rollupIDs.get(i).toString());
      if (tableRow != null && tableRow.length() > 0) {
        out.print(tableStart);
        out.print(tableRow);
        tableStart = "";
        tableEnd = TABLE_END;
      }
    }
    out.print(tableEnd);
  }
コード例 #2
0
 private SimpleData getValue(String path, String name) {
   String dataName = DataRepository.createDataName(path, name);
   return context.getData().getSimpleValue(dataName);
 }