private void setFilename(DataFileEntry e) { String datafile = e.getFilename(); if (!datafile.equals(currentDatafile)) { this.currentDatafile = datafile; this.currentNode = hierarchyInfo.findNodeForDataFile(datafile); } }
/** * The global.dat file contains data elements that hold metadata for locally defined task lists. * These data element names contain task list names and must be renamed. */ private boolean maybeRenameGlobalTSElement(DataFileEntry e) { // check to see if we are in the global data file if (!"global.dat".equals(e.getFilename())) return false; // look for the presence of the task & schedule dataname prefix String dataName = e.getKey(); if (!dataName.startsWith(GLOBAL_TS_PREFIX)) return false; // extract the task list name out of the data name int end = dataName.indexOf('/', beg + 1); if (end == -1) return false; String taskListName = dataName.substring(beg, end); // construct a new name for the data element String newName = taskListMapper.hashTaskListName(taskListName); e.setKey(GLOBAL_TS_PREFIX + newName + dataName.substring(end)); return true; }