1   /*
2    *  Controller.java
3    *
4    *  Copyright (c) 1998-2005, The University of Sheffield.
5    *
6    *  This file is part of GATE (see http://gate.ac.uk/), and is free
7    *  software, licenced under the GNU Library General Public License,
8    *  Version 2, June 1991 (in the distribution as file licence.html,
9    *  and also available at http://gate.ac.uk/gate/licence.html).
10   *
11   *  Hamish Cunningham, 9/Nov/2000
12   *
13   *  $Id: Controller.java,v 1.11 2005/01/11 13:51:30 ian Exp $
14   */
15  
16  package gate;
17  
18  import java.util.Collection;
19  
20  import gate.util.FeatureBearer;
21  import gate.util.NameBearer;
22  
23  /** Models the execution of groups of ProcessingResources.
24    */
25  public interface Controller extends Resource, Executable,
26                                      NameBearer, FeatureBearer
27  {
28    /**
29     * Returns all the {@link gate.ProcessingResource}s contained by this
30     * controller.
31     * The actual type of collection returned depends on the controller type.
32     */
33    public Collection getPRs();
34  
35  
36    /**
37     * Populates this controller from a collection of {@link ProcessingResource}s
38     * (optional operation).
39     *
40     * Controllers that are serializable must implement this method needed by GATE
41     * to restore their contents.
42     * @throws UnsupportedOperationException if the <tt>setPRs</tt> method
43     *         is not supported by this controller.
44     */
45    public void setPRs(Collection PRs);
46  
47  
48  } // interface Controller
49