1
15
16 package gate.wordnet;
17
18 import junit.framework.Assert;
19
20 public class SemanticRelationImpl extends RelationImpl
21 implements SemanticRelation {
22
23 private Synset source;
24 private Synset target;
25
26 public SemanticRelationImpl(int _type, Synset _src, Synset _target) {
27
28 super(_type);
29
30 Assert.assertNotNull(_src);
31 Assert.assertNotNull(_target);
32 Assert.assertTrue(WNHelper.isValidSemanticPointer(_type));
33
34 this.source = _src;
35 this.target = _target;
36 }
37
38
39
40 public Synset getSource() {
41 return this.source;
42 }
43
44
45 public Synset getTarget() {
46 return this.target;
47 }
48
49 }