1   /*
2    *  RhsAction.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, 30/7/98
12   *
13   *  $Id: RhsAction.java,v 1.7 2002/02/27 15:11:16 valyt Exp $
14   */
15  
16  package gate.jape;
17  import gate.*;
18  import java.util.Map;
19  import java.io.*;
20  
21  /** An interface that defines what the action classes created
22    * for RightHandSides look like.
23    */
24  public interface RhsAction extends Serializable {
25  
26    /**
27     * Fires the RHS action for a particular LHS match.
28     * @param doc the document the RHS action will be run on
29     * @param bindings A map containing the matc results from the LHS in the form
30     * label(String) -> matched annotations (AnnotationSet)
31     * @param annotations copy of the outputAS value provided for backward
32     * compatibility
33     * @param inputAS the input annotation set
34     * @param outputAS the output annotation set
35     * @throws JapeException
36     */
37    public void doit(Document doc, Map bindings, AnnotationSet annotations,
38                     AnnotationSet inputAS, AnnotationSet outputAS)
39                throws JapeException;
40  
41  } // RhsAction
42