package innovimax.mixthem.operation;

import innovimax.mixthem.MixException;
import innovimax.mixthem.arguments.Rule;
import innovimax.mixthem.arguments.RuleParam;
import innovimax.mixthem.arguments.ParamValue;
import innovimax.mixthem.io.InputResource;

import java.io.IOException;
import java.io.OutputStream;
import java.util.Map;
import java.util.List;

/**
* <p>Abstract class for all character operation.</p>
* @see ICopyOperation
* @author Innovimax
* @version 1.0
*/
public abstract class AbstractCopyOperation extends AbstractOperation implements ICopyOperation {
	
	protected final static int BUFFER_SIZE = 1024;	
	private final Rule rule;

	/**
	* Constructor
 	* @param params The list of parameters (maybe empty)
	* @see innovimax.mixthem.arguments.RuleParam
	* @see innovimax.mixthem.arguments.ParamValue
	*/
	public AbstractCopyOperation(final Rule rule, final Map<RuleParam, ParamValue> params) {
		super(params);
		this.rule = rule;
	}

	@Override
	public void processFiles(final List<InputResource> inputs, final OutputStream output) throws MixException, IOException {		
		//TODO
		System.out.println("RULE="+rule);
		inputs.stream().forEach(input -> {
			try {
		 		process(input, output);
			} catch (IOException e) {
				throw new RuntimeException(e);
			}
		});
	}

}

@@ -1088,51 +1088,182 @@
 %09%0A%09%09
-//TODO%0A%09%09System.out.println(%22RULE=%22+rule);%0A
+switch(rule) %7B%0A%09%09%09case FILE_1:%0A%09%09%09%09process(inputs.get(0), output);%0A%09%09%09%09break;%0A%09%09%09case FILE_2:%0A%09%09%09%09process(inputs.get(1), output);%0A%09%09%09%09break;%0A%09%09%09case ADD:%0A%09%09%09default:  %09%09%09%09%0A%09%09
 %09%09in
@@ -1302,16 +1302,18 @@
 %0A%09%09%09
+%09%09
 try %7B%0A%09%09
  %09%09p
@@ -1308,17 +1308,19 @@
 try %7B%0A%09%09
- 
+%09 %09
 %09%09proces
@@ -1340,16 +1340,18 @@
 ut);%0A%09%09%09
+%09%09
 %7D catch 
@@ -1368,16 +1368,18 @@
 on e) %7B%0A
+%09%09
 %09%09%09%09thro
@@ -1409,19 +1409,27 @@
 e);%0A
+%09%09
 %09%09%09%7D%0A
+%09%09
 %09%09%7D);%0A
+%09%09%7D%0A
 %09%7D%0A%0A

Update AbstractCopyOperation.java