-
Notifications
You must be signed in to change notification settings - Fork 14
/
EventLink.js
61 lines (49 loc) · 1.5 KB
/
EventLink.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/*
* EventLink.js
* Author: Zoltan Komives ([email protected])
* Created: 04.07.2013
*
* Represents a link between two MEI events. The link is represented by two references:
* 1. reference to start event,
* 2. reference to end event.
*
*
*/
MEI2VF.EventLink = function(first_id, last_id, link_cond) {
this.first_ref = new MEI2VF.EventReference(first_id);
this.last_ref = new MEI2VF.EventReference(last_id);
this.linkCond = link_cond;
}
/**
* @param hairpinparams is an object { place, form }.
*/
MEI2VF.EventLink.prototype.setHairpinParams = function (hairpinparams) {
this.hairpinParams = hairpinparams;
}
MEI2VF.EventLink.prototype.setFirstRef = function (first_ref) {
this.first_ref = first_ref;
}
MEI2VF.EventLink.prototype.setLastRef = function (last_ref) {
this.last_ref = last_ref;
}
MEI2VF.EventLink.prototype.setFirstId = function(id) {
this.first_ref.setId(id);
}
MEI2VF.EventLink.prototype.setLastId = function(id) {
this.last_ref.setId(id);
}
MEI2VF.EventLink.prototype.setFirstTStamp = function (tstamp) {
this.first_ref.setTStamp(tstamp);
}
MEI2VF.EventLink.prototype.setLastTStamp = function (tstamp2) {
this.last_ref.setTStamp(tstamp2);
}
MEI2VF.EventLink.prototype.setContext = function(meicontext) {
this.meicontext = meicontext;
}
MEI2VF.EventLink.prototype.getFirstId = function () {
return this.first_ref.getId( { meicontext:this.meicontext } );
}
MEI2VF.EventLink.prototype.getLastId = function () {
return this.last_ref.getId( { meicontext:this.meicontext } );
}