private static void section2 ( List < ConnectionNotation > connections , Map < String , String > mapIds ) throws NotationException { for ( ConnectionNotation connection : connections ) { HELMEntity first = connection . getSourceId ( ) ; String idFirst = first . getId ( ) ; HELMEntity second = connection . getTargetId ( ) ; String idSecond = second . getId ( ) ; if ( mapIds . containsKey ( idFirst ) ) { first = new ConnectionNotation ( mapIds . get ( idFirst ) ) . getSourceId ( ) ; } if ( mapIds . containsKey ( idSecond ) ) { second = new ConnectionNotation ( mapIds . get ( idSecond ) ) . getSourceId ( ) ; } ConnectionNotation newConnection = new ConnectionNotation ( first , second , connection . getSourceUnit ( ) , connection . getrGroupSource ( ) , connection . getTargetUnit ( ) , connection . getrGroupTarget ( ) , connection . getAnnotation ( ) ) ; helm2notation . addConnection ( newConnection ) ; } }
method to add ConnectionNotation to the existent