The Java Architecture

The design of the Java GUI is not fundamental to the functioning of SORTIE-ND, like the design of the core model is. The GUI could use any design which allowed it to perform its designated jobs (creating the parameter file, calling the core model, and interpreting model output). This means that I welcome ideas for architecture improvement.

There are two Java class packages in the interface - javawrapper and datavisualizer. javawrapper is the code that deals with inputting and editing data - it's the "Java wrapper" around the underlying C++ core. It's meant to be "smarter" than the C++ code and more aware of the logic of simulation building, to keep the user from making logical mistakes that the core would allow. datavisualizer is the code that interprets model output files and displays them in various ways for the user.

javawrapper package

The class structure of the javawrapper package mirrors the C++ code. There's a GUIManager, which functions much like the Simulation Manager. There are Behaviors collected into BehaviorTypeBases, which map to functional submodels. If you understand the C++ architecture, it will help a lot when it's time to look at the Java code.

datavisualizer package

The datavisualizer package is simpler than it looks. Multiple files can be open at once in the interface for graphing; each open file is managed by an object descended from DataFileManager. For detailed output files, each type of chart is managed by a separate object descended from DataRequest, which knows how to collect and draw data for its particular chart type. Detailed output files are parsed from the XML by DetailedOutputFileSetupParseHandler and DetailedOutputTimestepParseHandler. Most of the actual graphics code resides in DataGrapher.


16-Feb-2005 10:35 AM