| VerbImpl.java |
1 /*
2 * VerbImpl.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 * Marin Dimitrov, 20/May/2002
12 *
13 * $Id: VerbImpl.java,v 1.6 2004/07/21 17:10:10 akshay Exp $
14 */
15
16 package gate.wordnet;
17
18 import java.util.ArrayList;
19 import java.util.List;
20
21 import junit.framework.Assert;
22 import net.didion.jwnl.dictionary.Dictionary;
23
24 /** Represents WordNet verb.
25 */
26 public class VerbImpl extends WordSenseImpl
27 implements Verb {
28
29 private ArrayList verbFrames;
30
31 public VerbImpl(Word _word,
32 Synset _synset,
33 int _senseNumber,
34 int _orderInSynset,
35 boolean _isSemcor,
36 net.didion.jwnl.data.Verb _jwVerb,
37 Dictionary _wnDict) {
38
39 super(_word,_synset,_senseNumber,_orderInSynset,_isSemcor, _wnDict);
40
41 Assert.assertNotNull(_jwVerb);
42
43 String[] jwFrames = _jwVerb.getVerbFrames();
44 this.verbFrames = new ArrayList(jwFrames.length);
45
46 for (int i= 0; i< jwFrames.length; i++) {
47 this.verbFrames.add(new VerbFrameImpl(jwFrames[i]));
48 }
49 }
50
51 /** returns the verb frames associated with this synset */
52 public List getVerbFrames() {
53 return this.verbFrames;
54 }
55 }