1   /*
2    *  FeatureMap.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, Jan/19/2000
12   *
13   *  $Id: FeatureMap.java,v 1.7 2001/11/12 17:14:11 kalina Exp $
14   */
15  
16  package gate;
17  import java.util.*;
18  import gate.util.*;
19  import gate.event.*;
20  
21  /** An attribute-value matrix. Represents the content of an annotation, the
22    * meta-data on a resource, and anything else we feel like.
23    *
24    * The event code is needed so a persistent annotation can fire updated events
25    * when its features are updated
26    */
27  public interface FeatureMap extends Map
28  {
29    /** Tests if <b>this</b> featureMap object includes  aFeatureMap features.
30      * @param aFeatureMap object which will be included  or not in  <b>this</b>
31      * FeatureMap obj.
32      * @return <code>true</code> if <b>this</b> includes aFeatureMap
33      * and <code>false</code> if not.
34      */
35    public boolean subsumes(FeatureMap aFeatureMap);
36  
37    /** Tests if <b>this</b> featureMap object includes aFeatureMap but only
38      * for the features present in the aFeatureNamesSet.
39      * @param aFeatureMap which will be included or not in <b>this</b>
40      * FeatureMap obj.
41      * @param aFeatureNamesSet is a set of strings representing the names of the
42      * features that would be considered for subsumes.
43      * @return <code>true</code> if all features present in the aFeaturesNameSet
44      * from aFeatureMap are included in <b>this</b> obj, or <code>false</code>
45      * otherwise.
46      */
47    public boolean subsumes(FeatureMap aFeatureMap, Set aFeatureNamesSet);
48  
49    /**
50     *
51     * Removes a gate listener
52     */
53    public void removeFeatureMapListener(FeatureMapListener l);
54    /**
55     *
56     * Adds a gate listener
57     */
58    public void addFeatureMapListener(FeatureMapListener l);
59  
60  } // interface FeatureMap
61