|
|
# Software Design
|
|
|
|
|
|
>>>
|
|
|
**Notes about the configuration files and parser:**
|
|
|
- first thoughts about possible formats: INI, JSON, XML
|
... | ... | @@ -22,13 +24,40 @@ Instead: Java Properties? |
|
|
>>>
|
|
|
Leonard
|
|
|
|
|
|
# The pipeline
|
|
|
## The pipeline
|
|
|
|
|
|
This chapter focuses on the functional flow of the `BraillePlot` command line application.
|
|
|
|
|
|
If you wish to embed `BraillePlot` into your own application/library, you can take a glimpse here, too, to get an idea of the required java package dependencies for your use cases.
|
|
|
|
|
|
TODO: add overview graph
|
|
|
|
|
|
|
|
|
## Packages
|
|
|
|
|
|
This chapter focuses on the java sub-packages of `Braillplot` and their purpose in the application.
|
|
|
|
|
|
For detailed information, please consult the javadoc.
|
|
|
Currently, the javadoc is not available online, you have to generate it by hand via `gradle javadoc` from the project root directory.
|
|
|
|
|
|
Here we should describe the general workflow of our application.
|
|
|
|Package|Dependencies|Purpose|
|
|
|
|---|---|---|
|
|
|
|brailleparser|configparser|Manages the parsing of braille tables required for the translation from Braille characters to their respective ascii representation expected by the embosser.|
|
|
|
|commandline|-|Manages the parsing of the command line parameters (`String[] args`). Parameters can be added statically in `SettingType.java` and `CommandLineParser.java`. For querying the values of parameters on runtime, use `Settings.java`|
|
|
|
|configparser|-|Manages the parsing of configuration files for printer, format and repesentation. See [Properties](EndUserDocumentation#properties) for usage details.|
|
|
|
|csvparser|datacontainers, point|Manages the parsing of input data from CSV files. Produces astract data structures from the `datacontainer` package.|
|
|
|
|datacontainers|-|Contains interfaces and their reference implementations for intermediate input data representation.|
|
|
|
|diagrams|datacontainer|Contains classes, that implement the `Renderable` interface from the `rendering package`. These classes are supposed to model real world diagrams. They hold a reference to the input data in form of a `datacontainer` object.|
|
|
|
|layout|configparser, printabledata|Contains classes required for the layout of data that is supposed to be embossed. Combines the raw data in form of a `printabledata` references with positioning information (margins, dot diameters...). Also contains the helper class `Rectangle` which is widely used in the `rendering` package to form a easy box layout model.|
|
|
|
|point|-|Helper classes that model a point. Currently contains interfaces and classes for two-dimensional points which may contain a value.|
|
|
|
|printabledata|point, configurationparser (can be removed, logic is now in layout)|Contains interfaces and their implementations for the abstract data representation of embossable documents. Currently, there are container specialized for the `text` and `graphics` mode: `MatrixData`, and for the `floating dot` mode: `FloatingPointData` (see [Modes of operation](Conceptual-Design#modes-of-operation) for details on the different modes).
|
|
|
|printerbackend|printabledata, brailleparser, point, configparser|Manages the actual printing/embossing process. Determines the correct operation mode (see [Modes of operation](Conceptual-Design#modes-of-operation)), and creates a printjob/binary dump of the constructed document.|
|
|
|
|rendering|datacontainer, layout, printabledata, point, diagrams, brailleparser|Home of the main logic for the actual diagram creation. Combines layout information from the configuration files with the input data in form of `datacontainers` in order to create `printabledata` objects.|
|
|
|
|svgexporter|printabledata, layout, point|Creates SVG files which emulate the final embossed documents. Uses the layout information from the configuration files to match the same margins, distances etc. as the embosser would create. Reads the data from `printabledata` objects.|
|
|
|
|util|-|Contains static helper classes for various occasions.|
|
|
|
|
|
|
# Packages
|
|
|
Note: Dependencies to the `util` package are not listed here.
|
|
|
|
|
|
Here we can explain how we derived the TLA and packages from the previously explained pipeline.
|
|
|
|
|
|
## Rendering
|
|
|
|
... | ... | |