Commit bc9f5c0f authored by Daniel Lehmberg's avatar Daniel Lehmberg
Browse files

Merge branch 'change_dataprocessing_text' into 'master'

issues #199 and #201

Closes #201

See merge request !38
parents fbaa84dc 61ede76d
Pipeline #86467 failed with stages
in 54 seconds
......@@ -27,6 +27,8 @@
sub-command. This will will turn the ScenarioChecker on or off for the command
line. If the Checker detects an error the simulation will not be executed.
- `OutputFile`: Distinguish between indices (rows) and headers (columns), in code and with a new checkbox that when enables allow to write meta-data into output files. Furthermore, resolve naming conflicts (if they occur) in headers of output files (see #201).
### Changed
- Removed directory `Documentation/version-control` which contained the Git hooks. The Git hooks are not required anymore. Instead, added `git rev-parse HEAD` to file `VadereSimulator/pom.xml` to create `VadereSimulator/resources/current_commit_hash.txt` during each build via `mvn compile`.
......
......@@ -40,6 +40,7 @@ NewTestError.title=Error
DataProcessingView.msgInvalidJson=Invalid json
DataProcessingView.msgShowError=Show error message
DataProcessingView.chbAddTimeStamp=Add timestamp to output folder
DataProcessingView.chbAddMetaData=Add meta data to output files
DataProcessingView.btnAdd=Add
DataProcessingView.btnDelete=Delete
DataProcessingView.msgFileSelected=No output file selected.
......@@ -51,7 +52,7 @@ DataProcessingView.msgFileEmpty=File name can't be empty
DataProcessingView.msgFileInUse=File name is already in use
DataProcessingView.dialogInvalidFile.label=Invalid file name
DataProcessingView.dialogOutputDataKeySelection.label=Data Key
DataProcessingView.dialogOutputHeaderSelection.label=Header
DataProcessingView.dialogOutputIndicesSelection.label=Index
ProgressPanelDone.text=Done
ProgressPanelWorking.text=Working...
......@@ -326,7 +327,7 @@ Tab.Model.insertModelNameSubMenu.title=Main models
Tab.Pedestrians.title=Pedestrians
Tab.Topography.title=Topography
Tab.Event.title=Events
Tab.OutputProcessors.title=Data processing GUI
Tab.OutputProcessors.title=Data output
Tab.TopographyCreator.title=Topography creator
Tab.PostVisualization.title=Post-Visualization
......
......@@ -39,6 +39,7 @@ NewTestError.title=Fehler.
DataProcessingView.msgInvalidJson=Fehlerhaftes JSON
DataProcessingView.msgShowError=Zeige Fehlermeldung
DataProcessingView.chbAddTimeStamp=F\u00FCge Zeitstempel zu Ausgabeordner
DataProcessingView.chbAddMetaData=F\u00FCge Meta-Daten in Ausgabedateien
DataProcessingView.btnAdd=Hinzuf\u00FCgen
DataProcessingView.btnDelete=L\u00F6schen
DataProcessingView.msgFileSelected=Keine Ausgabedatei ist ausgew\u00E4hlt
......@@ -50,7 +51,7 @@ DataProcessingView.msgFileEmpty=Datei darf nicht leer sein
DataProcessingView.msgFileInUse=Dateiname bereits vorhanden
DataProcessingView.dialogInvalidFile.label=Ung\u00FCltiger Dateiname
DataProcessingView.dialogOutputDataKeySelection.label=Rubrik
DataProcessingView.dialogOutputHeaderSelection.label=Kopfzeile
DataProcessingView.dialogOutputIndicesSelection.label=index
ProgressPanelDone.text=Fertig
ProgressPanelWorking.text=Arbeite...
......@@ -319,7 +320,7 @@ Tab.Model.insertModelNameSubMenu.title=Hauptmodelle
Tab.Pedestrians.title=Fu\u00dfg\u00e4nger
Tab.Topography.title=Topographie
Tab.Event.title=Events
Tab.OutputProcessors.title=Datenverarbeitung
Tab.OutputProcessors.title=Datenausgabe
Tab.TopographyCreator.title=Topographie-Designer
Tab.PostVisualization.title=Post-Visualisierung
......
......@@ -184,6 +184,7 @@ class DataProcessingView extends JPanel implements IJsonView {
private boolean isEditable;
private JCheckBox isTimestampedCheckBox;
private JCheckBox isWriteMetaData;
private JTable outputFilesTable;
private DefaultTableModel outputFilesTableModel;
private JTable dataProcessorsTable;
......@@ -219,10 +220,23 @@ class DataProcessingView extends JPanel implements IJsonView {
currentScenario.getDataProcessingJsonManager().setTimestamped(isTimestampedCheckBox.isSelected());
}
});
isTimestampedCheckBox.setAlignmentX(Component.LEFT_ALIGNMENT);
addEditableComponent(isTimestampedCheckBox);
filesPanel.add(isTimestampedCheckBox);
isWriteMetaData = new JCheckBox(Messages.getString("DataProcessingView.chbAddMetaData"));
isWriteMetaData.addActionListener(new AbstractAction() {
@Override
public void actionPerformed(ActionEvent e) {
currentScenario.getDataProcessingJsonManager().setWriteMetaData(isWriteMetaData.isSelected());
}
});
isWriteMetaData.setAlignmentX(Component.LEFT_ALIGNMENT);
addEditableComponent(isWriteMetaData);
filesPanel.add(isWriteMetaData);
JButton addFileBtn = new JButton(new AbstractAction(Messages.getString("DataProcessingView.btnAdd")) {
@Override
public void actionPerformed(ActionEvent e) {
......@@ -357,6 +371,7 @@ class DataProcessingView extends JPanel implements IJsonView {
selectedOutputFile = null;
selectedDataProcessor = null;
isTimestampedCheckBox.setSelected(scenario.getDataProcessingJsonManager().isTimestamped());
isWriteMetaData.setSelected(scenario.getDataProcessingJsonManager().isWriteMetaData());
updateOutputFilesTable();
updateDataProcessorsTable();
updateDataProcessIdsInUse();
......@@ -580,11 +595,14 @@ class DataProcessingView extends JPanel implements IJsonView {
c.gridx = 0;
c.gridy = 2;
panel.add(new JLabel(Messages.getString("DataProcessingView.dialogOutputHeaderSelection.label")+":"), c);
panel.add(new JLabel(Messages.getString("DataProcessingView.dialogOutputIndicesSelection.label")+":"), c);
// Only the indices are shown, not the entire header. > Entire header can be quite a lot of text (which may
// not fit in the GUI) + the processors (with the header information) are not inserted and removed on the fly,
// but only when the simulation is started.
c.gridx = 1;
c.gridy = 2;
panel.add(new JLabel(outputFile.getHeader()), c);
panel.add(new JLabel(outputFile.getIndicesLine()), c);
c.gridx = 0;
c.gridy = 3;
......
......@@ -49,7 +49,8 @@
"pedestrianOverlapProcessorId" : 3
}
} ],
"isTimestamped" : true
"isTimestamped" : true,
"isWriteMetaData" : false
},
"scenario" : {
"mainModel" : "org.vadere.simulator.models.osm.OptimalStepsModel",
......@@ -218,4 +219,4 @@
},
"eventInfos" : [ ]
}
}
\ No newline at end of file
}
......@@ -37,7 +37,8 @@
"pedestrianOverlapProcessorId" : 3
}
} ],
"isTimestamped" : true
"isTimestamped" : true,
"isWriteMetaData" : false
},
"scenario" : {
"mainModel" : "org.vadere.simulator.models.osm.OptimalStepsModel",
......
......@@ -54,7 +54,8 @@
"pedestrianOverlapProcessorId" : 3
}
} ],
"isTimestamped" : true
"isTimestamped" : true,
"isWriteMetaData" : false
},
"scenario" : {
"mainModel" : "org.vadere.simulator.models.osm.OptimalStepsModel",
......
......@@ -64,7 +64,8 @@
"minimalWaitingTime" : 0.0
}
} ],
"isTimestamped" : true
"isTimestamped" : true,
"isWriteMetaData" : false
},
"scenario" : {
"mainModel" : "org.vadere.simulator.models.osm.OptimalStepsModel",
......
......@@ -64,7 +64,8 @@
"pedestrianOverlapProcessorId" : 6
}
} ],
"isTimestamped" : true
"isTimestamped" : true,
"isWriteMetaData" : false
},
"scenario" : {
"mainModel" : "org.vadere.simulator.models.osm.OptimalStepsModel",
......
......@@ -40,7 +40,8 @@
"pedestrianOverlapProcessorId" : 4
}
} ],
"isTimestamped" : true
"isTimestamped" : true,
"isWriteMetaData" : false
},
"scenario" : {
"mainModel" : "org.vadere.simulator.models.osm.OptimalStepsModel",
......
......@@ -56,7 +56,8 @@
"pedestrianOverlapProcessorId" : 6
}
} ],
"isTimestamped" : true
"isTimestamped" : true,
"isWriteMetaData" : false
},
"scenario" : {
"mainModel" : "org.vadere.simulator.models.osm.OptimalStepsModel",
......
......@@ -56,7 +56,8 @@
"pedestrianOverlapProcessorId" : 6
}
} ],
"isTimestamped" : true
"isTimestamped" : true,
"isWriteMetaData" : false
},
"scenario" : {
"mainModel" : "org.vadere.simulator.models.osm.OptimalStepsModel",
......
......@@ -32,7 +32,8 @@
"pedestrianOverlapProcessorId" : 3
}
} ],
"isTimestamped" : true
"isTimestamped" : true,
"isWriteMetaData" : false
},
"scenario" : {
"mainModel" : "org.vadere.simulator.models.osm.OptimalStepsModel",
......
......@@ -53,7 +53,8 @@
"pedestrianOverlapProcessorId" : 3
}
} ],
"isTimestamped" : true
"isTimestamped" : true,
"isWriteMetaData" : false
},
"scenario" : {
"mainModel" : "org.vadere.simulator.models.osm.OptimalStepsModel",
......
......@@ -53,7 +53,8 @@
"pedestrianOverlapProcessorId" : 3
}
} ],
"isTimestamped" : true
"isTimestamped" : true,
"isWriteMetaData" : false
},
"scenario" : {
"mainModel" : "org.vadere.simulator.models.osm.OptimalStepsModel",
......
......@@ -53,7 +53,8 @@
"pedestrianOverlapProcessorId" : 3
}
} ],
"isTimestamped" : true
"isTimestamped" : true,
"isWriteMetaData" : false
},
"scenario" : {
"mainModel" : "org.vadere.simulator.models.osm.OptimalStepsModel",
......
......@@ -57,7 +57,8 @@
"pedestrianOverlapProcessorId" : 5
}
} ],
"isTimestamped" : true
"isTimestamped" : true,
"isWriteMetaData" : false
},
"scenario" : {
"mainModel" : "org.vadere.simulator.models.osm.OptimalStepsModel",
......
......@@ -57,7 +57,8 @@
"pedestrianOverlapProcessorId" : 5
}
} ],
"isTimestamped" : true
"isTimestamped" : true,
"isWriteMetaData" : false
},
"scenario" : {
"mainModel" : "org.vadere.simulator.models.osm.OptimalStepsModel",
......
......@@ -22,7 +22,8 @@
"pedestrianOverlapProcessorId" : 1
}
} ],
"isTimestamped" : true
"isTimestamped" : true,
"isWriteMetaData" : false
},
"scenario" : {
"mainModel" : "org.vadere.simulator.models.osm.OptimalStepsModel",
......
......@@ -22,7 +22,8 @@
"pedestrianOverlapProcessorId" : 1
}
} ],
"isTimestamped" : true
"isTimestamped" : true,
"isWriteMetaData" : false
},
"scenario" : {
"mainModel" : "org.vadere.simulator.models.osm.OptimalStepsModel",
......
Markdown is supported
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