use of net.sourceforge.processdash.data.repository.DataRepository in project processdash by dtuma.
the class AutoExportTrigger method updateDataRegistrations.
private void updateDataRegistrations(Set<String> newNamesToWatch) {
// make a list of the registrations that have changed
Set<String> unneededNames;
Set<String> newNames;
synchronized (this) {
unneededNames = setDiff(listeningToDataNames, newNamesToWatch);
newNames = setDiff(newNamesToWatch, listeningToDataNames);
this.listeningToDataNames = newNamesToWatch;
}
// stop listening to any elements we no longer care about.
DataRepository data = ctx.getData();
for (String oneName : unneededNames) data.removeDataListener(oneName, this);
// begin listening to any newly identified data elements.
for (String oneName : newNames) data.addDataListener(oneName, this, true);
}
use of net.sourceforge.processdash.data.repository.DataRepository in project processdash by dtuma.
the class OpenTimeLogEditor method getAugmentedHierarchy.
private DashHierarchy getAugmentedHierarchy() {
// create a copy of the standard hierarchy
DashHierarchy result = new DashHierarchy(getPSPProperties().dataPath);
result.copy(getPSPProperties());
// find the leaves in the hierarchy, and augment each leaf with
// supplementary children provided from data element specifications
DataRepository data = getDataRepository();
Enumeration<PropertyKey> leaves = result.getLeaves(PropertyKey.ROOT);
while (leaves.hasMoreElements()) {
PropertyKey leaf = leaves.nextElement();
augmentHierarchy(result, leaf, data);
}
return result;
}
use of net.sourceforge.processdash.data.repository.DataRepository in project processdash by dtuma.
the class MoveProjectWizard method getSimpleValue.
/** Get a value from the data repository. */
private SimpleData getSimpleValue(String name) {
DataRepository data = getDataRepository();
String prefix = getPrefix();
if (prefix == null)
prefix = "";
String dataName = DataRepository.createDataName(prefix, name);
SimpleData d = data.getSimpleValue(dataName);
return d;
}
use of net.sourceforge.processdash.data.repository.DataRepository in project processdash by dtuma.
the class MoveProjectWizard method putValue.
private void putValue(String name, SimpleData dataValue) {
DataRepository data = getDataRepository();
String prefix = getPrefix();
if (prefix == null)
prefix = "";
String dataName = DataRepository.createDataName(prefix, name);
data.putValue(dataName, dataValue);
}
use of net.sourceforge.processdash.data.repository.DataRepository in project processdash by dtuma.
the class MigrationToolTeam method migrate.
public void migrate() throws Exception {
File dataFile = getRootDataFile();
makeExtraBackup();
System.out.println("Starting migration of team project '" + projectPath + "'");
DataRepository data = ctx.getData();
data.closeDatafile(projectPath);
migrateDatafileContents(dataFile);
data.openDatafile(projectPath, dataFile.getPath());
System.out.println("Finished migrating team project '" + projectPath + "'");
}
Aggregations