From 5330dd1709163f7970f7e7f564d9b77d6d8c06ac Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=B6ren=20Henning?= <stu114708@informatik.uni-kiel.de>
Date: Fri, 29 Jul 2016 14:37:56 +0200
Subject: [PATCH] some attempts to use the model

---
 .../SoftwareSystemCreatorVisitor.java         | 44 +++++++++++++++++++
 1 file changed, 44 insertions(+)
 create mode 100644 src/main/java/kieker/analysis/softwaresystem/SoftwareSystemCreatorVisitor.java

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 00000000..4eee6116
--- /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);
+
+	}
+
+}
-- 
GitLab