Commit a9983401 authored by Jakob Schöttl's avatar Jakob Schöttl
Browse files

Rename methods

parent 5052f989
......@@ -89,7 +89,7 @@ public class PostVisualizationConsole {
if (trajectoryFile.isPresent() && scenarioFile.isPresent()) {
TrajectoryReader reader = new TrajectoryReader(trajectoryFile.get().toPath());
model.init(reader.readFile(), IOOutput.readVadere(scenarioFile.get().toPath()));
model.init(reader.readFile(), IOOutput.readScenario(scenarioFile.get().toPath()));
} else {
System.err.println("could not find trajectory or scenario file in: " + outputDirectoryPath);
}
......
......@@ -81,7 +81,7 @@ public class ActionOpenFile extends ActionVisualization {
IOUtils.getFirstFile(scenarioOutputDir, IOUtils.SCENARIO_FILE_EXTENSION);
if (trajectoryFile.isPresent() && snapshotFile.isPresent()) {
ScenarioRunManager vadere = IOOutput.readVadere(snapshotFile.get().toPath());
ScenarioRunManager vadere = IOOutput.readScenario(snapshotFile.get().toPath());
model.init(IOOutput.readTrajectories(trajectoryFile.get().toPath(), vadere), vadere);
model.notifyObservers();
dialog.dispose();
......
......@@ -25,7 +25,7 @@ public class ActionOutputToScenario extends ActionAbstractAddScenario {
@Override
protected ScenarioRunManager generateVadere(final String name) throws IOException {
OutputBundle bundle = model.getSelectedOutputBundle();
ScenarioRunManager scenarioRM = IOOutput.readVadere(bundle.getDirectory());
ScenarioRunManager scenarioRM = IOOutput.readScenario(bundle.getDirectory());
scenarioRM.setName(name);
return scenarioRM;
}
......
......@@ -56,7 +56,7 @@ public abstract class IOOutput {
*/
public static void cleanOutputDirs(final VadereProject project) {
listAllDirs(project).stream().filter(f -> !isValidOutputDirectory(project, f))
.forEach(dir -> cleanDir(project, dir));
.forEach(dir -> cleanDirectory(project, dir));
}
public static Map<Step, List<Agent>> readTrajectories(final VadereProject project,
......@@ -80,7 +80,7 @@ public abstract class IOOutput {
return IOVadere.fromJson(snapshotString);
}
public static ScenarioRunManager readVadere(final File file) throws IOException {
public static ScenarioRunManager readScenario(final File file) throws IOException {
String snapshotString;
Path path = file.toPath();
if (file.isFile() && file.getName().endsWith(IOUtils.SCENARIO_FILE_EXTENSION)) {
......@@ -99,8 +99,8 @@ public abstract class IOOutput {
return IOVadere.fromJson(snapshotString);
}
public static ScenarioRunManager readVadere(final Path path) throws IOException {
return IOOutput.readVadere(path.toFile());
public static ScenarioRunManager readScenario(final Path path) throws IOException {
return IOOutput.readScenario(path.toFile());
}
public static boolean renameOutputDirectory(final File directory, final String newName) {
......@@ -163,7 +163,7 @@ public abstract class IOOutput {
return outputDirectories;
}
private static void cleanDir(final VadereProject project, final File directory) {
private static void cleanDirectory(final VadereProject project, final File directory) {
IOUtils.errorBox(
"The directory '"
+ directory.getName()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment