public static void main ( final String [ ] args ) { LookAndFeelManager . get ( ) . init ( ) ; final Injector injector = Guice . createInjector ( new DCModuleImpl ( ) ) ; // run a small job final AnalysisJobBuilder ajb = injector . getInstance ( AnalysisJobBuilder . class ) ; final Datastore ds = injector . getInstance ( DatastoreCatalog . class ) . getDatastore ( "orderdb" ) ; final DatastoreConnection con = ds . openConnection ( ) ; final Table table = con . getSchemaNavigator ( ) . convertToTable ( "PUBLIC.CUSTOMERS" ) ; ajb . setDatastore ( ds ) ; ajb . addSourceColumns ( table . getLiteralColumns ( ) ) ; ajb . addAnalyzer ( PatternFinderAnalyzer . class ) . addInputColumns ( ajb . getSourceColumns ( ) ) . setName ( "Ungrouped pattern finders" ) ; final AnalyzerComponentBuilder < PatternFinderAnalyzer > groupedPatternFinder = ajb . addAnalyzer ( PatternFinderAnalyzer . class ) ; ajb . addSourceColumns ( "PUBLIC.OFFICES.CITY" , "PUBLIC.OFFICES.TERRITORY" ) ; groupedPatternFinder . setName ( "Grouped PF" ) ; groupedPatternFinder . addInputColumn ( ajb . getSourceColumnByName ( "PUBLIC.OFFICES.CITY" ) ) ; groupedPatternFinder . addInputColumn ( ajb . getSourceColumnByName ( "PUBLIC.OFFICES.TERRITORY" ) , groupedPatternFinder . getDescriptor ( ) . getConfiguredProperty ( "Group column" ) ) ; final ResultWindow resultWindow = injector . getInstance ( ResultWindow . class ) ; resultWindow . setVisible ( true ) ; resultWindow . startAnalysis ( ) ; }
A main method that will display the results of a few example pattern finder analyzers . Useful for tweaking the charts and UI .