Commit ebfa0a60 authored by Jaime Arias's avatar Jaime Arias
Browse files

wip: read output from minimal

parent 39d2d967
package org.cosyverif.service.adt2amas;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.nio.file.Paths;
import org.apache.commons.exec.CommandLine;
import org.cosyverif.alligator.service.AnnotatedService.Task;
import org.cosyverif.Configuration;
import org.cosyverif.alligator.service.BinaryService;
import org.cosyverif.alligator.service.Parameter.Direction;
import org.cosyverif.alligator.service.annotation.Example;
......@@ -60,16 +63,37 @@ public class MinimalScheduling extends BinaryService {
@Override
public void fallback(String line){
try{
outputParameter = formatResult(line);
outputParameter = formatResult();
} catch (IOException e) {
e.printStackTrace();
}
}
@Override
public void fallback(String key, String value) {
}
});
}
private String formatResult(String output) throws IOException {
return output;
private String formatResult() throws IOException {
BufferedWriter bw = null;
FileWriter fw = null;
String result = "";
try {
File fileOutput = new File(baseDirectory().getAbsolutePath() + "/minimal_scheduling.log");
fw = new FileWriter(fileOutput);
bw = new BufferedWriter(fw);
} catch (Exception e) {
e.printStackTrace();
} finally {
if (bw != null)
bw.close();
if (fw != null)
fw.close();
}
return result;
}
@Example(name = "Example of the minimal scheduling algorithm",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment