Here is the class diagram of a sample Java module 'GenListModule' in the preprocessing stage
We use GenListModule which extends AbstractModule to control the whole program logic of this module. MapReader is used to parse the input xml file. It also implements the org.xml.sax.ContentHandler. Is used to handle different information in xml file, collect and write the information we need to class Content. ListWriter reads the information from class GenListModule and outputs those lists into the intermediate files.
Here is the sequence diagram of the example.
GenListModule first creates MapReader and ListWriter. Then GenListModule calls MapReader to read and parse the input file. In order to process the large input file, we choose SAX Parser as the parser and each time we only process one file and keep the list of files we will process later in the waiting list of GenListModule. After the parse process is over, GenListModule gets the result content from MapReader. Then GenListModule processes the content and set the content to ListWriter. Then it calls ListWriter to output the information to intermediate file.