1   /*
2    *  Controller.java
3    *
4    *  Copyright (c) 1998-2001, 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.8 2001/10/29 13:37:29 valyt Exp $
14   */
15  
16  package gate;
17  
18  import java.util.*;
19  import java.io.*;
20  
21  import gate.util.*;
22  import gate.creole.*;
23  
24  /** Models the execution of groups of ProcessingResources.
25    */
26  public interface Controller extends Resource, Executable,
27                                      NameBearer, FeatureBearer
28  {
29    /**
30     * Returns all the {@link gate.ProcessingResource}s contained by this
31     * controller.
32     * The actual type of collection returned depends on the controller type.
33     */
34    public Collection getPRs();
35  
36  
37    /**
38     * Populates this controller from a collection of {@link ProcessingResource}s
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 setPRs(Collection PRs);
47  
48  
49  } // interface Controller
50