1   /*
2    *  OntoLexLR.java
3    *
4    *  Copyright (c) 1998-2003, 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   *  Kalina Bontcheva, 23/February/2003
12   *
13   *  $Id: OntoLexLR.java,v 1.2 2003/03/03 19:06:52 kalina Exp $
14   */
15  
16  package gate.lexicon;
17  
18  import gate.LanguageResource;
19  import java.util.List;
20  import java.util.Set;
21  
22  /**
23   *
24   * <p>Title: OntoLexLR interface, GATE2 </p>
25   * <p>Description: This interface describes the mapping between ontological
26   * concepts/instances and lexical entries. Such mapping is needed to
27   * support language generation and also understanding that uses both lexicons
28   * of synonyms and other lexical info and an ontology of the domain.
29   * </p>
30   * <P> Developed for the purpose of the
31   * <a href="http://www.aktors.org/miakt/">MIAKT project</a>, February 2003.</P>
32   * <p>Copyright: Copyright (c) 2000</p>
33   * <p>Company: University Of Sheffield</p>
34   * @author Kalina Bontcheva
35   * @version 1.0
36   */
37  
38  public interface OntoLexLR extends LanguageResource {
39  
40    /** Returns a list of objects which are the concept IDs corresponding to
41     * the given lexical Id. A list is returned because there might be more than
42     * one such concept IDs. Null is returned if there is no corresponding
43     * concept ID.
44     */
45    public List getConceptIds(Object lexId);
46  
47    /** Returns a list of objects which are the lexical IDs corresponding to
48     * the given concept Id. A list is returned because there might be more than
49     * one such lexical IDs. Null is returned if there is no corresponding
50     * lexical ID.
51     */
52    public List getLexIds(Object conceptId);
53  
54    /** Returns a list of objects which are all lexical IDs in this mapping.
55     */
56    public Set getAllLexIds();
57  
58    /** Returns a list of objects which are all concept IDs in this mapping.
59     */
60    public Set getAllConceptIds();
61  
62    /** Add a concept<->lexical ID pair
63     */
64    public void add(Object conceptId, Object lexId);
65  
66    /** Remove all mappings to lexical items for the given concept Id
67     */
68    public void removeByConcept(Object conceptId);
69  
70    /** Remove all mappings to concept items for the given lexical Id
71     */
72    public void removeByLexId(Object lexId);
73  
74    /** Remove the given mapping
75     */
76    public void remove(Object conceptId, Object lexId);
77  
78    /**
79     * True if the mapping is empty
80     */
81    public boolean isEmpty();
82  
83    /**
84     * Clear the mapping
85     */
86    public void clear();
87  
88    /**
89     * Accessor for the lexical Id property. It
90     * specifies which lexicon is this mapping for
91     */
92    public Object getLexKBIdentifier();
93  
94    /**
95     * Set method for the lexical Id property. It
96     * specifies which lexicon is this mapping for
97     */
98    public void setLexKBIdentifier(Object lexId);
99  
100   /** Accessor for the ontology Id property */
101   public Object getOntologyIdentifier();
102 
103   /**
104    * Set method for the ontology Id property. It
105    * specifies which ontology is this mapping for
106    */
107   public void setOntologyIdentifier(Object ontoId);
108 }