/* ----------------------------------------------------------------------------------- */ /* */ /* D A T A W A R E H O U S E G E N E R A T O R A P P L I C A T I O N */ /* */ /* Frans Coenen */ /* */ /* 21 January 2000 */ /* */ /* ----------------------------------------------------------------------------------- */ /* Application program to generate a binary database from which association rules may be generated. */ class GeneratorApp { /*--------------------------------------------------------------------------*/ /* */ /* METHODSS */ /* */ /*--------------------------------------------------------------------------*/ /* MAIN: Top level applications method */ public static void main(String[] args) throws java.io.IOException { Generator newGenerator; // Proceed according to number of arguments switch (args.length) { case 0: newGenerator = new Generator(); break; case 1: newGenerator = new Generator(Integer.parseInt(args[0])); break; case 2: newGenerator = new Generator(Integer.parseInt(args[0]),Integer.parseInt(args[1])); break; case 3: newGenerator = new Generator(Integer.parseInt(args[0]),Integer.parseInt(args[1]), Integer.parseInt(args[2])); break; case 4: newGenerator = new Generator(Integer.parseInt(args[0]),Integer.parseInt(args[1]), Integer.parseInt(args[2]),args[3]); break; default: System.out.println("ERROR: Unidentified number of arguments using only first three"); newGenerator = new Generator(Integer.parseInt(args[0]),Integer.parseInt(args[1]), Integer.parseInt(args[2]),args[3]); } // Produce the table generateTable(newGenerator); } /* GENERATE TABLE: Method to outout the required table. */ private static void generateTable(Generator newGenerator) throws java.io.IOException { // Generate table // newGenerator.outputTable(); newGenerator.outputFile(); } }