1 package ixa.kaflib; 2 3 import java.io.Serializable; 4 5 6 public class TLink implements Serializable { 7 8 private String id; 9 10 private TLinkReferable from; 11 12 private TLinkReferable to; 13 14 private String relType; 15 16 17 TLink(String id, TLinkReferable from, TLinkReferable to, String relType) { 18 this.id = id; 19 this.from = from; 20 this.to = to; 21 this.relType = relType; 22 } 23 24 public String getId() { 25 return this.id; 26 } 27 28 public TLinkReferable getFrom() { 29 return this.from; 30 } 31 32 public void setFrom(TLinkReferable from) { 33 this.from = from; 34 } 35 36 public TLinkReferable getTo() { 37 return this.to; 38 } 39 40 public void setTo(TLinkReferable to) { 41 this.to = to; 42 } 43 44 public String getFromType() { 45 return (this.from instanceof Predicate) ? "event" : "timex"; 46 } 47 48 public String getToType() { 49 return (this.to instanceof Predicate) ? "event" : "timex"; 50 } 51 52 public String getRelType() { 53 return this.relType; 54 } 55 56 public void setRelType(String relType) { 57 this.relType = relType; 58 } 59 }