Skip to content
Snippets Groups Projects
Commit 0fad3438 authored by Sören Henning's avatar Sören Henning
Browse files

seperate addding operations and relations

parent be12501c
No related branches found
No related tags found
1 merge request!17Get impletemented stages and Java 8
......@@ -24,23 +24,23 @@ public class OperationsDependency {
public void addCall(final AggregatedOperationCall call) {
// Add call (node)
addOperation(call);
// Add relation (edge)
addRelation(call);
}
private void addOperation(final AggregatedOperationCall call) {
String key = call.getIdentifier();
if (!operations.containsKey(key)) {
operations.put(key, new AggregatedOperationCall(call.getContainer(), call.getComponent(), call.getOperation(), 0));
}
operations.get(key).addChild(call);
}
//
//
// TODO Some space during development
//
//
// Add relation (edge)
// TODO rename
private void addRelation(final AggregatedOperationCall call) {
// TODO Rename
String key2 = call.getIdentifier() + ',' + call.getIdentifier();
if (!relations.containsKey(key2)) {
......@@ -62,36 +62,36 @@ public class OperationsDependency {
// TODO Just for debugging
/*
* public void printOperations() {
*
*
* System.out.println("Operations:");
* System.out.println();
*
*
* for (Entry<OperationCallWrapper, List<AggregatedOperationCall>> call : operations.entrySet()) {
*
*
* System.out.println("Key:" + call.getKey().getOperationCall().getOperation() + " / " + call.getKey().getOperationCall().getFailedCause());
* System.out.println("Calls:");
*
*
* for (AggregatedOperationCall call2 : call.getValue()) {
*
*
* System.out.println(call2.getOperation());
* // System.out.println(call2.getFailedCause());
*
*
* }
* System.out.println();
* }
* }
*
*
* // TODO Just for debugging
*
*
* public void printDependcies() {
*
*
* System.out.println("Dependcies");
* System.out.println("Size" + relations.size());
*
*
* for (Entry<OperationsDependencyRelation, Integer> call : relations.entrySet()) {
*
*
* System.out.println("Set begin");
*
*
* System.out.println(call.getKey().getCaller().getOperationCall().getOperation());
* System.out.println(call.getKey().getCallee().getOperationCall().getOperation());
* System.out.println(call.getValue());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment