EMMA Coverage Report (generated Sun Feb 05 10:43:15 CET 2012)
[all classes][de.uka.ipd.sdq.cip.workflow.jobs.builder]

COVERAGE SUMMARY FOR SOURCE FILE [QVTRCompletionBuilder.java]

nameclass, %method, %block, %line, %
QVTRCompletionBuilder.java0%   (0/1)0%   (0/2)0%   (0/95)0%   (0/16)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class QVTRCompletionBuilder0%   (0/1)0%   (0/2)0%   (0/95)0%   (0/16)
QVTRCompletionBuilder (CompletionConfiguration, Transformation): void 0%   (0/1)0%   (0/9)0%   (0/4)
buildJobs (): Collection 0%   (0/1)0%   (0/86)0%   (0/12)

1package de.uka.ipd.sdq.cip.workflow.jobs.builder;
2 
3import java.util.ArrayList;
4import java.util.Collection;
5 
6import de.uka.ipd.sdq.cip.configuration.CompletionConfiguration;
7import de.uka.ipd.sdq.cip.configuration.Transformation;
8import de.uka.ipd.sdq.cip.configuration.TransformationType;
9import de.uka.ipd.sdq.cip.workflow.jobs.PrettyPrintQvtJob;
10import de.uka.ipd.sdq.cip.workflow.jobs.QVTRConfigurationJob;
11import de.uka.ipd.sdq.cip.workflow.jobs.QVTRHotConfigurationJob;
12import de.uka.ipd.sdq.cip.workflow.jobs.SplitTransformationResultJob;
13import de.uka.ipd.sdq.workflow.IJob;
14import de.uka.ipd.sdq.workflow.mdsd.blackboard.SavePartitionToDiskJob;
15import de.uka.ipd.sdq.workflow.mdsd.emf.qvtr.jobs.QVTRTransformationJob;
16import de.uka.ipd.sdq.workflow.mdsd.emf.qvtr.jobs.QVTRTransformationJobConfiguration;
17 
18/**
19 * Job Builder for a QVTR transformation completion.
20 * This builder can create plain, mark, and feature completions. 
21 * 
22 * It creates the jobs for a given {@link Transformation} and {@link CompletionConfiguration}.
23 *  
24 * @author Thomas Schuischel
25 *
26 */
27public class QVTRCompletionBuilder implements CompletionBuilder {
28 
29        private CompletionConfiguration completionConfiguration;
30        private Transformation transformation;
31 
32        /**
33         * Creates a new QVTRCompletionBuilder and stores the configuration parameters.
34         * 
35         * @param completionConfiguration a {@link CompletionConfiguration}
36         * @param transformation                   a {@link Transformation}
37         */
38        public QVTRCompletionBuilder(CompletionConfiguration completionConfiguration, 
39                        Transformation transformation) {
40                this.completionConfiguration = completionConfiguration;
41                this.transformation = transformation;
42        }
43 
44        /* (non-Javadoc)
45         * @see de.uka.ipd.sdq.cip.workflow.jobs.builder.CompletionBuilder#buildJobs()
46         */
47        public
48        Collection<IJob> buildJobs() {
49                
50                Collection<IJob> jobs = new ArrayList<IJob>();
51                
52                // HOT Completion: FeatureConfig -> HOT ->  Generated QVT Completion Script
53                if(transformation.getType() == TransformationType.FEATURE)
54                {
55                        // The configuration for a QVTR hot completion
56                        QVTRTransformationJobConfiguration qvtrHotConfig = new QVTRTransformationJobConfiguration();
57                
58                        // configure the QVTR Job for hot completion
59                        jobs.add(new QVTRHotConfigurationJob(qvtrHotConfig, completionConfiguration, transformation));
60                
61                        // create the QVT-R model from a feature configuration
62                        jobs.add(new QVTRTransformationJob(qvtrHotConfig));
63                
64                        // create a QVT-R script file from a QVT-R model
65                        jobs.add(new PrettyPrintQvtJob(qvtrHotConfig, completionConfiguration, transformation));
66                }
67                
68                // Completion: Input Model -> Generated QVT Completion Script -> Output Model  
69                {
70                        // configure the QVTR Job
71                        // The configuration for a QVTR completion
72                        QVTRTransformationJobConfiguration qvtrConfig = new QVTRTransformationJobConfiguration();
73                        
74                        // configure the QVTR Job for completion
75                        jobs.add(new QVTRConfigurationJob(qvtrConfig, completionConfiguration, transformation));
76                        
77                        // execute the completion
78                        jobs.add(new QVTRTransformationJob(qvtrConfig));
79                        
80                        // split the created output Resources for each top level element
81                        jobs.add(new SplitTransformationResultJob(qvtrConfig, completionConfiguration, transformation));
82                        
83                        // dump the partition to disk
84                        jobs.add(new SavePartitionToDiskJob(completionConfiguration.getInputPartitionName()));
85                }
86                
87                return jobs;
88                
89        }
90 
91}

[all classes][de.uka.ipd.sdq.cip.workflow.jobs.builder]
EMMA 2.0.9414 (unsupported private build) (C) Vladimir Roubtsov