Changeset 3040 for DataCleaner


Ignore:
Timestamp:
01/16/12 14:54:39 (4 months ago)
Author:
kasper
Message:

Ticket #747: Added solution, large refactoring AnalysisListener?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • DataCleaner/trunk/core/src/main/java/org/eobjects/datacleaner/util/AnalysisRunnerSwingWorker.java

    r3034 r3040  
    3434import org.eobjects.analyzer.job.FilterJob; 
    3535import org.eobjects.analyzer.job.TransformerJob; 
     36import org.eobjects.analyzer.job.runner.AnalysisJobMetrics; 
    3637import org.eobjects.analyzer.job.runner.AnalysisListener; 
    3738import org.eobjects.analyzer.job.runner.AnalysisResultFuture; 
    3839import org.eobjects.analyzer.job.runner.AnalysisRunner; 
    3940import org.eobjects.analyzer.job.runner.AnalysisRunnerImpl; 
     41import org.eobjects.analyzer.job.runner.AnalyzerMetrics; 
     42import org.eobjects.analyzer.job.runner.ExplorerMetrics; 
     43import org.eobjects.analyzer.job.runner.RowProcessingMetrics; 
    4044import org.eobjects.analyzer.result.AnalyzerResult; 
    4145import org.eobjects.analyzer.util.SourceColumnFinder; 
     
    7882 
    7983        @Override 
    80         public void jobBegin(AnalysisJob job) { 
     84        public void jobBegin(AnalysisJob job, AnalysisJobMetrics metrics) { 
    8185                String now = new DateTime().toString(DateTimeFormat.fullTime()); 
    8286                _progressInformationPanel.addUserLog("Job begin (" + now + ")"); 
     
    8488 
    8589        @Override 
    86         public void jobSuccess(AnalysisJob job) { 
     90        public void jobSuccess(AnalysisJob job, AnalysisJobMetrics metrics) { 
    8791                String now = new DateTime().toString(DateTimeFormat.fullTime()); 
    8892                _progressInformationPanel.addUserLog("Job success (" + now + ")"); 
     
    9195 
    9296        @Override 
    93         public void rowProcessingBegin(final AnalysisJob job, final Table table, final int expectedRows) { 
     97        public void rowProcessingBegin(final AnalysisJob job, final RowProcessingMetrics metrics) { 
     98                final int expectedRows = metrics.getExpectedRows(); 
     99                final Table table = metrics.getTable(); 
    94100                if (expectedRows == -1) { 
    95101                        _progressInformationPanel.addUserLog("Starting row processing for " + table.getQualifiedLabel()); 
     
    102108 
    103109        @Override 
    104         public void rowProcessingProgress(AnalysisJob job, final Table table, final int currentRow) { 
    105                 _progressInformationPanel.updateProgress(table, currentRow); 
     110        public void rowProcessingProgress(AnalysisJob job, final RowProcessingMetrics metrics, final int currentRow) { 
     111                _progressInformationPanel.updateProgress(metrics.getTable(), currentRow); 
    106112        } 
    107113 
    108114        @Override 
    109         public void rowProcessingSuccess(AnalysisJob job, final Table table) { 
     115        public void rowProcessingSuccess(AnalysisJob job, final RowProcessingMetrics metrics) { 
    110116                String now = new DateTime().toString(DateTimeFormat.fullTime()); 
    111                 _progressInformationPanel.addUserLog("Row processing for " + table.getQualifiedLabel() + " finished (" + now 
    112                                 + "). Generating results ..."); 
     117                _progressInformationPanel.addUserLog("Row processing for " + metrics.getTable().getQualifiedLabel() + " finished (" 
     118                                + now + "). Generating results ..."); 
    113119        } 
    114120 
    115121        @Override 
    116         public void analyzerBegin(AnalysisJob job, final AnalyzerJob analyzerJob) { 
     122        public void analyzerBegin(AnalysisJob job, final AnalyzerJob analyzerJob, AnalyzerMetrics metrics) { 
    117123                _progressInformationPanel.addUserLog("Starting analyzer '" + LabelUtils.getLabel(analyzerJob) + "'"); 
    118124        } 
     
    174180 
    175181        @Override 
    176         public void explorerBegin(AnalysisJob job, ExplorerJob explorerJob) { 
     182        public void explorerBegin(AnalysisJob job, ExplorerJob explorerJob, ExplorerMetrics metrics) { 
    177183                _progressInformationPanel.addUserLog("Starting explorer '" + LabelUtils.getLabel(explorerJob) + "'"); 
    178184        } 
Note: See TracChangeset for help on using the changeset viewer.