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