package ever.pipeline; import java.util.ArrayList; import java.util.concurrent.Callable; /** * Iterates over analyzer and channels the cases through the pipeline. A local group is the longest subpipeline of local * analyzers. This subpipeline can be executed for a case in one thread. Therefore a thread can work longer without interuption * @author Pol Schumacher, Wirtschaftsinformatik, Institut fuer Informatik, Goethe Universitaet Frankfurt * */ public class LocalGroupHandler implements Callable { private ArrayList aList; Case c; @Override public Case call() throws Exception { try { c.getWf().moveToThreadLocalAllProducts(); c.getWf().moveToThreadLocalLastId(); // c.getWf().moveToThreadLocalUsedNames(); } catch (NullPointerException e) { // TODO Auto-generated catch block } for(Analyzer a : aList) { if(a.getClass()!=null) c=a.analyze(c); } try{ c.getWf().moveFromThreadLocalAllProducts(); c.getWf().moveFromThreadLocalLastId(); // c.getWf().moveFromThreadLocalUsedNames(); } catch (NullPointerException ex) { //do nothing } return c; } public LocalGroupHandler(ArrayList al, Case c) { aList=al; this.c=c; } }