Writing a Java app to parse Collate output into P5
I need to get up to speed with Java to write some stuff we require for special processing in Cocoon, for a number of projects, so I'm taking this opportunity to write a little text file processing tool in Java, rather than in Delphi. It'll make it more portable too.
Worked through the NetBeans 5.5 tutorial on basic Swing GUIs, and got a GUI written for my application. The new GUI design tool combined with Java 1.6 is a great step forward, and it's now almost as easy to design the basic GUI in Java as it is in Delphi, although obviously there are lots of aspects I don't yet understand. The Java 1.6 requirement means it'll only run on Windows and Linux for the moment -- the Mac JVM is behind -- but that's a temporary limitation. Got the GUI resizing OK, figured out how to pop up a dialog box and load a file (pinched some file loading code from Stew). Then I started writing the string processing.
The idea is to parse out the output from Collate to produce a series of P5 <app >elements containing <rdg> elements and an optional <lem> element. I didn't get as far as generating working output -- I'm stuck on an array index out of bounds error -- but I'll get there pretty soon. Then we'll be able to use Collate to generate the core data, and process it into P5. We should also be able to automate the production of the base text from the main DMS transcription using XSLT, so the whole process will be fairly streamlined except for generation of the witness transcriptions.