| ConditionalController.java |
1 /*
2 * Copyright (c) 1998-2004, The University of Sheffield.
3 *
4 * This file is part of GATE (see http://gate.ac.uk/), and is free
5 * software, licenced under the GNU Library General Public License,
6 * Version 2, June 1991 (in the distribution as file licence.html,
7 * and also available at http://gate.ac.uk/gate/licence.html).
8 *
9 * Valentin Tablan 11 Apr 2002
10 *
11 * $Id: ConditionalController.java,v 1.4 2004/07/21 17:10:03 akshay Exp $
12 */
13
14 package gate.creole;
15
16 import java.util.Collection;
17
18 import gate.Controller;
19
20 /**
21 * A Conditional controller is a controller that keeps a running strategy for
22 * each PR contained. The running strategy decides whether a particular PR will
23 * be run or not.
24 */
25
26 public interface ConditionalController extends Controller{
27
28 /**
29 * Gets the collection of running strategies for the contained PRs.
30 * The iterator of this collection should return the running strategies in
31 * sync with the iterator for the getPRs() method of {@link Controller}.
32 * @return a Collection object.
33 */
34 public Collection getRunningStrategies();
35
36 /**
37 * Populates this controller with the appropiate running strategies from a
38 * collection of running strategies
39 * (optional operation).
40 *
41 * Controllers that are serializable must implement this method needed by GATE
42 * to restore their contents.
43 * @throws UnsupportedOperationException if the <tt>setPRs</tt> method
44 * is not supported by this controller.
45 */
46 public void setRunningStrategies(Collection strategies);
47 }