Enumeration wftasks = wf.getTasks(); while (wftasks.hasMoreElements()) { Task t = (Task) wftasks.nextElement(); if (t.getVerb().equals(verbGLS)) { Enumeration pp = t.getPrepositionalPhrases(); while (pp.hasMoreElements()) { PrepositionalPhrase app = (PrepositionalPhrase) pp.nextElement(); if ((app.getPreposition().equals(Constants.Preposition.FOR)) && (app.getIndirectObject() instanceof Organization) ) { return true;
synchronized (wf) { Enumeration wftasks = wf.getTasks(); while (wftasks.hasMoreElements()) { Task t = (Task) wftasks.nextElement(); if (t.getVerb().equals(verbGLS)) { Enumeration pp = t.getPrepositionalPhrases(); while (pp.hasMoreElements()) { PrepositionalPhrase app = (PrepositionalPhrase) pp.nextElement(); if ((app.getPreposition().equals(Constants.Preposition.FOR)) && (app.getIndirectObject() instanceof Organization) ) { return true; }
      public boolean execute(Object o) {	if (o instanceof Expansion) {	  Workflow wf = ((Expansion)o).getWorkflow();	  Enumeration wftasks = wf.getTasks();	  while (wftasks.hasMoreElements()) {	    Task t = (Task) wftasks.nextElement();	    if (t.getVerb().equals(verbGLS)) {	      Enumeration pp = t.getPrepositionalPhrases();	      while (pp.hasMoreElements()) {		PrepositionalPhrase app = (PrepositionalPhrase) pp.nextElement();		if ((app.getPreposition().equals(Constants.Preposition.FOR)) && (app.getIndirectObject() instanceof Organization) ) {		  return true;		}	      }	    }	  }	}	return false;      }