01 /*
02 * FeatureMap.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 Cunningham, Jan/19/2000
13 *
14 * $Id: FeatureMap.java 12006 2009-12-01 17:24:28Z thomas_heitz $
15 */
16
17 package gate;
18 import java.util.Set;
19
20 import gate.creole.ontology.Ontology;
21 import gate.event.FeatureMapListener;
22
23 /** An attribute-value matrix. Represents the content of an annotation, the
24 * meta-data on a resource, and anything else we feel like.
25 *
26 * The event code is needed so a persistent annotation can fire updated events
27 * when its features are updated
28 */
29 public interface FeatureMap extends SimpleFeatureMap
30 {
31 /** Tests if <b>this</b> featureMap object includes aFeatureMap features.
32 * @param aFeatureMap object which will be included or not in <b>this</b>
33 * FeatureMap obj.
34 * @return <code>true</code> if <b>this</b> includes aFeatureMap
35 * and <code>false</code> if not.
36 */
37 public boolean subsumes(FeatureMap aFeatureMap);
38
39 /** Tests if <b>this</b> featureMap object includes aFeatureMap features. <br>
40 * If the feature map contains <code>class</code> and (optionally) <code>ontology</code> features:<br>
41 * then the ontologyLR is used to provide ontology based subsume with respect to the subClassOf relations.
42 * @param ontologyLR an ontology to be used for the subsume
43 * @param aFeatureMap object which will be included or not in <b>this</b>
44 * FeatureMap obj.
45 * @return <code>true</code> if <b>this</b> includes aFeatureMap
46 * and <code>false</code> if not.
47 */
48 public boolean subsumes(Ontology ontologyLR, FeatureMap aFeatureMap);
49
50 /** Tests if <b>this</b> featureMap object includes aFeatureMap but only
51 * for the features present in the aFeatureNamesSet.
52 * @param aFeatureMap which will be included or not in <b>this</b>
53 * FeatureMap obj.
54 * @param aFeatureNamesSet is a set of strings representing the names of the
55 * features that would be considered for subsumes.
56 * @return <code>true</code> if all features present in the aFeaturesNameSet
57 * from aFeatureMap are included in <b>this</b> obj, or <code>false</code>
58 * otherwise.
59 */
60 public boolean subsumes(FeatureMap aFeatureMap, Set aFeatureNamesSet);
61
62 /**
63 *
64 * Removes a gate listener
65 */
66 public void removeFeatureMapListener(FeatureMapListener l);
67 /**
68 *
69 * Adds a gate listener
70 */
71 public void addFeatureMapListener(FeatureMapListener l);
72
73 } // interface FeatureMap
|