diff --git a/src/main/java/kieker/analysis/softwaresystem/SoftwareSystemCreatorVisitor.java b/src/main/java/kieker/analysis/softwaresystem/SoftwareSystemCreatorVisitor.java new file mode 100644 index 0000000000000000000000000000000000000000..4eee61165d84ee9446937a4256407f397081dcf9 --- /dev/null +++ b/src/main/java/kieker/analysis/softwaresystem/SoftwareSystemCreatorVisitor.java @@ -0,0 +1,44 @@ +package kieker.analysis.softwaresystem; + +import java.util.List; + +import kieker.analysis.domain.AggregatedOperationCall; +import kieker.analysis.model.analysismodel.softwaresystem.execution.AggregatedInvocation; +import kieker.analysis.model.analysismodel.softwaresystem.execution.ExecutionFactory; +import kieker.analysis.model.analysismodel.softwaresystem.execution.ExecutionRoot; +import kieker.analysis.trace.traversal.OperationCallVisitor; + +/** + * + * @author Sören Henning + * + */ +public class SoftwareSystemCreatorVisitor extends OperationCallVisitor<AggregatedOperationCall> { + + private final ExecutionRoot executionRoot; + private final ExecutionFactory executionFactory = ExecutionFactory.eINSTANCE; + + public SoftwareSystemCreatorVisitor(final ExecutionRoot executionRoot) { + this.executionRoot = executionRoot; + } + + @Override + public void visit(final AggregatedOperationCall call) { + + // We need: + // - ExecutionRoot: To check if AggregatedInvocation exists + // - DeploymentRoot: To check if DeplContext, DeplComp and DeplOp exists + // - ArchitectureRoot: To check if CompType and OpType exists + // Everything that does exists should be used + // Everything that does not exists should be created and than used + // Moreover we need a reference to the statistics + + List<AggregatedInvocation> invocations = executionRoot.getAggregatedInvocations(); + + AggregatedInvocation invocation = executionFactory.createAggregatedInvocation(); + invocation.setSource(null); + invocation.setTarget(null); + + } + +}