-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathWORKFLOW.txt
85 lines (55 loc) · 3.57 KB
/
WORKFLOW.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
BrailleBlaster stack
====================
Library stack
# liblouis - generic string to braille text converter
# jlouis - Java bindings for liblouis
# UTD - Translates and formats XML documents into braille
# BrailleBlaster - Editor for UTD/BBX documents
Dependency library highlights
* SWT - Eclipse SWT for cross-platform UI widgets
* swtbot - Unit testing robot for SWT UI's
* XOM - XML API powered by Xerces
* slf4j/logback - Logging framework
BrailleBlaster start - org.brailleblaster.Main
==========================================================
# Initializes BBBootstrap
* Initializes dependency libraries
* Locates and/or creates %appdata%/.brlblst or $HOME/.brlblst
# Initializes BBIni - Stores global settings
* BBini.getPropertyFileManager() - Manages user_settings.properties
# Creates WPManager "Word Processor Manager" - An instance of BrailleBlaster
* Creates SWT Shell with tabs
* Each tab is a Controller - Currently only Manager with Text/Braille/Style views
* Creates a Manager - Either opens the given file or the blank document template
* MenuManager - makes shell menu and toolbar based on configuration during BuildMenuEvent/BuildToolBarEvent
# WPManager.start() - SWT UI event loop, ready for user input
Brailleblaster opening a nimas/dtbook book: rough workflow
==========================================================
# Create a new Manager either from `new WPManager("file")` or opening a file
# Manager initalizes modules - A listener for SimpleEvent's
* BuildMenuEvent/BuildToolBarEvent - Configure MenuManager before it flushes to shell
* XMLCaretEvent - New caret position based on XML position
* ModifyEvent - Dispatch when XML is updated
# Manager.openDocument - Entry point when a manager is ready to open a file
# ArchiverFactory.load - Open a file as a BBX file, converting if necessary
* ArchiveLoader - Uses BookToBBXConvert on input and makes a BBX/BBZArchive
* BBX/BBZArchive - Manages access and saving to file
# BookToBBXConverter - Converts XML documents into BBX documents
* ParserMap - Generates a BBX document from source document
* nimas.parserMap.xml - Convert nimas/dtbook elements into BBX elements
* FixerMap - Optimizes, cleans up, and simplifies BBX document
* Validator - Makes sure BBX Document is sane
# Manager.initalizeAllViews - The main entry point, translates document and creates views by calling all below methods
# UTDTranslationEngine.translateDocument - Translates text to Braille in document using jlouis/liblouis and generates <utd:brl> elements
* ActionMap - Maps elements to a form of GenericAction or GenericBlockAction
* GenericBlockAction represents a single block of text and its elements and attributes
# UTDTranslationEngine.format - Formats translated Braille into Braille pages
* StyleMap - Describes Braille formatting rules of an element
* bbx.styleMap.xml - Formatting rules currently based on BANA Braille Formats, Principles of Print-to-Braille Transcription, $year
* OverrideMap and BBXOptionStyleMap - Returns styles for user-selected styles or options of elements
* BBXStyleMap - Returns styles for BBX element-defined styles
# Creates Views from UTD Document
* NimasInitializer.initializeViews - Makes initial MapList MapElements from UTD document
* ViewInitializer.setViews - Uses TextRenderer and BrailleRenderer to layout text and finish MapElement init
* *Renderer.finishRendering - Writes text and StyledText config
* Manager.initalizeListeners - Adds all SWT listeners to the views