01 /*
02 * RhsAction.java
03 *
04 * Copyright (c) 1995-2010, The University of Sheffield. See the file
05 * COPYRIGHT.txt in the software or at http://gate.ac.uk/gate/COPYRIGHT.txt
06 *
07 * This file is part of GATE (see http://gate.ac.uk/), and is free
08 * software, licenced under the GNU Library General Public License,
09 * Version 2, June 1991 (in the distribution as file licence.html,
10 * and also available at http://gate.ac.uk/gate/licence.html).
11 *
12 * Hamish, 30/7/98
13 *
14 * $Id: RhsAction.java 13253 2010-12-03 18:16:05Z johann_p $
15 */
16
17 package gate.jape;
18 import java.io.Serializable;
19 import java.util.Map;
20
21 import gate.AnnotationSet;
22 import gate.Document;
23 import gate.creole.ontology.Ontology;
24
25 /** An interface that defines what the action classes created
26 * for RightHandSides look like.
27 */
28 public interface RhsAction extends Serializable {
29
30 /**
31 * Fires the RHS action for a particular LHS match.
32 * @param doc the document the RHS action will be run on
33 * @param bindings A map containing the matching results from the LHS in
34 * the form label(String) -> matched annotations (AnnotationSet)
35 * @param annotations copy of the outputAS value provided for backward
36 * compatibility
37 * @param inputAS the input annotation set
38 * @param outputAS the output annotation set
39 * @param ontology
40 * @throws JapeException
41 */
42 public void doit(Document doc, Map<String, AnnotationSet> bindings,
43 AnnotationSet annotations,
44 AnnotationSet inputAS, AnnotationSet outputAS,
45 Ontology ontology)
46 throws JapeException;
47
48 public void setActionContext(ActionContext actionContext);
49 public ActionContext getActionContext();
50
51 } // RhsAction
|