if (forPrep != null) { NewTask nt = (NewTask) task; NewPrepositionalPhrase npp = support.getLDMF().newPrepositionalPhrase(); npp.setPreposition(Constants.Preposition.FOR); npp.setIndirectObject(forPrep); nt.addPrepositionalPhrase(npp); }
  protected void sendNextBatch(boolean withinTransaction) {    Date batchStart = new Date();    if (support.getLog().isDebugEnabled ())      support.getLog().debug ("GLMStimulatorWorker.sendTasks - batch start " + batchStart);    batchesSent++;    try {      if (withinTransaction)        support.getBlackboardService().openTransaction();      for (int i = 0; i < tasksPerBatch; i++) {        // Get the tasks out of the XML file        Collection theseTasks = readXmlTasks(inputFile);        for (Iterator it = theseTasks.iterator(); it.hasNext(); ) {          Task task = (Task) it.next();          sentTasks.put(task, batchStart);          support.getBlackboardService().publishAdd(task);        }      }    } catch (Exception exc) {      support.getLog().error ("Could not next batch", exc);    }    finally{      if (withinTransaction)        support.getBlackboardService().closeTransactionDontReset();    }  }