@ccmaymay/concrete 4.15.0 → 4.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ActiveLearnerClientService.js +249 -249
- package/ActiveLearnerServerService.js +642 -642
- package/AnnotateCommunicationService.js +696 -696
- package/AnnotateWithContextService.js +298 -298
- package/FeedbackService.js +750 -750
- package/FetchCommunicationService.js +709 -709
- package/README.md +125 -0
- package/ResultsServerService.js +2138 -2138
- package/SearchProxyService.js +962 -962
- package/SearchService.js +685 -685
- package/Service.js +373 -373
- package/StoreCommunicationService.js +255 -255
- package/SummarizationService.js +479 -479
- package/access_types.js +168 -168
- package/annotate_types.js +26 -26
- package/audio_types.js +110 -110
- package/cluster_types.js +398 -398
- package/communication_fu.js +432 -432
- package/communication_types.js +845 -845
- package/concrete.js +64 -64
- package/context_types.js +65 -65
- package/email_types.js +477 -477
- package/entities_types.js +658 -658
- package/ex_types.js +82 -82
- package/language_types.js +123 -123
- package/learn_types.js +207 -207
- package/linking_types.js +286 -286
- package/metadata_types.js +926 -926
- package/nitf_types.js +1005 -1005
- package/package.json +26 -5
- package/results_types.js +18 -18
- package/search_types.js +661 -661
- package/services_types.js +384 -384
- package/situations_types.js +1268 -1268
- package/spans_types.js +151 -151
- package/structure_types.js +2311 -2311
- package/summarization_types.js +433 -433
- package/tokenization_fu.js +33 -33
- package/tokentagging_fu.js +241 -241
- package/twitter_types.js +1553 -1553
- package/util.js +117 -117
- package/uuid_types.js +67 -67
package/situations_types.js
CHANGED
@@ -1,1268 +1,1268 @@
|
|
1
|
-
//
|
2
|
-
// Autogenerated by Thrift Compiler (0.15.0)
|
3
|
-
//
|
4
|
-
// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
5
|
-
//
|
6
|
-
"use strict";
|
7
|
-
|
8
|
-
const thrift = require('thrift');
|
9
|
-
const Thrift = thrift.Thrift;
|
10
|
-
const Int64 = require('node-int64');
|
11
|
-
|
12
|
-
const structure_ttypes = require('./structure_types');
|
13
|
-
const metadata_ttypes = require('./metadata_types');
|
14
|
-
const uuid_ttypes = require('./uuid_types');
|
15
|
-
const linking_ttypes = require('./linking_types');
|
16
|
-
|
17
|
-
|
18
|
-
const ttypes = module.exports = {};
|
19
|
-
const Property = module.exports.Property = class {
|
20
|
-
constructor(args) {
|
21
|
-
this.value = null;
|
22
|
-
this.metadata = null;
|
23
|
-
this.polarity = null;
|
24
|
-
if (args) {
|
25
|
-
if (args.value !== undefined && args.value !== null) {
|
26
|
-
this.value = args.value;
|
27
|
-
} else {
|
28
|
-
throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field value is unset!');
|
29
|
-
}
|
30
|
-
if (args.metadata !== undefined && args.metadata !== null) {
|
31
|
-
this.metadata = new metadata_ttypes.AnnotationMetadata(args.metadata);
|
32
|
-
} else {
|
33
|
-
throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field metadata is unset!');
|
34
|
-
}
|
35
|
-
if (args.polarity !== undefined && args.polarity !== null) {
|
36
|
-
this.polarity = args.polarity;
|
37
|
-
}
|
38
|
-
}
|
39
|
-
}
|
40
|
-
|
41
|
-
read (input) {
|
42
|
-
input.readStructBegin();
|
43
|
-
while (true) {
|
44
|
-
const ret = input.readFieldBegin();
|
45
|
-
const ftype = ret.ftype;
|
46
|
-
const fid = ret.fid;
|
47
|
-
if (ftype == Thrift.Type.STOP) {
|
48
|
-
break;
|
49
|
-
}
|
50
|
-
switch (fid) {
|
51
|
-
case 1:
|
52
|
-
if (ftype == Thrift.Type.STRING) {
|
53
|
-
this.value = input.readString();
|
54
|
-
} else {
|
55
|
-
input.skip(ftype);
|
56
|
-
}
|
57
|
-
break;
|
58
|
-
case 2:
|
59
|
-
if (ftype == Thrift.Type.STRUCT) {
|
60
|
-
this.metadata = new metadata_ttypes.AnnotationMetadata();
|
61
|
-
this.metadata.read(input);
|
62
|
-
} else {
|
63
|
-
input.skip(ftype);
|
64
|
-
}
|
65
|
-
break;
|
66
|
-
case 3:
|
67
|
-
if (ftype == Thrift.Type.DOUBLE) {
|
68
|
-
this.polarity = input.readDouble();
|
69
|
-
} else {
|
70
|
-
input.skip(ftype);
|
71
|
-
}
|
72
|
-
break;
|
73
|
-
default:
|
74
|
-
input.skip(ftype);
|
75
|
-
}
|
76
|
-
input.readFieldEnd();
|
77
|
-
}
|
78
|
-
input.readStructEnd();
|
79
|
-
return;
|
80
|
-
}
|
81
|
-
|
82
|
-
write (output) {
|
83
|
-
output.writeStructBegin('Property');
|
84
|
-
if (this.value !== null && this.value !== undefined) {
|
85
|
-
output.writeFieldBegin('value', Thrift.Type.STRING, 1);
|
86
|
-
output.writeString(this.value);
|
87
|
-
output.writeFieldEnd();
|
88
|
-
}
|
89
|
-
if (this.metadata !== null && this.metadata !== undefined) {
|
90
|
-
output.writeFieldBegin('metadata', Thrift.Type.STRUCT, 2);
|
91
|
-
this.metadata.write(output);
|
92
|
-
output.writeFieldEnd();
|
93
|
-
}
|
94
|
-
if (this.polarity !== null && this.polarity !== undefined) {
|
95
|
-
output.writeFieldBegin('polarity', Thrift.Type.DOUBLE, 3);
|
96
|
-
output.writeDouble(this.polarity);
|
97
|
-
output.writeFieldEnd();
|
98
|
-
}
|
99
|
-
output.writeFieldStop();
|
100
|
-
output.writeStructEnd();
|
101
|
-
return;
|
102
|
-
}
|
103
|
-
|
104
|
-
};
|
105
|
-
const Argument = module.exports.Argument = class {
|
106
|
-
constructor(args) {
|
107
|
-
this.role = null;
|
108
|
-
this.entityId = null;
|
109
|
-
this.situationId = null;
|
110
|
-
this.propertyList = null;
|
111
|
-
if (args) {
|
112
|
-
if (args.role !== undefined && args.role !== null) {
|
113
|
-
this.role = args.role;
|
114
|
-
}
|
115
|
-
if (args.entityId !== undefined && args.entityId !== null) {
|
116
|
-
this.entityId = new uuid_ttypes.UUID(args.entityId);
|
117
|
-
}
|
118
|
-
if (args.situationId !== undefined && args.situationId !== null) {
|
119
|
-
this.situationId = new uuid_ttypes.UUID(args.situationId);
|
120
|
-
}
|
121
|
-
if (args.propertyList !== undefined && args.propertyList !== null) {
|
122
|
-
this.propertyList = Thrift.copyList(args.propertyList, [ttypes.Property]);
|
123
|
-
}
|
124
|
-
}
|
125
|
-
}
|
126
|
-
|
127
|
-
read (input) {
|
128
|
-
input.readStructBegin();
|
129
|
-
while (true) {
|
130
|
-
const ret = input.readFieldBegin();
|
131
|
-
const ftype = ret.ftype;
|
132
|
-
const fid = ret.fid;
|
133
|
-
if (ftype == Thrift.Type.STOP) {
|
134
|
-
break;
|
135
|
-
}
|
136
|
-
switch (fid) {
|
137
|
-
case 1:
|
138
|
-
if (ftype == Thrift.Type.STRING) {
|
139
|
-
this.role = input.readString();
|
140
|
-
} else {
|
141
|
-
input.skip(ftype);
|
142
|
-
}
|
143
|
-
break;
|
144
|
-
case 2:
|
145
|
-
if (ftype == Thrift.Type.STRUCT) {
|
146
|
-
this.entityId = new uuid_ttypes.UUID();
|
147
|
-
this.entityId.read(input);
|
148
|
-
} else {
|
149
|
-
input.skip(ftype);
|
150
|
-
}
|
151
|
-
break;
|
152
|
-
case 3:
|
153
|
-
if (ftype == Thrift.Type.STRUCT) {
|
154
|
-
this.situationId = new uuid_ttypes.UUID();
|
155
|
-
this.situationId.read(input);
|
156
|
-
} else {
|
157
|
-
input.skip(ftype);
|
158
|
-
}
|
159
|
-
break;
|
160
|
-
case 4:
|
161
|
-
if (ftype == Thrift.Type.LIST) {
|
162
|
-
this.propertyList = [];
|
163
|
-
const _rtmp31 = input.readListBegin();
|
164
|
-
const _size0 = _rtmp31.size || 0;
|
165
|
-
for (let _i2 = 0; _i2 < _size0; ++_i2) {
|
166
|
-
let elem3 = null;
|
167
|
-
elem3 = new ttypes.Property();
|
168
|
-
elem3.read(input);
|
169
|
-
this.propertyList.push(elem3);
|
170
|
-
}
|
171
|
-
input.readListEnd();
|
172
|
-
} else {
|
173
|
-
input.skip(ftype);
|
174
|
-
}
|
175
|
-
break;
|
176
|
-
default:
|
177
|
-
input.skip(ftype);
|
178
|
-
}
|
179
|
-
input.readFieldEnd();
|
180
|
-
}
|
181
|
-
input.readStructEnd();
|
182
|
-
return;
|
183
|
-
}
|
184
|
-
|
185
|
-
write (output) {
|
186
|
-
output.writeStructBegin('Argument');
|
187
|
-
if (this.role !== null && this.role !== undefined) {
|
188
|
-
output.writeFieldBegin('role', Thrift.Type.STRING, 1);
|
189
|
-
output.writeString(this.role);
|
190
|
-
output.writeFieldEnd();
|
191
|
-
}
|
192
|
-
if (this.entityId !== null && this.entityId !== undefined) {
|
193
|
-
output.writeFieldBegin('entityId', Thrift.Type.STRUCT, 2);
|
194
|
-
this.entityId.write(output);
|
195
|
-
output.writeFieldEnd();
|
196
|
-
}
|
197
|
-
if (this.situationId !== null && this.situationId !== undefined) {
|
198
|
-
output.writeFieldBegin('situationId', Thrift.Type.STRUCT, 3);
|
199
|
-
this.situationId.write(output);
|
200
|
-
output.writeFieldEnd();
|
201
|
-
}
|
202
|
-
if (this.propertyList !== null && this.propertyList !== undefined) {
|
203
|
-
output.writeFieldBegin('propertyList', Thrift.Type.LIST, 4);
|
204
|
-
output.writeListBegin(Thrift.Type.STRUCT, this.propertyList.length);
|
205
|
-
for (let iter4 in this.propertyList) {
|
206
|
-
if (this.propertyList.hasOwnProperty(iter4)) {
|
207
|
-
iter4 = this.propertyList[iter4];
|
208
|
-
iter4.write(output);
|
209
|
-
}
|
210
|
-
}
|
211
|
-
output.writeListEnd();
|
212
|
-
output.writeFieldEnd();
|
213
|
-
}
|
214
|
-
output.writeFieldStop();
|
215
|
-
output.writeStructEnd();
|
216
|
-
return;
|
217
|
-
}
|
218
|
-
|
219
|
-
};
|
220
|
-
const Justification = module.exports.Justification = class {
|
221
|
-
constructor(args) {
|
222
|
-
this.justificationType = null;
|
223
|
-
this.mentionId = null;
|
224
|
-
this.tokenRefSeqList = null;
|
225
|
-
if (args) {
|
226
|
-
if (args.justificationType !== undefined && args.justificationType !== null) {
|
227
|
-
this.justificationType = args.justificationType;
|
228
|
-
}
|
229
|
-
if (args.mentionId !== undefined && args.mentionId !== null) {
|
230
|
-
this.mentionId = new uuid_ttypes.UUID(args.mentionId);
|
231
|
-
} else {
|
232
|
-
throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field mentionId is unset!');
|
233
|
-
}
|
234
|
-
if (args.tokenRefSeqList !== undefined && args.tokenRefSeqList !== null) {
|
235
|
-
this.tokenRefSeqList = Thrift.copyList(args.tokenRefSeqList, [structure_ttypes.TokenRefSequence]);
|
236
|
-
}
|
237
|
-
}
|
238
|
-
}
|
239
|
-
|
240
|
-
read (input) {
|
241
|
-
input.readStructBegin();
|
242
|
-
while (true) {
|
243
|
-
const ret = input.readFieldBegin();
|
244
|
-
const ftype = ret.ftype;
|
245
|
-
const fid = ret.fid;
|
246
|
-
if (ftype == Thrift.Type.STOP) {
|
247
|
-
break;
|
248
|
-
}
|
249
|
-
switch (fid) {
|
250
|
-
case 1:
|
251
|
-
if (ftype == Thrift.Type.STRING) {
|
252
|
-
this.justificationType = input.readString();
|
253
|
-
} else {
|
254
|
-
input.skip(ftype);
|
255
|
-
}
|
256
|
-
break;
|
257
|
-
case 2:
|
258
|
-
if (ftype == Thrift.Type.STRUCT) {
|
259
|
-
this.mentionId = new uuid_ttypes.UUID();
|
260
|
-
this.mentionId.read(input);
|
261
|
-
} else {
|
262
|
-
input.skip(ftype);
|
263
|
-
}
|
264
|
-
break;
|
265
|
-
case 3:
|
266
|
-
if (ftype == Thrift.Type.LIST) {
|
267
|
-
this.tokenRefSeqList = [];
|
268
|
-
const _rtmp36 = input.readListBegin();
|
269
|
-
const _size5 = _rtmp36.size || 0;
|
270
|
-
for (let _i7 = 0; _i7 < _size5; ++_i7) {
|
271
|
-
let elem8 = null;
|
272
|
-
elem8 = new structure_ttypes.TokenRefSequence();
|
273
|
-
elem8.read(input);
|
274
|
-
this.tokenRefSeqList.push(elem8);
|
275
|
-
}
|
276
|
-
input.readListEnd();
|
277
|
-
} else {
|
278
|
-
input.skip(ftype);
|
279
|
-
}
|
280
|
-
break;
|
281
|
-
default:
|
282
|
-
input.skip(ftype);
|
283
|
-
}
|
284
|
-
input.readFieldEnd();
|
285
|
-
}
|
286
|
-
input.readStructEnd();
|
287
|
-
return;
|
288
|
-
}
|
289
|
-
|
290
|
-
write (output) {
|
291
|
-
output.writeStructBegin('Justification');
|
292
|
-
if (this.justificationType !== null && this.justificationType !== undefined) {
|
293
|
-
output.writeFieldBegin('justificationType', Thrift.Type.STRING, 1);
|
294
|
-
output.writeString(this.justificationType);
|
295
|
-
output.writeFieldEnd();
|
296
|
-
}
|
297
|
-
if (this.mentionId !== null && this.mentionId !== undefined) {
|
298
|
-
output.writeFieldBegin('mentionId', Thrift.Type.STRUCT, 2);
|
299
|
-
this.mentionId.write(output);
|
300
|
-
output.writeFieldEnd();
|
301
|
-
}
|
302
|
-
if (this.tokenRefSeqList !== null && this.tokenRefSeqList !== undefined) {
|
303
|
-
output.writeFieldBegin('tokenRefSeqList', Thrift.Type.LIST, 3);
|
304
|
-
output.writeListBegin(Thrift.Type.STRUCT, this.tokenRefSeqList.length);
|
305
|
-
for (let iter9 in this.tokenRefSeqList) {
|
306
|
-
if (this.tokenRefSeqList.hasOwnProperty(iter9)) {
|
307
|
-
iter9 = this.tokenRefSeqList[iter9];
|
308
|
-
iter9.write(output);
|
309
|
-
}
|
310
|
-
}
|
311
|
-
output.writeListEnd();
|
312
|
-
output.writeFieldEnd();
|
313
|
-
}
|
314
|
-
output.writeFieldStop();
|
315
|
-
output.writeStructEnd();
|
316
|
-
return;
|
317
|
-
}
|
318
|
-
|
319
|
-
};
|
320
|
-
const TimeML = module.exports.TimeML = class {
|
321
|
-
constructor(args) {
|
322
|
-
this.timeMLClass = null;
|
323
|
-
this.timeMLTense = null;
|
324
|
-
this.timeMLAspect = null;
|
325
|
-
if (args) {
|
326
|
-
if (args.timeMLClass !== undefined && args.timeMLClass !== null) {
|
327
|
-
this.timeMLClass = args.timeMLClass;
|
328
|
-
}
|
329
|
-
if (args.timeMLTense !== undefined && args.timeMLTense !== null) {
|
330
|
-
this.timeMLTense = args.timeMLTense;
|
331
|
-
}
|
332
|
-
if (args.timeMLAspect !== undefined && args.timeMLAspect !== null) {
|
333
|
-
this.timeMLAspect = args.timeMLAspect;
|
334
|
-
}
|
335
|
-
}
|
336
|
-
}
|
337
|
-
|
338
|
-
read (input) {
|
339
|
-
input.readStructBegin();
|
340
|
-
while (true) {
|
341
|
-
const ret = input.readFieldBegin();
|
342
|
-
const ftype = ret.ftype;
|
343
|
-
const fid = ret.fid;
|
344
|
-
if (ftype == Thrift.Type.STOP) {
|
345
|
-
break;
|
346
|
-
}
|
347
|
-
switch (fid) {
|
348
|
-
case 1:
|
349
|
-
if (ftype == Thrift.Type.STRING) {
|
350
|
-
this.timeMLClass = input.readString();
|
351
|
-
} else {
|
352
|
-
input.skip(ftype);
|
353
|
-
}
|
354
|
-
break;
|
355
|
-
case 2:
|
356
|
-
if (ftype == Thrift.Type.STRING) {
|
357
|
-
this.timeMLTense = input.readString();
|
358
|
-
} else {
|
359
|
-
input.skip(ftype);
|
360
|
-
}
|
361
|
-
break;
|
362
|
-
case 3:
|
363
|
-
if (ftype == Thrift.Type.STRING) {
|
364
|
-
this.timeMLAspect = input.readString();
|
365
|
-
} else {
|
366
|
-
input.skip(ftype);
|
367
|
-
}
|
368
|
-
break;
|
369
|
-
default:
|
370
|
-
input.skip(ftype);
|
371
|
-
}
|
372
|
-
input.readFieldEnd();
|
373
|
-
}
|
374
|
-
input.readStructEnd();
|
375
|
-
return;
|
376
|
-
}
|
377
|
-
|
378
|
-
write (output) {
|
379
|
-
output.writeStructBegin('TimeML');
|
380
|
-
if (this.timeMLClass !== null && this.timeMLClass !== undefined) {
|
381
|
-
output.writeFieldBegin('timeMLClass', Thrift.Type.STRING, 1);
|
382
|
-
output.writeString(this.timeMLClass);
|
383
|
-
output.writeFieldEnd();
|
384
|
-
}
|
385
|
-
if (this.timeMLTense !== null && this.timeMLTense !== undefined) {
|
386
|
-
output.writeFieldBegin('timeMLTense', Thrift.Type.STRING, 2);
|
387
|
-
output.writeString(this.timeMLTense);
|
388
|
-
output.writeFieldEnd();
|
389
|
-
}
|
390
|
-
if (this.timeMLAspect !== null && this.timeMLAspect !== undefined) {
|
391
|
-
output.writeFieldBegin('timeMLAspect', Thrift.Type.STRING, 3);
|
392
|
-
output.writeString(this.timeMLAspect);
|
393
|
-
output.writeFieldEnd();
|
394
|
-
}
|
395
|
-
output.writeFieldStop();
|
396
|
-
output.writeStructEnd();
|
397
|
-
return;
|
398
|
-
}
|
399
|
-
|
400
|
-
};
|
401
|
-
const Situation = module.exports.Situation = class {
|
402
|
-
constructor(args) {
|
403
|
-
this.uuid = null;
|
404
|
-
this.situationType = null;
|
405
|
-
this.situationKind = null;
|
406
|
-
this.argumentList = null;
|
407
|
-
this.mentionIdList = null;
|
408
|
-
this.justificationList = null;
|
409
|
-
this.timeML = null;
|
410
|
-
this.intensity = null;
|
411
|
-
this.polarity = null;
|
412
|
-
this.confidence = null;
|
413
|
-
if (args) {
|
414
|
-
if (args.uuid !== undefined && args.uuid !== null) {
|
415
|
-
this.uuid = new uuid_ttypes.UUID(args.uuid);
|
416
|
-
} else {
|
417
|
-
throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field uuid is unset!');
|
418
|
-
}
|
419
|
-
if (args.situationType !== undefined && args.situationType !== null) {
|
420
|
-
this.situationType = args.situationType;
|
421
|
-
} else {
|
422
|
-
throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field situationType is unset!');
|
423
|
-
}
|
424
|
-
if (args.situationKind !== undefined && args.situationKind !== null) {
|
425
|
-
this.situationKind = args.situationKind;
|
426
|
-
}
|
427
|
-
if (args.argumentList !== undefined && args.argumentList !== null) {
|
428
|
-
this.argumentList = Thrift.copyList(args.argumentList, [ttypes.Argument]);
|
429
|
-
}
|
430
|
-
if (args.mentionIdList !== undefined && args.mentionIdList !== null) {
|
431
|
-
this.mentionIdList = Thrift.copyList(args.mentionIdList, [uuid_ttypes.UUID]);
|
432
|
-
}
|
433
|
-
if (args.justificationList !== undefined && args.justificationList !== null) {
|
434
|
-
this.justificationList = Thrift.copyList(args.justificationList, [ttypes.Justification]);
|
435
|
-
}
|
436
|
-
if (args.timeML !== undefined && args.timeML !== null) {
|
437
|
-
this.timeML = new ttypes.TimeML(args.timeML);
|
438
|
-
}
|
439
|
-
if (args.intensity !== undefined && args.intensity !== null) {
|
440
|
-
this.intensity = args.intensity;
|
441
|
-
}
|
442
|
-
if (args.polarity !== undefined && args.polarity !== null) {
|
443
|
-
this.polarity = args.polarity;
|
444
|
-
}
|
445
|
-
if (args.confidence !== undefined && args.confidence !== null) {
|
446
|
-
this.confidence = args.confidence;
|
447
|
-
}
|
448
|
-
}
|
449
|
-
}
|
450
|
-
|
451
|
-
read (input) {
|
452
|
-
input.readStructBegin();
|
453
|
-
while (true) {
|
454
|
-
const ret = input.readFieldBegin();
|
455
|
-
const ftype = ret.ftype;
|
456
|
-
const fid = ret.fid;
|
457
|
-
if (ftype == Thrift.Type.STOP) {
|
458
|
-
break;
|
459
|
-
}
|
460
|
-
switch (fid) {
|
461
|
-
case 1:
|
462
|
-
if (ftype == Thrift.Type.STRUCT) {
|
463
|
-
this.uuid = new uuid_ttypes.UUID();
|
464
|
-
this.uuid.read(input);
|
465
|
-
} else {
|
466
|
-
input.skip(ftype);
|
467
|
-
}
|
468
|
-
break;
|
469
|
-
case 2:
|
470
|
-
if (ftype == Thrift.Type.STRING) {
|
471
|
-
this.situationType = input.readString();
|
472
|
-
} else {
|
473
|
-
input.skip(ftype);
|
474
|
-
}
|
475
|
-
break;
|
476
|
-
case 50:
|
477
|
-
if (ftype == Thrift.Type.STRING) {
|
478
|
-
this.situationKind = input.readString();
|
479
|
-
} else {
|
480
|
-
input.skip(ftype);
|
481
|
-
}
|
482
|
-
break;
|
483
|
-
case 3:
|
484
|
-
if (ftype == Thrift.Type.LIST) {
|
485
|
-
this.argumentList = [];
|
486
|
-
const _rtmp311 = input.readListBegin();
|
487
|
-
const _size10 = _rtmp311.size || 0;
|
488
|
-
for (let _i12 = 0; _i12 < _size10; ++_i12) {
|
489
|
-
let elem13 = null;
|
490
|
-
elem13 = new ttypes.Argument();
|
491
|
-
elem13.read(input);
|
492
|
-
this.argumentList.push(elem13);
|
493
|
-
}
|
494
|
-
input.readListEnd();
|
495
|
-
} else {
|
496
|
-
input.skip(ftype);
|
497
|
-
}
|
498
|
-
break;
|
499
|
-
case 4:
|
500
|
-
if (ftype == Thrift.Type.LIST) {
|
501
|
-
this.mentionIdList = [];
|
502
|
-
const _rtmp315 = input.readListBegin();
|
503
|
-
const _size14 = _rtmp315.size || 0;
|
504
|
-
for (let _i16 = 0; _i16 < _size14; ++_i16) {
|
505
|
-
let elem17 = null;
|
506
|
-
elem17 = new uuid_ttypes.UUID();
|
507
|
-
elem17.read(input);
|
508
|
-
this.mentionIdList.push(elem17);
|
509
|
-
}
|
510
|
-
input.readListEnd();
|
511
|
-
} else {
|
512
|
-
input.skip(ftype);
|
513
|
-
}
|
514
|
-
break;
|
515
|
-
case 5:
|
516
|
-
if (ftype == Thrift.Type.LIST) {
|
517
|
-
this.justificationList = [];
|
518
|
-
const _rtmp319 = input.readListBegin();
|
519
|
-
const _size18 = _rtmp319.size || 0;
|
520
|
-
for (let _i20 = 0; _i20 < _size18; ++_i20) {
|
521
|
-
let elem21 = null;
|
522
|
-
elem21 = new ttypes.Justification();
|
523
|
-
elem21.read(input);
|
524
|
-
this.justificationList.push(elem21);
|
525
|
-
}
|
526
|
-
input.readListEnd();
|
527
|
-
} else {
|
528
|
-
input.skip(ftype);
|
529
|
-
}
|
530
|
-
break;
|
531
|
-
case 54:
|
532
|
-
if (ftype == Thrift.Type.STRUCT) {
|
533
|
-
this.timeML = new ttypes.TimeML();
|
534
|
-
this.timeML.read(input);
|
535
|
-
} else {
|
536
|
-
input.skip(ftype);
|
537
|
-
}
|
538
|
-
break;
|
539
|
-
case 100:
|
540
|
-
if (ftype == Thrift.Type.DOUBLE) {
|
541
|
-
this.intensity = input.readDouble();
|
542
|
-
} else {
|
543
|
-
input.skip(ftype);
|
544
|
-
}
|
545
|
-
break;
|
546
|
-
case 101:
|
547
|
-
if (ftype == Thrift.Type.STRING) {
|
548
|
-
this.polarity = input.readString();
|
549
|
-
} else {
|
550
|
-
input.skip(ftype);
|
551
|
-
}
|
552
|
-
break;
|
553
|
-
case 200:
|
554
|
-
if (ftype == Thrift.Type.DOUBLE) {
|
555
|
-
this.confidence = input.readDouble();
|
556
|
-
} else {
|
557
|
-
input.skip(ftype);
|
558
|
-
}
|
559
|
-
break;
|
560
|
-
default:
|
561
|
-
input.skip(ftype);
|
562
|
-
}
|
563
|
-
input.readFieldEnd();
|
564
|
-
}
|
565
|
-
input.readStructEnd();
|
566
|
-
return;
|
567
|
-
}
|
568
|
-
|
569
|
-
write (output) {
|
570
|
-
output.writeStructBegin('Situation');
|
571
|
-
if (this.uuid !== null && this.uuid !== undefined) {
|
572
|
-
output.writeFieldBegin('uuid', Thrift.Type.STRUCT, 1);
|
573
|
-
this.uuid.write(output);
|
574
|
-
output.writeFieldEnd();
|
575
|
-
}
|
576
|
-
if (this.situationType !== null && this.situationType !== undefined) {
|
577
|
-
output.writeFieldBegin('situationType', Thrift.Type.STRING, 2);
|
578
|
-
output.writeString(this.situationType);
|
579
|
-
output.writeFieldEnd();
|
580
|
-
}
|
581
|
-
if (this.situationKind !== null && this.situationKind !== undefined) {
|
582
|
-
output.writeFieldBegin('situationKind', Thrift.Type.STRING, 50);
|
583
|
-
output.writeString(this.situationKind);
|
584
|
-
output.writeFieldEnd();
|
585
|
-
}
|
586
|
-
if (this.argumentList !== null && this.argumentList !== undefined) {
|
587
|
-
output.writeFieldBegin('argumentList', Thrift.Type.LIST, 3);
|
588
|
-
output.writeListBegin(Thrift.Type.STRUCT, this.argumentList.length);
|
589
|
-
for (let iter22 in this.argumentList) {
|
590
|
-
if (this.argumentList.hasOwnProperty(iter22)) {
|
591
|
-
iter22 = this.argumentList[iter22];
|
592
|
-
iter22.write(output);
|
593
|
-
}
|
594
|
-
}
|
595
|
-
output.writeListEnd();
|
596
|
-
output.writeFieldEnd();
|
597
|
-
}
|
598
|
-
if (this.mentionIdList !== null && this.mentionIdList !== undefined) {
|
599
|
-
output.writeFieldBegin('mentionIdList', Thrift.Type.LIST, 4);
|
600
|
-
output.writeListBegin(Thrift.Type.STRUCT, this.mentionIdList.length);
|
601
|
-
for (let iter23 in this.mentionIdList) {
|
602
|
-
if (this.mentionIdList.hasOwnProperty(iter23)) {
|
603
|
-
iter23 = this.mentionIdList[iter23];
|
604
|
-
iter23.write(output);
|
605
|
-
}
|
606
|
-
}
|
607
|
-
output.writeListEnd();
|
608
|
-
output.writeFieldEnd();
|
609
|
-
}
|
610
|
-
if (this.justificationList !== null && this.justificationList !== undefined) {
|
611
|
-
output.writeFieldBegin('justificationList', Thrift.Type.LIST, 5);
|
612
|
-
output.writeListBegin(Thrift.Type.STRUCT, this.justificationList.length);
|
613
|
-
for (let iter24 in this.justificationList) {
|
614
|
-
if (this.justificationList.hasOwnProperty(iter24)) {
|
615
|
-
iter24 = this.justificationList[iter24];
|
616
|
-
iter24.write(output);
|
617
|
-
}
|
618
|
-
}
|
619
|
-
output.writeListEnd();
|
620
|
-
output.writeFieldEnd();
|
621
|
-
}
|
622
|
-
if (this.timeML !== null && this.timeML !== undefined) {
|
623
|
-
output.writeFieldBegin('timeML', Thrift.Type.STRUCT, 54);
|
624
|
-
this.timeML.write(output);
|
625
|
-
output.writeFieldEnd();
|
626
|
-
}
|
627
|
-
if (this.intensity !== null && this.intensity !== undefined) {
|
628
|
-
output.writeFieldBegin('intensity', Thrift.Type.DOUBLE, 100);
|
629
|
-
output.writeDouble(this.intensity);
|
630
|
-
output.writeFieldEnd();
|
631
|
-
}
|
632
|
-
if (this.polarity !== null && this.polarity !== undefined) {
|
633
|
-
output.writeFieldBegin('polarity', Thrift.Type.STRING, 101);
|
634
|
-
output.writeString(this.polarity);
|
635
|
-
output.writeFieldEnd();
|
636
|
-
}
|
637
|
-
if (this.confidence !== null && this.confidence !== undefined) {
|
638
|
-
output.writeFieldBegin('confidence', Thrift.Type.DOUBLE, 200);
|
639
|
-
output.writeDouble(this.confidence);
|
640
|
-
output.writeFieldEnd();
|
641
|
-
}
|
642
|
-
output.writeFieldStop();
|
643
|
-
output.writeStructEnd();
|
644
|
-
return;
|
645
|
-
}
|
646
|
-
|
647
|
-
};
|
648
|
-
const SituationSet = module.exports.SituationSet = class {
|
649
|
-
constructor(args) {
|
650
|
-
this.uuid = null;
|
651
|
-
this.metadata = null;
|
652
|
-
this.situationList = null;
|
653
|
-
this.linkingList = null;
|
654
|
-
if (args) {
|
655
|
-
if (args.uuid !== undefined && args.uuid !== null) {
|
656
|
-
this.uuid = new uuid_ttypes.UUID(args.uuid);
|
657
|
-
} else {
|
658
|
-
throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field uuid is unset!');
|
659
|
-
}
|
660
|
-
if (args.metadata !== undefined && args.metadata !== null) {
|
661
|
-
this.metadata = new metadata_ttypes.AnnotationMetadata(args.metadata);
|
662
|
-
} else {
|
663
|
-
throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field metadata is unset!');
|
664
|
-
}
|
665
|
-
if (args.situationList !== undefined && args.situationList !== null) {
|
666
|
-
this.situationList = Thrift.copyList(args.situationList, [ttypes.Situation]);
|
667
|
-
} else {
|
668
|
-
throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field situationList is unset!');
|
669
|
-
}
|
670
|
-
if (args.linkingList !== undefined && args.linkingList !== null) {
|
671
|
-
this.linkingList = Thrift.copyList(args.linkingList, [linking_ttypes.Linking]);
|
672
|
-
}
|
673
|
-
}
|
674
|
-
}
|
675
|
-
|
676
|
-
read (input) {
|
677
|
-
input.readStructBegin();
|
678
|
-
while (true) {
|
679
|
-
const ret = input.readFieldBegin();
|
680
|
-
const ftype = ret.ftype;
|
681
|
-
const fid = ret.fid;
|
682
|
-
if (ftype == Thrift.Type.STOP) {
|
683
|
-
break;
|
684
|
-
}
|
685
|
-
switch (fid) {
|
686
|
-
case 1:
|
687
|
-
if (ftype == Thrift.Type.STRUCT) {
|
688
|
-
this.uuid = new uuid_ttypes.UUID();
|
689
|
-
this.uuid.read(input);
|
690
|
-
} else {
|
691
|
-
input.skip(ftype);
|
692
|
-
}
|
693
|
-
break;
|
694
|
-
case 2:
|
695
|
-
if (ftype == Thrift.Type.STRUCT) {
|
696
|
-
this.metadata = new metadata_ttypes.AnnotationMetadata();
|
697
|
-
this.metadata.read(input);
|
698
|
-
} else {
|
699
|
-
input.skip(ftype);
|
700
|
-
}
|
701
|
-
break;
|
702
|
-
case 3:
|
703
|
-
if (ftype == Thrift.Type.LIST) {
|
704
|
-
this.situationList = [];
|
705
|
-
const _rtmp326 = input.readListBegin();
|
706
|
-
const _size25 = _rtmp326.size || 0;
|
707
|
-
for (let _i27 = 0; _i27 < _size25; ++_i27) {
|
708
|
-
let elem28 = null;
|
709
|
-
elem28 = new ttypes.Situation();
|
710
|
-
elem28.read(input);
|
711
|
-
this.situationList.push(elem28);
|
712
|
-
}
|
713
|
-
input.readListEnd();
|
714
|
-
} else {
|
715
|
-
input.skip(ftype);
|
716
|
-
}
|
717
|
-
break;
|
718
|
-
case 4:
|
719
|
-
if (ftype == Thrift.Type.LIST) {
|
720
|
-
this.linkingList = [];
|
721
|
-
const _rtmp330 = input.readListBegin();
|
722
|
-
const _size29 = _rtmp330.size || 0;
|
723
|
-
for (let _i31 = 0; _i31 < _size29; ++_i31) {
|
724
|
-
let elem32 = null;
|
725
|
-
elem32 = new linking_ttypes.Linking();
|
726
|
-
elem32.read(input);
|
727
|
-
this.linkingList.push(elem32);
|
728
|
-
}
|
729
|
-
input.readListEnd();
|
730
|
-
} else {
|
731
|
-
input.skip(ftype);
|
732
|
-
}
|
733
|
-
break;
|
734
|
-
default:
|
735
|
-
input.skip(ftype);
|
736
|
-
}
|
737
|
-
input.readFieldEnd();
|
738
|
-
}
|
739
|
-
input.readStructEnd();
|
740
|
-
return;
|
741
|
-
}
|
742
|
-
|
743
|
-
write (output) {
|
744
|
-
output.writeStructBegin('SituationSet');
|
745
|
-
if (this.uuid !== null && this.uuid !== undefined) {
|
746
|
-
output.writeFieldBegin('uuid', Thrift.Type.STRUCT, 1);
|
747
|
-
this.uuid.write(output);
|
748
|
-
output.writeFieldEnd();
|
749
|
-
}
|
750
|
-
if (this.metadata !== null && this.metadata !== undefined) {
|
751
|
-
output.writeFieldBegin('metadata', Thrift.Type.STRUCT, 2);
|
752
|
-
this.metadata.write(output);
|
753
|
-
output.writeFieldEnd();
|
754
|
-
}
|
755
|
-
if (this.situationList !== null && this.situationList !== undefined) {
|
756
|
-
output.writeFieldBegin('situationList', Thrift.Type.LIST, 3);
|
757
|
-
output.writeListBegin(Thrift.Type.STRUCT, this.situationList.length);
|
758
|
-
for (let iter33 in this.situationList) {
|
759
|
-
if (this.situationList.hasOwnProperty(iter33)) {
|
760
|
-
iter33 = this.situationList[iter33];
|
761
|
-
iter33.write(output);
|
762
|
-
}
|
763
|
-
}
|
764
|
-
output.writeListEnd();
|
765
|
-
output.writeFieldEnd();
|
766
|
-
}
|
767
|
-
if (this.linkingList !== null && this.linkingList !== undefined) {
|
768
|
-
output.writeFieldBegin('linkingList', Thrift.Type.LIST, 4);
|
769
|
-
output.writeListBegin(Thrift.Type.STRUCT, this.linkingList.length);
|
770
|
-
for (let iter34 in this.linkingList) {
|
771
|
-
if (this.linkingList.hasOwnProperty(iter34)) {
|
772
|
-
iter34 = this.linkingList[iter34];
|
773
|
-
iter34.write(output);
|
774
|
-
}
|
775
|
-
}
|
776
|
-
output.writeListEnd();
|
777
|
-
output.writeFieldEnd();
|
778
|
-
}
|
779
|
-
output.writeFieldStop();
|
780
|
-
output.writeStructEnd();
|
781
|
-
return;
|
782
|
-
}
|
783
|
-
|
784
|
-
};
|
785
|
-
const MentionArgument = module.exports.MentionArgument = class {
|
786
|
-
constructor(args) {
|
787
|
-
this.role = null;
|
788
|
-
this.entityMentionId = null;
|
789
|
-
this.situationMentionId = null;
|
790
|
-
this.tokens = null;
|
791
|
-
this.confidence = null;
|
792
|
-
this.propertyList = null;
|
793
|
-
if (args) {
|
794
|
-
if (args.role !== undefined && args.role !== null) {
|
795
|
-
this.role = args.role;
|
796
|
-
}
|
797
|
-
if (args.entityMentionId !== undefined && args.entityMentionId !== null) {
|
798
|
-
this.entityMentionId = new uuid_ttypes.UUID(args.entityMentionId);
|
799
|
-
}
|
800
|
-
if (args.situationMentionId !== undefined && args.situationMentionId !== null) {
|
801
|
-
this.situationMentionId = new uuid_ttypes.UUID(args.situationMentionId);
|
802
|
-
}
|
803
|
-
if (args.tokens !== undefined && args.tokens !== null) {
|
804
|
-
this.tokens = new structure_ttypes.TokenRefSequence(args.tokens);
|
805
|
-
}
|
806
|
-
if (args.confidence !== undefined && args.confidence !== null) {
|
807
|
-
this.confidence = args.confidence;
|
808
|
-
}
|
809
|
-
if (args.propertyList !== undefined && args.propertyList !== null) {
|
810
|
-
this.propertyList = Thrift.copyList(args.propertyList, [ttypes.Property]);
|
811
|
-
}
|
812
|
-
}
|
813
|
-
}
|
814
|
-
|
815
|
-
read (input) {
|
816
|
-
input.readStructBegin();
|
817
|
-
while (true) {
|
818
|
-
const ret = input.readFieldBegin();
|
819
|
-
const ftype = ret.ftype;
|
820
|
-
const fid = ret.fid;
|
821
|
-
if (ftype == Thrift.Type.STOP) {
|
822
|
-
break;
|
823
|
-
}
|
824
|
-
switch (fid) {
|
825
|
-
case 1:
|
826
|
-
if (ftype == Thrift.Type.STRING) {
|
827
|
-
this.role = input.readString();
|
828
|
-
} else {
|
829
|
-
input.skip(ftype);
|
830
|
-
}
|
831
|
-
break;
|
832
|
-
case 2:
|
833
|
-
if (ftype == Thrift.Type.STRUCT) {
|
834
|
-
this.entityMentionId = new uuid_ttypes.UUID();
|
835
|
-
this.entityMentionId.read(input);
|
836
|
-
} else {
|
837
|
-
input.skip(ftype);
|
838
|
-
}
|
839
|
-
break;
|
840
|
-
case 3:
|
841
|
-
if (ftype == Thrift.Type.STRUCT) {
|
842
|
-
this.situationMentionId = new uuid_ttypes.UUID();
|
843
|
-
this.situationMentionId.read(input);
|
844
|
-
} else {
|
845
|
-
input.skip(ftype);
|
846
|
-
}
|
847
|
-
break;
|
848
|
-
case 4:
|
849
|
-
if (ftype == Thrift.Type.STRUCT) {
|
850
|
-
this.tokens = new structure_ttypes.TokenRefSequence();
|
851
|
-
this.tokens.read(input);
|
852
|
-
} else {
|
853
|
-
input.skip(ftype);
|
854
|
-
}
|
855
|
-
break;
|
856
|
-
case 5:
|
857
|
-
if (ftype == Thrift.Type.DOUBLE) {
|
858
|
-
this.confidence = input.readDouble();
|
859
|
-
} else {
|
860
|
-
input.skip(ftype);
|
861
|
-
}
|
862
|
-
break;
|
863
|
-
case 6:
|
864
|
-
if (ftype == Thrift.Type.LIST) {
|
865
|
-
this.propertyList = [];
|
866
|
-
const _rtmp336 = input.readListBegin();
|
867
|
-
const _size35 = _rtmp336.size || 0;
|
868
|
-
for (let _i37 = 0; _i37 < _size35; ++_i37) {
|
869
|
-
let elem38 = null;
|
870
|
-
elem38 = new ttypes.Property();
|
871
|
-
elem38.read(input);
|
872
|
-
this.propertyList.push(elem38);
|
873
|
-
}
|
874
|
-
input.readListEnd();
|
875
|
-
} else {
|
876
|
-
input.skip(ftype);
|
877
|
-
}
|
878
|
-
break;
|
879
|
-
default:
|
880
|
-
input.skip(ftype);
|
881
|
-
}
|
882
|
-
input.readFieldEnd();
|
883
|
-
}
|
884
|
-
input.readStructEnd();
|
885
|
-
return;
|
886
|
-
}
|
887
|
-
|
888
|
-
write (output) {
|
889
|
-
output.writeStructBegin('MentionArgument');
|
890
|
-
if (this.role !== null && this.role !== undefined) {
|
891
|
-
output.writeFieldBegin('role', Thrift.Type.STRING, 1);
|
892
|
-
output.writeString(this.role);
|
893
|
-
output.writeFieldEnd();
|
894
|
-
}
|
895
|
-
if (this.entityMentionId !== null && this.entityMentionId !== undefined) {
|
896
|
-
output.writeFieldBegin('entityMentionId', Thrift.Type.STRUCT, 2);
|
897
|
-
this.entityMentionId.write(output);
|
898
|
-
output.writeFieldEnd();
|
899
|
-
}
|
900
|
-
if (this.situationMentionId !== null && this.situationMentionId !== undefined) {
|
901
|
-
output.writeFieldBegin('situationMentionId', Thrift.Type.STRUCT, 3);
|
902
|
-
this.situationMentionId.write(output);
|
903
|
-
output.writeFieldEnd();
|
904
|
-
}
|
905
|
-
if (this.tokens !== null && this.tokens !== undefined) {
|
906
|
-
output.writeFieldBegin('tokens', Thrift.Type.STRUCT, 4);
|
907
|
-
this.tokens.write(output);
|
908
|
-
output.writeFieldEnd();
|
909
|
-
}
|
910
|
-
if (this.confidence !== null && this.confidence !== undefined) {
|
911
|
-
output.writeFieldBegin('confidence', Thrift.Type.DOUBLE, 5);
|
912
|
-
output.writeDouble(this.confidence);
|
913
|
-
output.writeFieldEnd();
|
914
|
-
}
|
915
|
-
if (this.propertyList !== null && this.propertyList !== undefined) {
|
916
|
-
output.writeFieldBegin('propertyList', Thrift.Type.LIST, 6);
|
917
|
-
output.writeListBegin(Thrift.Type.STRUCT, this.propertyList.length);
|
918
|
-
for (let iter39 in this.propertyList) {
|
919
|
-
if (this.propertyList.hasOwnProperty(iter39)) {
|
920
|
-
iter39 = this.propertyList[iter39];
|
921
|
-
iter39.write(output);
|
922
|
-
}
|
923
|
-
}
|
924
|
-
output.writeListEnd();
|
925
|
-
output.writeFieldEnd();
|
926
|
-
}
|
927
|
-
output.writeFieldStop();
|
928
|
-
output.writeStructEnd();
|
929
|
-
return;
|
930
|
-
}
|
931
|
-
|
932
|
-
};
|
933
|
-
const SituationMention = module.exports.SituationMention = class {
|
934
|
-
constructor(args) {
|
935
|
-
this.uuid = null;
|
936
|
-
this.text = null;
|
937
|
-
this.situationType = null;
|
938
|
-
this.situationKind = null;
|
939
|
-
this.argumentList = null;
|
940
|
-
this.intensity = null;
|
941
|
-
this.polarity = null;
|
942
|
-
this.tokens = null;
|
943
|
-
this.confidence = null;
|
944
|
-
if (args) {
|
945
|
-
if (args.uuid !== undefined && args.uuid !== null) {
|
946
|
-
this.uuid = new uuid_ttypes.UUID(args.uuid);
|
947
|
-
} else {
|
948
|
-
throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field uuid is unset!');
|
949
|
-
}
|
950
|
-
if (args.text !== undefined && args.text !== null) {
|
951
|
-
this.text = args.text;
|
952
|
-
}
|
953
|
-
if (args.situationType !== undefined && args.situationType !== null) {
|
954
|
-
this.situationType = args.situationType;
|
955
|
-
}
|
956
|
-
if (args.situationKind !== undefined && args.situationKind !== null) {
|
957
|
-
this.situationKind = args.situationKind;
|
958
|
-
}
|
959
|
-
if (args.argumentList !== undefined && args.argumentList !== null) {
|
960
|
-
this.argumentList = Thrift.copyList(args.argumentList, [ttypes.MentionArgument]);
|
961
|
-
} else {
|
962
|
-
throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field argumentList is unset!');
|
963
|
-
}
|
964
|
-
if (args.intensity !== undefined && args.intensity !== null) {
|
965
|
-
this.intensity = args.intensity;
|
966
|
-
}
|
967
|
-
if (args.polarity !== undefined && args.polarity !== null) {
|
968
|
-
this.polarity = args.polarity;
|
969
|
-
}
|
970
|
-
if (args.tokens !== undefined && args.tokens !== null) {
|
971
|
-
this.tokens = new structure_ttypes.TokenRefSequence(args.tokens);
|
972
|
-
}
|
973
|
-
if (args.confidence !== undefined && args.confidence !== null) {
|
974
|
-
this.confidence = args.confidence;
|
975
|
-
}
|
976
|
-
}
|
977
|
-
}
|
978
|
-
|
979
|
-
read (input) {
|
980
|
-
input.readStructBegin();
|
981
|
-
while (true) {
|
982
|
-
const ret = input.readFieldBegin();
|
983
|
-
const ftype = ret.ftype;
|
984
|
-
const fid = ret.fid;
|
985
|
-
if (ftype == Thrift.Type.STOP) {
|
986
|
-
break;
|
987
|
-
}
|
988
|
-
switch (fid) {
|
989
|
-
case 1:
|
990
|
-
if (ftype == Thrift.Type.STRUCT) {
|
991
|
-
this.uuid = new uuid_ttypes.UUID();
|
992
|
-
this.uuid.read(input);
|
993
|
-
} else {
|
994
|
-
input.skip(ftype);
|
995
|
-
}
|
996
|
-
break;
|
997
|
-
case 2:
|
998
|
-
if (ftype == Thrift.Type.STRING) {
|
999
|
-
this.text = input.readString();
|
1000
|
-
} else {
|
1001
|
-
input.skip(ftype);
|
1002
|
-
}
|
1003
|
-
break;
|
1004
|
-
case 3:
|
1005
|
-
if (ftype == Thrift.Type.STRING) {
|
1006
|
-
this.situationType = input.readString();
|
1007
|
-
} else {
|
1008
|
-
input.skip(ftype);
|
1009
|
-
}
|
1010
|
-
break;
|
1011
|
-
case 50:
|
1012
|
-
if (ftype == Thrift.Type.STRING) {
|
1013
|
-
this.situationKind = input.readString();
|
1014
|
-
} else {
|
1015
|
-
input.skip(ftype);
|
1016
|
-
}
|
1017
|
-
break;
|
1018
|
-
case 4:
|
1019
|
-
if (ftype == Thrift.Type.LIST) {
|
1020
|
-
this.argumentList = [];
|
1021
|
-
const _rtmp341 = input.readListBegin();
|
1022
|
-
const _size40 = _rtmp341.size || 0;
|
1023
|
-
for (let _i42 = 0; _i42 < _size40; ++_i42) {
|
1024
|
-
let elem43 = null;
|
1025
|
-
elem43 = new ttypes.MentionArgument();
|
1026
|
-
elem43.read(input);
|
1027
|
-
this.argumentList.push(elem43);
|
1028
|
-
}
|
1029
|
-
input.readListEnd();
|
1030
|
-
} else {
|
1031
|
-
input.skip(ftype);
|
1032
|
-
}
|
1033
|
-
break;
|
1034
|
-
case 100:
|
1035
|
-
if (ftype == Thrift.Type.DOUBLE) {
|
1036
|
-
this.intensity = input.readDouble();
|
1037
|
-
} else {
|
1038
|
-
input.skip(ftype);
|
1039
|
-
}
|
1040
|
-
break;
|
1041
|
-
case 101:
|
1042
|
-
if (ftype == Thrift.Type.STRING) {
|
1043
|
-
this.polarity = input.readString();
|
1044
|
-
} else {
|
1045
|
-
input.skip(ftype);
|
1046
|
-
}
|
1047
|
-
break;
|
1048
|
-
case 150:
|
1049
|
-
if (ftype == Thrift.Type.STRUCT) {
|
1050
|
-
this.tokens = new structure_ttypes.TokenRefSequence();
|
1051
|
-
this.tokens.read(input);
|
1052
|
-
} else {
|
1053
|
-
input.skip(ftype);
|
1054
|
-
}
|
1055
|
-
break;
|
1056
|
-
case 200:
|
1057
|
-
if (ftype == Thrift.Type.DOUBLE) {
|
1058
|
-
this.confidence = input.readDouble();
|
1059
|
-
} else {
|
1060
|
-
input.skip(ftype);
|
1061
|
-
}
|
1062
|
-
break;
|
1063
|
-
default:
|
1064
|
-
input.skip(ftype);
|
1065
|
-
}
|
1066
|
-
input.readFieldEnd();
|
1067
|
-
}
|
1068
|
-
input.readStructEnd();
|
1069
|
-
return;
|
1070
|
-
}
|
1071
|
-
|
1072
|
-
write (output) {
|
1073
|
-
output.writeStructBegin('SituationMention');
|
1074
|
-
if (this.uuid !== null && this.uuid !== undefined) {
|
1075
|
-
output.writeFieldBegin('uuid', Thrift.Type.STRUCT, 1);
|
1076
|
-
this.uuid.write(output);
|
1077
|
-
output.writeFieldEnd();
|
1078
|
-
}
|
1079
|
-
if (this.text !== null && this.text !== undefined) {
|
1080
|
-
output.writeFieldBegin('text', Thrift.Type.STRING, 2);
|
1081
|
-
output.writeString(this.text);
|
1082
|
-
output.writeFieldEnd();
|
1083
|
-
}
|
1084
|
-
if (this.situationType !== null && this.situationType !== undefined) {
|
1085
|
-
output.writeFieldBegin('situationType', Thrift.Type.STRING, 3);
|
1086
|
-
output.writeString(this.situationType);
|
1087
|
-
output.writeFieldEnd();
|
1088
|
-
}
|
1089
|
-
if (this.situationKind !== null && this.situationKind !== undefined) {
|
1090
|
-
output.writeFieldBegin('situationKind', Thrift.Type.STRING, 50);
|
1091
|
-
output.writeString(this.situationKind);
|
1092
|
-
output.writeFieldEnd();
|
1093
|
-
}
|
1094
|
-
if (this.argumentList !== null && this.argumentList !== undefined) {
|
1095
|
-
output.writeFieldBegin('argumentList', Thrift.Type.LIST, 4);
|
1096
|
-
output.writeListBegin(Thrift.Type.STRUCT, this.argumentList.length);
|
1097
|
-
for (let iter44 in this.argumentList) {
|
1098
|
-
if (this.argumentList.hasOwnProperty(iter44)) {
|
1099
|
-
iter44 = this.argumentList[iter44];
|
1100
|
-
iter44.write(output);
|
1101
|
-
}
|
1102
|
-
}
|
1103
|
-
output.writeListEnd();
|
1104
|
-
output.writeFieldEnd();
|
1105
|
-
}
|
1106
|
-
if (this.intensity !== null && this.intensity !== undefined) {
|
1107
|
-
output.writeFieldBegin('intensity', Thrift.Type.DOUBLE, 100);
|
1108
|
-
output.writeDouble(this.intensity);
|
1109
|
-
output.writeFieldEnd();
|
1110
|
-
}
|
1111
|
-
if (this.polarity !== null && this.polarity !== undefined) {
|
1112
|
-
output.writeFieldBegin('polarity', Thrift.Type.STRING, 101);
|
1113
|
-
output.writeString(this.polarity);
|
1114
|
-
output.writeFieldEnd();
|
1115
|
-
}
|
1116
|
-
if (this.tokens !== null && this.tokens !== undefined) {
|
1117
|
-
output.writeFieldBegin('tokens', Thrift.Type.STRUCT, 150);
|
1118
|
-
this.tokens.write(output);
|
1119
|
-
output.writeFieldEnd();
|
1120
|
-
}
|
1121
|
-
if (this.confidence !== null && this.confidence !== undefined) {
|
1122
|
-
output.writeFieldBegin('confidence', Thrift.Type.DOUBLE, 200);
|
1123
|
-
output.writeDouble(this.confidence);
|
1124
|
-
output.writeFieldEnd();
|
1125
|
-
}
|
1126
|
-
output.writeFieldStop();
|
1127
|
-
output.writeStructEnd();
|
1128
|
-
return;
|
1129
|
-
}
|
1130
|
-
|
1131
|
-
};
|
1132
|
-
const SituationMentionSet = module.exports.SituationMentionSet = class {
|
1133
|
-
constructor(args) {
|
1134
|
-
this.uuid = null;
|
1135
|
-
this.metadata = null;
|
1136
|
-
this.mentionList = null;
|
1137
|
-
this.linkingList = null;
|
1138
|
-
if (args) {
|
1139
|
-
if (args.uuid !== undefined && args.uuid !== null) {
|
1140
|
-
this.uuid = new uuid_ttypes.UUID(args.uuid);
|
1141
|
-
} else {
|
1142
|
-
throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field uuid is unset!');
|
1143
|
-
}
|
1144
|
-
if (args.metadata !== undefined && args.metadata !== null) {
|
1145
|
-
this.metadata = new metadata_ttypes.AnnotationMetadata(args.metadata);
|
1146
|
-
} else {
|
1147
|
-
throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field metadata is unset!');
|
1148
|
-
}
|
1149
|
-
if (args.mentionList !== undefined && args.mentionList !== null) {
|
1150
|
-
this.mentionList = Thrift.copyList(args.mentionList, [ttypes.SituationMention]);
|
1151
|
-
} else {
|
1152
|
-
throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field mentionList is unset!');
|
1153
|
-
}
|
1154
|
-
if (args.linkingList !== undefined && args.linkingList !== null) {
|
1155
|
-
this.linkingList = Thrift.copyList(args.linkingList, [linking_ttypes.Linking]);
|
1156
|
-
}
|
1157
|
-
}
|
1158
|
-
}
|
1159
|
-
|
1160
|
-
read (input) {
|
1161
|
-
input.readStructBegin();
|
1162
|
-
while (true) {
|
1163
|
-
const ret = input.readFieldBegin();
|
1164
|
-
const ftype = ret.ftype;
|
1165
|
-
const fid = ret.fid;
|
1166
|
-
if (ftype == Thrift.Type.STOP) {
|
1167
|
-
break;
|
1168
|
-
}
|
1169
|
-
switch (fid) {
|
1170
|
-
case 1:
|
1171
|
-
if (ftype == Thrift.Type.STRUCT) {
|
1172
|
-
this.uuid = new uuid_ttypes.UUID();
|
1173
|
-
this.uuid.read(input);
|
1174
|
-
} else {
|
1175
|
-
input.skip(ftype);
|
1176
|
-
}
|
1177
|
-
break;
|
1178
|
-
case 2:
|
1179
|
-
if (ftype == Thrift.Type.STRUCT) {
|
1180
|
-
this.metadata = new metadata_ttypes.AnnotationMetadata();
|
1181
|
-
this.metadata.read(input);
|
1182
|
-
} else {
|
1183
|
-
input.skip(ftype);
|
1184
|
-
}
|
1185
|
-
break;
|
1186
|
-
case 3:
|
1187
|
-
if (ftype == Thrift.Type.LIST) {
|
1188
|
-
this.mentionList = [];
|
1189
|
-
const _rtmp346 = input.readListBegin();
|
1190
|
-
const _size45 = _rtmp346.size || 0;
|
1191
|
-
for (let _i47 = 0; _i47 < _size45; ++_i47) {
|
1192
|
-
let elem48 = null;
|
1193
|
-
elem48 = new ttypes.SituationMention();
|
1194
|
-
elem48.read(input);
|
1195
|
-
this.mentionList.push(elem48);
|
1196
|
-
}
|
1197
|
-
input.readListEnd();
|
1198
|
-
} else {
|
1199
|
-
input.skip(ftype);
|
1200
|
-
}
|
1201
|
-
break;
|
1202
|
-
case 4:
|
1203
|
-
if (ftype == Thrift.Type.LIST) {
|
1204
|
-
this.linkingList = [];
|
1205
|
-
const _rtmp350 = input.readListBegin();
|
1206
|
-
const _size49 = _rtmp350.size || 0;
|
1207
|
-
for (let _i51 = 0; _i51 < _size49; ++_i51) {
|
1208
|
-
let elem52 = null;
|
1209
|
-
elem52 = new linking_ttypes.Linking();
|
1210
|
-
elem52.read(input);
|
1211
|
-
this.linkingList.push(elem52);
|
1212
|
-
}
|
1213
|
-
input.readListEnd();
|
1214
|
-
} else {
|
1215
|
-
input.skip(ftype);
|
1216
|
-
}
|
1217
|
-
break;
|
1218
|
-
default:
|
1219
|
-
input.skip(ftype);
|
1220
|
-
}
|
1221
|
-
input.readFieldEnd();
|
1222
|
-
}
|
1223
|
-
input.readStructEnd();
|
1224
|
-
return;
|
1225
|
-
}
|
1226
|
-
|
1227
|
-
write (output) {
|
1228
|
-
output.writeStructBegin('SituationMentionSet');
|
1229
|
-
if (this.uuid !== null && this.uuid !== undefined) {
|
1230
|
-
output.writeFieldBegin('uuid', Thrift.Type.STRUCT, 1);
|
1231
|
-
this.uuid.write(output);
|
1232
|
-
output.writeFieldEnd();
|
1233
|
-
}
|
1234
|
-
if (this.metadata !== null && this.metadata !== undefined) {
|
1235
|
-
output.writeFieldBegin('metadata', Thrift.Type.STRUCT, 2);
|
1236
|
-
this.metadata.write(output);
|
1237
|
-
output.writeFieldEnd();
|
1238
|
-
}
|
1239
|
-
if (this.mentionList !== null && this.mentionList !== undefined) {
|
1240
|
-
output.writeFieldBegin('mentionList', Thrift.Type.LIST, 3);
|
1241
|
-
output.writeListBegin(Thrift.Type.STRUCT, this.mentionList.length);
|
1242
|
-
for (let iter53 in this.mentionList) {
|
1243
|
-
if (this.mentionList.hasOwnProperty(iter53)) {
|
1244
|
-
iter53 = this.mentionList[iter53];
|
1245
|
-
iter53.write(output);
|
1246
|
-
}
|
1247
|
-
}
|
1248
|
-
output.writeListEnd();
|
1249
|
-
output.writeFieldEnd();
|
1250
|
-
}
|
1251
|
-
if (this.linkingList !== null && this.linkingList !== undefined) {
|
1252
|
-
output.writeFieldBegin('linkingList', Thrift.Type.LIST, 4);
|
1253
|
-
output.writeListBegin(Thrift.Type.STRUCT, this.linkingList.length);
|
1254
|
-
for (let iter54 in this.linkingList) {
|
1255
|
-
if (this.linkingList.hasOwnProperty(iter54)) {
|
1256
|
-
iter54 = this.linkingList[iter54];
|
1257
|
-
iter54.write(output);
|
1258
|
-
}
|
1259
|
-
}
|
1260
|
-
output.writeListEnd();
|
1261
|
-
output.writeFieldEnd();
|
1262
|
-
}
|
1263
|
-
output.writeFieldStop();
|
1264
|
-
output.writeStructEnd();
|
1265
|
-
return;
|
1266
|
-
}
|
1267
|
-
|
1268
|
-
};
|
1
|
+
//
|
2
|
+
// Autogenerated by Thrift Compiler (0.15.0)
|
3
|
+
//
|
4
|
+
// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
5
|
+
//
|
6
|
+
"use strict";
|
7
|
+
|
8
|
+
const thrift = require('thrift');
|
9
|
+
const Thrift = thrift.Thrift;
|
10
|
+
const Int64 = require('node-int64');
|
11
|
+
|
12
|
+
const structure_ttypes = require('./structure_types');
|
13
|
+
const metadata_ttypes = require('./metadata_types');
|
14
|
+
const uuid_ttypes = require('./uuid_types');
|
15
|
+
const linking_ttypes = require('./linking_types');
|
16
|
+
|
17
|
+
|
18
|
+
const ttypes = module.exports = {};
|
19
|
+
const Property = module.exports.Property = class {
|
20
|
+
constructor(args) {
|
21
|
+
this.value = null;
|
22
|
+
this.metadata = null;
|
23
|
+
this.polarity = null;
|
24
|
+
if (args) {
|
25
|
+
if (args.value !== undefined && args.value !== null) {
|
26
|
+
this.value = args.value;
|
27
|
+
} else {
|
28
|
+
throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field value is unset!');
|
29
|
+
}
|
30
|
+
if (args.metadata !== undefined && args.metadata !== null) {
|
31
|
+
this.metadata = new metadata_ttypes.AnnotationMetadata(args.metadata);
|
32
|
+
} else {
|
33
|
+
throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field metadata is unset!');
|
34
|
+
}
|
35
|
+
if (args.polarity !== undefined && args.polarity !== null) {
|
36
|
+
this.polarity = args.polarity;
|
37
|
+
}
|
38
|
+
}
|
39
|
+
}
|
40
|
+
|
41
|
+
read (input) {
|
42
|
+
input.readStructBegin();
|
43
|
+
while (true) {
|
44
|
+
const ret = input.readFieldBegin();
|
45
|
+
const ftype = ret.ftype;
|
46
|
+
const fid = ret.fid;
|
47
|
+
if (ftype == Thrift.Type.STOP) {
|
48
|
+
break;
|
49
|
+
}
|
50
|
+
switch (fid) {
|
51
|
+
case 1:
|
52
|
+
if (ftype == Thrift.Type.STRING) {
|
53
|
+
this.value = input.readString();
|
54
|
+
} else {
|
55
|
+
input.skip(ftype);
|
56
|
+
}
|
57
|
+
break;
|
58
|
+
case 2:
|
59
|
+
if (ftype == Thrift.Type.STRUCT) {
|
60
|
+
this.metadata = new metadata_ttypes.AnnotationMetadata();
|
61
|
+
this.metadata.read(input);
|
62
|
+
} else {
|
63
|
+
input.skip(ftype);
|
64
|
+
}
|
65
|
+
break;
|
66
|
+
case 3:
|
67
|
+
if (ftype == Thrift.Type.DOUBLE) {
|
68
|
+
this.polarity = input.readDouble();
|
69
|
+
} else {
|
70
|
+
input.skip(ftype);
|
71
|
+
}
|
72
|
+
break;
|
73
|
+
default:
|
74
|
+
input.skip(ftype);
|
75
|
+
}
|
76
|
+
input.readFieldEnd();
|
77
|
+
}
|
78
|
+
input.readStructEnd();
|
79
|
+
return;
|
80
|
+
}
|
81
|
+
|
82
|
+
write (output) {
|
83
|
+
output.writeStructBegin('Property');
|
84
|
+
if (this.value !== null && this.value !== undefined) {
|
85
|
+
output.writeFieldBegin('value', Thrift.Type.STRING, 1);
|
86
|
+
output.writeString(this.value);
|
87
|
+
output.writeFieldEnd();
|
88
|
+
}
|
89
|
+
if (this.metadata !== null && this.metadata !== undefined) {
|
90
|
+
output.writeFieldBegin('metadata', Thrift.Type.STRUCT, 2);
|
91
|
+
this.metadata.write(output);
|
92
|
+
output.writeFieldEnd();
|
93
|
+
}
|
94
|
+
if (this.polarity !== null && this.polarity !== undefined) {
|
95
|
+
output.writeFieldBegin('polarity', Thrift.Type.DOUBLE, 3);
|
96
|
+
output.writeDouble(this.polarity);
|
97
|
+
output.writeFieldEnd();
|
98
|
+
}
|
99
|
+
output.writeFieldStop();
|
100
|
+
output.writeStructEnd();
|
101
|
+
return;
|
102
|
+
}
|
103
|
+
|
104
|
+
};
|
105
|
+
const Argument = module.exports.Argument = class {
|
106
|
+
constructor(args) {
|
107
|
+
this.role = null;
|
108
|
+
this.entityId = null;
|
109
|
+
this.situationId = null;
|
110
|
+
this.propertyList = null;
|
111
|
+
if (args) {
|
112
|
+
if (args.role !== undefined && args.role !== null) {
|
113
|
+
this.role = args.role;
|
114
|
+
}
|
115
|
+
if (args.entityId !== undefined && args.entityId !== null) {
|
116
|
+
this.entityId = new uuid_ttypes.UUID(args.entityId);
|
117
|
+
}
|
118
|
+
if (args.situationId !== undefined && args.situationId !== null) {
|
119
|
+
this.situationId = new uuid_ttypes.UUID(args.situationId);
|
120
|
+
}
|
121
|
+
if (args.propertyList !== undefined && args.propertyList !== null) {
|
122
|
+
this.propertyList = Thrift.copyList(args.propertyList, [ttypes.Property]);
|
123
|
+
}
|
124
|
+
}
|
125
|
+
}
|
126
|
+
|
127
|
+
read (input) {
|
128
|
+
input.readStructBegin();
|
129
|
+
while (true) {
|
130
|
+
const ret = input.readFieldBegin();
|
131
|
+
const ftype = ret.ftype;
|
132
|
+
const fid = ret.fid;
|
133
|
+
if (ftype == Thrift.Type.STOP) {
|
134
|
+
break;
|
135
|
+
}
|
136
|
+
switch (fid) {
|
137
|
+
case 1:
|
138
|
+
if (ftype == Thrift.Type.STRING) {
|
139
|
+
this.role = input.readString();
|
140
|
+
} else {
|
141
|
+
input.skip(ftype);
|
142
|
+
}
|
143
|
+
break;
|
144
|
+
case 2:
|
145
|
+
if (ftype == Thrift.Type.STRUCT) {
|
146
|
+
this.entityId = new uuid_ttypes.UUID();
|
147
|
+
this.entityId.read(input);
|
148
|
+
} else {
|
149
|
+
input.skip(ftype);
|
150
|
+
}
|
151
|
+
break;
|
152
|
+
case 3:
|
153
|
+
if (ftype == Thrift.Type.STRUCT) {
|
154
|
+
this.situationId = new uuid_ttypes.UUID();
|
155
|
+
this.situationId.read(input);
|
156
|
+
} else {
|
157
|
+
input.skip(ftype);
|
158
|
+
}
|
159
|
+
break;
|
160
|
+
case 4:
|
161
|
+
if (ftype == Thrift.Type.LIST) {
|
162
|
+
this.propertyList = [];
|
163
|
+
const _rtmp31 = input.readListBegin();
|
164
|
+
const _size0 = _rtmp31.size || 0;
|
165
|
+
for (let _i2 = 0; _i2 < _size0; ++_i2) {
|
166
|
+
let elem3 = null;
|
167
|
+
elem3 = new ttypes.Property();
|
168
|
+
elem3.read(input);
|
169
|
+
this.propertyList.push(elem3);
|
170
|
+
}
|
171
|
+
input.readListEnd();
|
172
|
+
} else {
|
173
|
+
input.skip(ftype);
|
174
|
+
}
|
175
|
+
break;
|
176
|
+
default:
|
177
|
+
input.skip(ftype);
|
178
|
+
}
|
179
|
+
input.readFieldEnd();
|
180
|
+
}
|
181
|
+
input.readStructEnd();
|
182
|
+
return;
|
183
|
+
}
|
184
|
+
|
185
|
+
write (output) {
|
186
|
+
output.writeStructBegin('Argument');
|
187
|
+
if (this.role !== null && this.role !== undefined) {
|
188
|
+
output.writeFieldBegin('role', Thrift.Type.STRING, 1);
|
189
|
+
output.writeString(this.role);
|
190
|
+
output.writeFieldEnd();
|
191
|
+
}
|
192
|
+
if (this.entityId !== null && this.entityId !== undefined) {
|
193
|
+
output.writeFieldBegin('entityId', Thrift.Type.STRUCT, 2);
|
194
|
+
this.entityId.write(output);
|
195
|
+
output.writeFieldEnd();
|
196
|
+
}
|
197
|
+
if (this.situationId !== null && this.situationId !== undefined) {
|
198
|
+
output.writeFieldBegin('situationId', Thrift.Type.STRUCT, 3);
|
199
|
+
this.situationId.write(output);
|
200
|
+
output.writeFieldEnd();
|
201
|
+
}
|
202
|
+
if (this.propertyList !== null && this.propertyList !== undefined) {
|
203
|
+
output.writeFieldBegin('propertyList', Thrift.Type.LIST, 4);
|
204
|
+
output.writeListBegin(Thrift.Type.STRUCT, this.propertyList.length);
|
205
|
+
for (let iter4 in this.propertyList) {
|
206
|
+
if (this.propertyList.hasOwnProperty(iter4)) {
|
207
|
+
iter4 = this.propertyList[iter4];
|
208
|
+
iter4.write(output);
|
209
|
+
}
|
210
|
+
}
|
211
|
+
output.writeListEnd();
|
212
|
+
output.writeFieldEnd();
|
213
|
+
}
|
214
|
+
output.writeFieldStop();
|
215
|
+
output.writeStructEnd();
|
216
|
+
return;
|
217
|
+
}
|
218
|
+
|
219
|
+
};
|
220
|
+
const Justification = module.exports.Justification = class {
|
221
|
+
constructor(args) {
|
222
|
+
this.justificationType = null;
|
223
|
+
this.mentionId = null;
|
224
|
+
this.tokenRefSeqList = null;
|
225
|
+
if (args) {
|
226
|
+
if (args.justificationType !== undefined && args.justificationType !== null) {
|
227
|
+
this.justificationType = args.justificationType;
|
228
|
+
}
|
229
|
+
if (args.mentionId !== undefined && args.mentionId !== null) {
|
230
|
+
this.mentionId = new uuid_ttypes.UUID(args.mentionId);
|
231
|
+
} else {
|
232
|
+
throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field mentionId is unset!');
|
233
|
+
}
|
234
|
+
if (args.tokenRefSeqList !== undefined && args.tokenRefSeqList !== null) {
|
235
|
+
this.tokenRefSeqList = Thrift.copyList(args.tokenRefSeqList, [structure_ttypes.TokenRefSequence]);
|
236
|
+
}
|
237
|
+
}
|
238
|
+
}
|
239
|
+
|
240
|
+
read (input) {
|
241
|
+
input.readStructBegin();
|
242
|
+
while (true) {
|
243
|
+
const ret = input.readFieldBegin();
|
244
|
+
const ftype = ret.ftype;
|
245
|
+
const fid = ret.fid;
|
246
|
+
if (ftype == Thrift.Type.STOP) {
|
247
|
+
break;
|
248
|
+
}
|
249
|
+
switch (fid) {
|
250
|
+
case 1:
|
251
|
+
if (ftype == Thrift.Type.STRING) {
|
252
|
+
this.justificationType = input.readString();
|
253
|
+
} else {
|
254
|
+
input.skip(ftype);
|
255
|
+
}
|
256
|
+
break;
|
257
|
+
case 2:
|
258
|
+
if (ftype == Thrift.Type.STRUCT) {
|
259
|
+
this.mentionId = new uuid_ttypes.UUID();
|
260
|
+
this.mentionId.read(input);
|
261
|
+
} else {
|
262
|
+
input.skip(ftype);
|
263
|
+
}
|
264
|
+
break;
|
265
|
+
case 3:
|
266
|
+
if (ftype == Thrift.Type.LIST) {
|
267
|
+
this.tokenRefSeqList = [];
|
268
|
+
const _rtmp36 = input.readListBegin();
|
269
|
+
const _size5 = _rtmp36.size || 0;
|
270
|
+
for (let _i7 = 0; _i7 < _size5; ++_i7) {
|
271
|
+
let elem8 = null;
|
272
|
+
elem8 = new structure_ttypes.TokenRefSequence();
|
273
|
+
elem8.read(input);
|
274
|
+
this.tokenRefSeqList.push(elem8);
|
275
|
+
}
|
276
|
+
input.readListEnd();
|
277
|
+
} else {
|
278
|
+
input.skip(ftype);
|
279
|
+
}
|
280
|
+
break;
|
281
|
+
default:
|
282
|
+
input.skip(ftype);
|
283
|
+
}
|
284
|
+
input.readFieldEnd();
|
285
|
+
}
|
286
|
+
input.readStructEnd();
|
287
|
+
return;
|
288
|
+
}
|
289
|
+
|
290
|
+
write (output) {
|
291
|
+
output.writeStructBegin('Justification');
|
292
|
+
if (this.justificationType !== null && this.justificationType !== undefined) {
|
293
|
+
output.writeFieldBegin('justificationType', Thrift.Type.STRING, 1);
|
294
|
+
output.writeString(this.justificationType);
|
295
|
+
output.writeFieldEnd();
|
296
|
+
}
|
297
|
+
if (this.mentionId !== null && this.mentionId !== undefined) {
|
298
|
+
output.writeFieldBegin('mentionId', Thrift.Type.STRUCT, 2);
|
299
|
+
this.mentionId.write(output);
|
300
|
+
output.writeFieldEnd();
|
301
|
+
}
|
302
|
+
if (this.tokenRefSeqList !== null && this.tokenRefSeqList !== undefined) {
|
303
|
+
output.writeFieldBegin('tokenRefSeqList', Thrift.Type.LIST, 3);
|
304
|
+
output.writeListBegin(Thrift.Type.STRUCT, this.tokenRefSeqList.length);
|
305
|
+
for (let iter9 in this.tokenRefSeqList) {
|
306
|
+
if (this.tokenRefSeqList.hasOwnProperty(iter9)) {
|
307
|
+
iter9 = this.tokenRefSeqList[iter9];
|
308
|
+
iter9.write(output);
|
309
|
+
}
|
310
|
+
}
|
311
|
+
output.writeListEnd();
|
312
|
+
output.writeFieldEnd();
|
313
|
+
}
|
314
|
+
output.writeFieldStop();
|
315
|
+
output.writeStructEnd();
|
316
|
+
return;
|
317
|
+
}
|
318
|
+
|
319
|
+
};
|
320
|
+
const TimeML = module.exports.TimeML = class {
|
321
|
+
constructor(args) {
|
322
|
+
this.timeMLClass = null;
|
323
|
+
this.timeMLTense = null;
|
324
|
+
this.timeMLAspect = null;
|
325
|
+
if (args) {
|
326
|
+
if (args.timeMLClass !== undefined && args.timeMLClass !== null) {
|
327
|
+
this.timeMLClass = args.timeMLClass;
|
328
|
+
}
|
329
|
+
if (args.timeMLTense !== undefined && args.timeMLTense !== null) {
|
330
|
+
this.timeMLTense = args.timeMLTense;
|
331
|
+
}
|
332
|
+
if (args.timeMLAspect !== undefined && args.timeMLAspect !== null) {
|
333
|
+
this.timeMLAspect = args.timeMLAspect;
|
334
|
+
}
|
335
|
+
}
|
336
|
+
}
|
337
|
+
|
338
|
+
read (input) {
|
339
|
+
input.readStructBegin();
|
340
|
+
while (true) {
|
341
|
+
const ret = input.readFieldBegin();
|
342
|
+
const ftype = ret.ftype;
|
343
|
+
const fid = ret.fid;
|
344
|
+
if (ftype == Thrift.Type.STOP) {
|
345
|
+
break;
|
346
|
+
}
|
347
|
+
switch (fid) {
|
348
|
+
case 1:
|
349
|
+
if (ftype == Thrift.Type.STRING) {
|
350
|
+
this.timeMLClass = input.readString();
|
351
|
+
} else {
|
352
|
+
input.skip(ftype);
|
353
|
+
}
|
354
|
+
break;
|
355
|
+
case 2:
|
356
|
+
if (ftype == Thrift.Type.STRING) {
|
357
|
+
this.timeMLTense = input.readString();
|
358
|
+
} else {
|
359
|
+
input.skip(ftype);
|
360
|
+
}
|
361
|
+
break;
|
362
|
+
case 3:
|
363
|
+
if (ftype == Thrift.Type.STRING) {
|
364
|
+
this.timeMLAspect = input.readString();
|
365
|
+
} else {
|
366
|
+
input.skip(ftype);
|
367
|
+
}
|
368
|
+
break;
|
369
|
+
default:
|
370
|
+
input.skip(ftype);
|
371
|
+
}
|
372
|
+
input.readFieldEnd();
|
373
|
+
}
|
374
|
+
input.readStructEnd();
|
375
|
+
return;
|
376
|
+
}
|
377
|
+
|
378
|
+
write (output) {
|
379
|
+
output.writeStructBegin('TimeML');
|
380
|
+
if (this.timeMLClass !== null && this.timeMLClass !== undefined) {
|
381
|
+
output.writeFieldBegin('timeMLClass', Thrift.Type.STRING, 1);
|
382
|
+
output.writeString(this.timeMLClass);
|
383
|
+
output.writeFieldEnd();
|
384
|
+
}
|
385
|
+
if (this.timeMLTense !== null && this.timeMLTense !== undefined) {
|
386
|
+
output.writeFieldBegin('timeMLTense', Thrift.Type.STRING, 2);
|
387
|
+
output.writeString(this.timeMLTense);
|
388
|
+
output.writeFieldEnd();
|
389
|
+
}
|
390
|
+
if (this.timeMLAspect !== null && this.timeMLAspect !== undefined) {
|
391
|
+
output.writeFieldBegin('timeMLAspect', Thrift.Type.STRING, 3);
|
392
|
+
output.writeString(this.timeMLAspect);
|
393
|
+
output.writeFieldEnd();
|
394
|
+
}
|
395
|
+
output.writeFieldStop();
|
396
|
+
output.writeStructEnd();
|
397
|
+
return;
|
398
|
+
}
|
399
|
+
|
400
|
+
};
|
401
|
+
const Situation = module.exports.Situation = class {
|
402
|
+
constructor(args) {
|
403
|
+
this.uuid = null;
|
404
|
+
this.situationType = null;
|
405
|
+
this.situationKind = null;
|
406
|
+
this.argumentList = null;
|
407
|
+
this.mentionIdList = null;
|
408
|
+
this.justificationList = null;
|
409
|
+
this.timeML = null;
|
410
|
+
this.intensity = null;
|
411
|
+
this.polarity = null;
|
412
|
+
this.confidence = null;
|
413
|
+
if (args) {
|
414
|
+
if (args.uuid !== undefined && args.uuid !== null) {
|
415
|
+
this.uuid = new uuid_ttypes.UUID(args.uuid);
|
416
|
+
} else {
|
417
|
+
throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field uuid is unset!');
|
418
|
+
}
|
419
|
+
if (args.situationType !== undefined && args.situationType !== null) {
|
420
|
+
this.situationType = args.situationType;
|
421
|
+
} else {
|
422
|
+
throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field situationType is unset!');
|
423
|
+
}
|
424
|
+
if (args.situationKind !== undefined && args.situationKind !== null) {
|
425
|
+
this.situationKind = args.situationKind;
|
426
|
+
}
|
427
|
+
if (args.argumentList !== undefined && args.argumentList !== null) {
|
428
|
+
this.argumentList = Thrift.copyList(args.argumentList, [ttypes.Argument]);
|
429
|
+
}
|
430
|
+
if (args.mentionIdList !== undefined && args.mentionIdList !== null) {
|
431
|
+
this.mentionIdList = Thrift.copyList(args.mentionIdList, [uuid_ttypes.UUID]);
|
432
|
+
}
|
433
|
+
if (args.justificationList !== undefined && args.justificationList !== null) {
|
434
|
+
this.justificationList = Thrift.copyList(args.justificationList, [ttypes.Justification]);
|
435
|
+
}
|
436
|
+
if (args.timeML !== undefined && args.timeML !== null) {
|
437
|
+
this.timeML = new ttypes.TimeML(args.timeML);
|
438
|
+
}
|
439
|
+
if (args.intensity !== undefined && args.intensity !== null) {
|
440
|
+
this.intensity = args.intensity;
|
441
|
+
}
|
442
|
+
if (args.polarity !== undefined && args.polarity !== null) {
|
443
|
+
this.polarity = args.polarity;
|
444
|
+
}
|
445
|
+
if (args.confidence !== undefined && args.confidence !== null) {
|
446
|
+
this.confidence = args.confidence;
|
447
|
+
}
|
448
|
+
}
|
449
|
+
}
|
450
|
+
|
451
|
+
read (input) {
|
452
|
+
input.readStructBegin();
|
453
|
+
while (true) {
|
454
|
+
const ret = input.readFieldBegin();
|
455
|
+
const ftype = ret.ftype;
|
456
|
+
const fid = ret.fid;
|
457
|
+
if (ftype == Thrift.Type.STOP) {
|
458
|
+
break;
|
459
|
+
}
|
460
|
+
switch (fid) {
|
461
|
+
case 1:
|
462
|
+
if (ftype == Thrift.Type.STRUCT) {
|
463
|
+
this.uuid = new uuid_ttypes.UUID();
|
464
|
+
this.uuid.read(input);
|
465
|
+
} else {
|
466
|
+
input.skip(ftype);
|
467
|
+
}
|
468
|
+
break;
|
469
|
+
case 2:
|
470
|
+
if (ftype == Thrift.Type.STRING) {
|
471
|
+
this.situationType = input.readString();
|
472
|
+
} else {
|
473
|
+
input.skip(ftype);
|
474
|
+
}
|
475
|
+
break;
|
476
|
+
case 50:
|
477
|
+
if (ftype == Thrift.Type.STRING) {
|
478
|
+
this.situationKind = input.readString();
|
479
|
+
} else {
|
480
|
+
input.skip(ftype);
|
481
|
+
}
|
482
|
+
break;
|
483
|
+
case 3:
|
484
|
+
if (ftype == Thrift.Type.LIST) {
|
485
|
+
this.argumentList = [];
|
486
|
+
const _rtmp311 = input.readListBegin();
|
487
|
+
const _size10 = _rtmp311.size || 0;
|
488
|
+
for (let _i12 = 0; _i12 < _size10; ++_i12) {
|
489
|
+
let elem13 = null;
|
490
|
+
elem13 = new ttypes.Argument();
|
491
|
+
elem13.read(input);
|
492
|
+
this.argumentList.push(elem13);
|
493
|
+
}
|
494
|
+
input.readListEnd();
|
495
|
+
} else {
|
496
|
+
input.skip(ftype);
|
497
|
+
}
|
498
|
+
break;
|
499
|
+
case 4:
|
500
|
+
if (ftype == Thrift.Type.LIST) {
|
501
|
+
this.mentionIdList = [];
|
502
|
+
const _rtmp315 = input.readListBegin();
|
503
|
+
const _size14 = _rtmp315.size || 0;
|
504
|
+
for (let _i16 = 0; _i16 < _size14; ++_i16) {
|
505
|
+
let elem17 = null;
|
506
|
+
elem17 = new uuid_ttypes.UUID();
|
507
|
+
elem17.read(input);
|
508
|
+
this.mentionIdList.push(elem17);
|
509
|
+
}
|
510
|
+
input.readListEnd();
|
511
|
+
} else {
|
512
|
+
input.skip(ftype);
|
513
|
+
}
|
514
|
+
break;
|
515
|
+
case 5:
|
516
|
+
if (ftype == Thrift.Type.LIST) {
|
517
|
+
this.justificationList = [];
|
518
|
+
const _rtmp319 = input.readListBegin();
|
519
|
+
const _size18 = _rtmp319.size || 0;
|
520
|
+
for (let _i20 = 0; _i20 < _size18; ++_i20) {
|
521
|
+
let elem21 = null;
|
522
|
+
elem21 = new ttypes.Justification();
|
523
|
+
elem21.read(input);
|
524
|
+
this.justificationList.push(elem21);
|
525
|
+
}
|
526
|
+
input.readListEnd();
|
527
|
+
} else {
|
528
|
+
input.skip(ftype);
|
529
|
+
}
|
530
|
+
break;
|
531
|
+
case 54:
|
532
|
+
if (ftype == Thrift.Type.STRUCT) {
|
533
|
+
this.timeML = new ttypes.TimeML();
|
534
|
+
this.timeML.read(input);
|
535
|
+
} else {
|
536
|
+
input.skip(ftype);
|
537
|
+
}
|
538
|
+
break;
|
539
|
+
case 100:
|
540
|
+
if (ftype == Thrift.Type.DOUBLE) {
|
541
|
+
this.intensity = input.readDouble();
|
542
|
+
} else {
|
543
|
+
input.skip(ftype);
|
544
|
+
}
|
545
|
+
break;
|
546
|
+
case 101:
|
547
|
+
if (ftype == Thrift.Type.STRING) {
|
548
|
+
this.polarity = input.readString();
|
549
|
+
} else {
|
550
|
+
input.skip(ftype);
|
551
|
+
}
|
552
|
+
break;
|
553
|
+
case 200:
|
554
|
+
if (ftype == Thrift.Type.DOUBLE) {
|
555
|
+
this.confidence = input.readDouble();
|
556
|
+
} else {
|
557
|
+
input.skip(ftype);
|
558
|
+
}
|
559
|
+
break;
|
560
|
+
default:
|
561
|
+
input.skip(ftype);
|
562
|
+
}
|
563
|
+
input.readFieldEnd();
|
564
|
+
}
|
565
|
+
input.readStructEnd();
|
566
|
+
return;
|
567
|
+
}
|
568
|
+
|
569
|
+
write (output) {
|
570
|
+
output.writeStructBegin('Situation');
|
571
|
+
if (this.uuid !== null && this.uuid !== undefined) {
|
572
|
+
output.writeFieldBegin('uuid', Thrift.Type.STRUCT, 1);
|
573
|
+
this.uuid.write(output);
|
574
|
+
output.writeFieldEnd();
|
575
|
+
}
|
576
|
+
if (this.situationType !== null && this.situationType !== undefined) {
|
577
|
+
output.writeFieldBegin('situationType', Thrift.Type.STRING, 2);
|
578
|
+
output.writeString(this.situationType);
|
579
|
+
output.writeFieldEnd();
|
580
|
+
}
|
581
|
+
if (this.situationKind !== null && this.situationKind !== undefined) {
|
582
|
+
output.writeFieldBegin('situationKind', Thrift.Type.STRING, 50);
|
583
|
+
output.writeString(this.situationKind);
|
584
|
+
output.writeFieldEnd();
|
585
|
+
}
|
586
|
+
if (this.argumentList !== null && this.argumentList !== undefined) {
|
587
|
+
output.writeFieldBegin('argumentList', Thrift.Type.LIST, 3);
|
588
|
+
output.writeListBegin(Thrift.Type.STRUCT, this.argumentList.length);
|
589
|
+
for (let iter22 in this.argumentList) {
|
590
|
+
if (this.argumentList.hasOwnProperty(iter22)) {
|
591
|
+
iter22 = this.argumentList[iter22];
|
592
|
+
iter22.write(output);
|
593
|
+
}
|
594
|
+
}
|
595
|
+
output.writeListEnd();
|
596
|
+
output.writeFieldEnd();
|
597
|
+
}
|
598
|
+
if (this.mentionIdList !== null && this.mentionIdList !== undefined) {
|
599
|
+
output.writeFieldBegin('mentionIdList', Thrift.Type.LIST, 4);
|
600
|
+
output.writeListBegin(Thrift.Type.STRUCT, this.mentionIdList.length);
|
601
|
+
for (let iter23 in this.mentionIdList) {
|
602
|
+
if (this.mentionIdList.hasOwnProperty(iter23)) {
|
603
|
+
iter23 = this.mentionIdList[iter23];
|
604
|
+
iter23.write(output);
|
605
|
+
}
|
606
|
+
}
|
607
|
+
output.writeListEnd();
|
608
|
+
output.writeFieldEnd();
|
609
|
+
}
|
610
|
+
if (this.justificationList !== null && this.justificationList !== undefined) {
|
611
|
+
output.writeFieldBegin('justificationList', Thrift.Type.LIST, 5);
|
612
|
+
output.writeListBegin(Thrift.Type.STRUCT, this.justificationList.length);
|
613
|
+
for (let iter24 in this.justificationList) {
|
614
|
+
if (this.justificationList.hasOwnProperty(iter24)) {
|
615
|
+
iter24 = this.justificationList[iter24];
|
616
|
+
iter24.write(output);
|
617
|
+
}
|
618
|
+
}
|
619
|
+
output.writeListEnd();
|
620
|
+
output.writeFieldEnd();
|
621
|
+
}
|
622
|
+
if (this.timeML !== null && this.timeML !== undefined) {
|
623
|
+
output.writeFieldBegin('timeML', Thrift.Type.STRUCT, 54);
|
624
|
+
this.timeML.write(output);
|
625
|
+
output.writeFieldEnd();
|
626
|
+
}
|
627
|
+
if (this.intensity !== null && this.intensity !== undefined) {
|
628
|
+
output.writeFieldBegin('intensity', Thrift.Type.DOUBLE, 100);
|
629
|
+
output.writeDouble(this.intensity);
|
630
|
+
output.writeFieldEnd();
|
631
|
+
}
|
632
|
+
if (this.polarity !== null && this.polarity !== undefined) {
|
633
|
+
output.writeFieldBegin('polarity', Thrift.Type.STRING, 101);
|
634
|
+
output.writeString(this.polarity);
|
635
|
+
output.writeFieldEnd();
|
636
|
+
}
|
637
|
+
if (this.confidence !== null && this.confidence !== undefined) {
|
638
|
+
output.writeFieldBegin('confidence', Thrift.Type.DOUBLE, 200);
|
639
|
+
output.writeDouble(this.confidence);
|
640
|
+
output.writeFieldEnd();
|
641
|
+
}
|
642
|
+
output.writeFieldStop();
|
643
|
+
output.writeStructEnd();
|
644
|
+
return;
|
645
|
+
}
|
646
|
+
|
647
|
+
};
|
648
|
+
const SituationSet = module.exports.SituationSet = class {
|
649
|
+
constructor(args) {
|
650
|
+
this.uuid = null;
|
651
|
+
this.metadata = null;
|
652
|
+
this.situationList = null;
|
653
|
+
this.linkingList = null;
|
654
|
+
if (args) {
|
655
|
+
if (args.uuid !== undefined && args.uuid !== null) {
|
656
|
+
this.uuid = new uuid_ttypes.UUID(args.uuid);
|
657
|
+
} else {
|
658
|
+
throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field uuid is unset!');
|
659
|
+
}
|
660
|
+
if (args.metadata !== undefined && args.metadata !== null) {
|
661
|
+
this.metadata = new metadata_ttypes.AnnotationMetadata(args.metadata);
|
662
|
+
} else {
|
663
|
+
throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field metadata is unset!');
|
664
|
+
}
|
665
|
+
if (args.situationList !== undefined && args.situationList !== null) {
|
666
|
+
this.situationList = Thrift.copyList(args.situationList, [ttypes.Situation]);
|
667
|
+
} else {
|
668
|
+
throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field situationList is unset!');
|
669
|
+
}
|
670
|
+
if (args.linkingList !== undefined && args.linkingList !== null) {
|
671
|
+
this.linkingList = Thrift.copyList(args.linkingList, [linking_ttypes.Linking]);
|
672
|
+
}
|
673
|
+
}
|
674
|
+
}
|
675
|
+
|
676
|
+
read (input) {
|
677
|
+
input.readStructBegin();
|
678
|
+
while (true) {
|
679
|
+
const ret = input.readFieldBegin();
|
680
|
+
const ftype = ret.ftype;
|
681
|
+
const fid = ret.fid;
|
682
|
+
if (ftype == Thrift.Type.STOP) {
|
683
|
+
break;
|
684
|
+
}
|
685
|
+
switch (fid) {
|
686
|
+
case 1:
|
687
|
+
if (ftype == Thrift.Type.STRUCT) {
|
688
|
+
this.uuid = new uuid_ttypes.UUID();
|
689
|
+
this.uuid.read(input);
|
690
|
+
} else {
|
691
|
+
input.skip(ftype);
|
692
|
+
}
|
693
|
+
break;
|
694
|
+
case 2:
|
695
|
+
if (ftype == Thrift.Type.STRUCT) {
|
696
|
+
this.metadata = new metadata_ttypes.AnnotationMetadata();
|
697
|
+
this.metadata.read(input);
|
698
|
+
} else {
|
699
|
+
input.skip(ftype);
|
700
|
+
}
|
701
|
+
break;
|
702
|
+
case 3:
|
703
|
+
if (ftype == Thrift.Type.LIST) {
|
704
|
+
this.situationList = [];
|
705
|
+
const _rtmp326 = input.readListBegin();
|
706
|
+
const _size25 = _rtmp326.size || 0;
|
707
|
+
for (let _i27 = 0; _i27 < _size25; ++_i27) {
|
708
|
+
let elem28 = null;
|
709
|
+
elem28 = new ttypes.Situation();
|
710
|
+
elem28.read(input);
|
711
|
+
this.situationList.push(elem28);
|
712
|
+
}
|
713
|
+
input.readListEnd();
|
714
|
+
} else {
|
715
|
+
input.skip(ftype);
|
716
|
+
}
|
717
|
+
break;
|
718
|
+
case 4:
|
719
|
+
if (ftype == Thrift.Type.LIST) {
|
720
|
+
this.linkingList = [];
|
721
|
+
const _rtmp330 = input.readListBegin();
|
722
|
+
const _size29 = _rtmp330.size || 0;
|
723
|
+
for (let _i31 = 0; _i31 < _size29; ++_i31) {
|
724
|
+
let elem32 = null;
|
725
|
+
elem32 = new linking_ttypes.Linking();
|
726
|
+
elem32.read(input);
|
727
|
+
this.linkingList.push(elem32);
|
728
|
+
}
|
729
|
+
input.readListEnd();
|
730
|
+
} else {
|
731
|
+
input.skip(ftype);
|
732
|
+
}
|
733
|
+
break;
|
734
|
+
default:
|
735
|
+
input.skip(ftype);
|
736
|
+
}
|
737
|
+
input.readFieldEnd();
|
738
|
+
}
|
739
|
+
input.readStructEnd();
|
740
|
+
return;
|
741
|
+
}
|
742
|
+
|
743
|
+
write (output) {
|
744
|
+
output.writeStructBegin('SituationSet');
|
745
|
+
if (this.uuid !== null && this.uuid !== undefined) {
|
746
|
+
output.writeFieldBegin('uuid', Thrift.Type.STRUCT, 1);
|
747
|
+
this.uuid.write(output);
|
748
|
+
output.writeFieldEnd();
|
749
|
+
}
|
750
|
+
if (this.metadata !== null && this.metadata !== undefined) {
|
751
|
+
output.writeFieldBegin('metadata', Thrift.Type.STRUCT, 2);
|
752
|
+
this.metadata.write(output);
|
753
|
+
output.writeFieldEnd();
|
754
|
+
}
|
755
|
+
if (this.situationList !== null && this.situationList !== undefined) {
|
756
|
+
output.writeFieldBegin('situationList', Thrift.Type.LIST, 3);
|
757
|
+
output.writeListBegin(Thrift.Type.STRUCT, this.situationList.length);
|
758
|
+
for (let iter33 in this.situationList) {
|
759
|
+
if (this.situationList.hasOwnProperty(iter33)) {
|
760
|
+
iter33 = this.situationList[iter33];
|
761
|
+
iter33.write(output);
|
762
|
+
}
|
763
|
+
}
|
764
|
+
output.writeListEnd();
|
765
|
+
output.writeFieldEnd();
|
766
|
+
}
|
767
|
+
if (this.linkingList !== null && this.linkingList !== undefined) {
|
768
|
+
output.writeFieldBegin('linkingList', Thrift.Type.LIST, 4);
|
769
|
+
output.writeListBegin(Thrift.Type.STRUCT, this.linkingList.length);
|
770
|
+
for (let iter34 in this.linkingList) {
|
771
|
+
if (this.linkingList.hasOwnProperty(iter34)) {
|
772
|
+
iter34 = this.linkingList[iter34];
|
773
|
+
iter34.write(output);
|
774
|
+
}
|
775
|
+
}
|
776
|
+
output.writeListEnd();
|
777
|
+
output.writeFieldEnd();
|
778
|
+
}
|
779
|
+
output.writeFieldStop();
|
780
|
+
output.writeStructEnd();
|
781
|
+
return;
|
782
|
+
}
|
783
|
+
|
784
|
+
};
|
785
|
+
const MentionArgument = module.exports.MentionArgument = class {
|
786
|
+
constructor(args) {
|
787
|
+
this.role = null;
|
788
|
+
this.entityMentionId = null;
|
789
|
+
this.situationMentionId = null;
|
790
|
+
this.tokens = null;
|
791
|
+
this.confidence = null;
|
792
|
+
this.propertyList = null;
|
793
|
+
if (args) {
|
794
|
+
if (args.role !== undefined && args.role !== null) {
|
795
|
+
this.role = args.role;
|
796
|
+
}
|
797
|
+
if (args.entityMentionId !== undefined && args.entityMentionId !== null) {
|
798
|
+
this.entityMentionId = new uuid_ttypes.UUID(args.entityMentionId);
|
799
|
+
}
|
800
|
+
if (args.situationMentionId !== undefined && args.situationMentionId !== null) {
|
801
|
+
this.situationMentionId = new uuid_ttypes.UUID(args.situationMentionId);
|
802
|
+
}
|
803
|
+
if (args.tokens !== undefined && args.tokens !== null) {
|
804
|
+
this.tokens = new structure_ttypes.TokenRefSequence(args.tokens);
|
805
|
+
}
|
806
|
+
if (args.confidence !== undefined && args.confidence !== null) {
|
807
|
+
this.confidence = args.confidence;
|
808
|
+
}
|
809
|
+
if (args.propertyList !== undefined && args.propertyList !== null) {
|
810
|
+
this.propertyList = Thrift.copyList(args.propertyList, [ttypes.Property]);
|
811
|
+
}
|
812
|
+
}
|
813
|
+
}
|
814
|
+
|
815
|
+
read (input) {
|
816
|
+
input.readStructBegin();
|
817
|
+
while (true) {
|
818
|
+
const ret = input.readFieldBegin();
|
819
|
+
const ftype = ret.ftype;
|
820
|
+
const fid = ret.fid;
|
821
|
+
if (ftype == Thrift.Type.STOP) {
|
822
|
+
break;
|
823
|
+
}
|
824
|
+
switch (fid) {
|
825
|
+
case 1:
|
826
|
+
if (ftype == Thrift.Type.STRING) {
|
827
|
+
this.role = input.readString();
|
828
|
+
} else {
|
829
|
+
input.skip(ftype);
|
830
|
+
}
|
831
|
+
break;
|
832
|
+
case 2:
|
833
|
+
if (ftype == Thrift.Type.STRUCT) {
|
834
|
+
this.entityMentionId = new uuid_ttypes.UUID();
|
835
|
+
this.entityMentionId.read(input);
|
836
|
+
} else {
|
837
|
+
input.skip(ftype);
|
838
|
+
}
|
839
|
+
break;
|
840
|
+
case 3:
|
841
|
+
if (ftype == Thrift.Type.STRUCT) {
|
842
|
+
this.situationMentionId = new uuid_ttypes.UUID();
|
843
|
+
this.situationMentionId.read(input);
|
844
|
+
} else {
|
845
|
+
input.skip(ftype);
|
846
|
+
}
|
847
|
+
break;
|
848
|
+
case 4:
|
849
|
+
if (ftype == Thrift.Type.STRUCT) {
|
850
|
+
this.tokens = new structure_ttypes.TokenRefSequence();
|
851
|
+
this.tokens.read(input);
|
852
|
+
} else {
|
853
|
+
input.skip(ftype);
|
854
|
+
}
|
855
|
+
break;
|
856
|
+
case 5:
|
857
|
+
if (ftype == Thrift.Type.DOUBLE) {
|
858
|
+
this.confidence = input.readDouble();
|
859
|
+
} else {
|
860
|
+
input.skip(ftype);
|
861
|
+
}
|
862
|
+
break;
|
863
|
+
case 6:
|
864
|
+
if (ftype == Thrift.Type.LIST) {
|
865
|
+
this.propertyList = [];
|
866
|
+
const _rtmp336 = input.readListBegin();
|
867
|
+
const _size35 = _rtmp336.size || 0;
|
868
|
+
for (let _i37 = 0; _i37 < _size35; ++_i37) {
|
869
|
+
let elem38 = null;
|
870
|
+
elem38 = new ttypes.Property();
|
871
|
+
elem38.read(input);
|
872
|
+
this.propertyList.push(elem38);
|
873
|
+
}
|
874
|
+
input.readListEnd();
|
875
|
+
} else {
|
876
|
+
input.skip(ftype);
|
877
|
+
}
|
878
|
+
break;
|
879
|
+
default:
|
880
|
+
input.skip(ftype);
|
881
|
+
}
|
882
|
+
input.readFieldEnd();
|
883
|
+
}
|
884
|
+
input.readStructEnd();
|
885
|
+
return;
|
886
|
+
}
|
887
|
+
|
888
|
+
write (output) {
|
889
|
+
output.writeStructBegin('MentionArgument');
|
890
|
+
if (this.role !== null && this.role !== undefined) {
|
891
|
+
output.writeFieldBegin('role', Thrift.Type.STRING, 1);
|
892
|
+
output.writeString(this.role);
|
893
|
+
output.writeFieldEnd();
|
894
|
+
}
|
895
|
+
if (this.entityMentionId !== null && this.entityMentionId !== undefined) {
|
896
|
+
output.writeFieldBegin('entityMentionId', Thrift.Type.STRUCT, 2);
|
897
|
+
this.entityMentionId.write(output);
|
898
|
+
output.writeFieldEnd();
|
899
|
+
}
|
900
|
+
if (this.situationMentionId !== null && this.situationMentionId !== undefined) {
|
901
|
+
output.writeFieldBegin('situationMentionId', Thrift.Type.STRUCT, 3);
|
902
|
+
this.situationMentionId.write(output);
|
903
|
+
output.writeFieldEnd();
|
904
|
+
}
|
905
|
+
if (this.tokens !== null && this.tokens !== undefined) {
|
906
|
+
output.writeFieldBegin('tokens', Thrift.Type.STRUCT, 4);
|
907
|
+
this.tokens.write(output);
|
908
|
+
output.writeFieldEnd();
|
909
|
+
}
|
910
|
+
if (this.confidence !== null && this.confidence !== undefined) {
|
911
|
+
output.writeFieldBegin('confidence', Thrift.Type.DOUBLE, 5);
|
912
|
+
output.writeDouble(this.confidence);
|
913
|
+
output.writeFieldEnd();
|
914
|
+
}
|
915
|
+
if (this.propertyList !== null && this.propertyList !== undefined) {
|
916
|
+
output.writeFieldBegin('propertyList', Thrift.Type.LIST, 6);
|
917
|
+
output.writeListBegin(Thrift.Type.STRUCT, this.propertyList.length);
|
918
|
+
for (let iter39 in this.propertyList) {
|
919
|
+
if (this.propertyList.hasOwnProperty(iter39)) {
|
920
|
+
iter39 = this.propertyList[iter39];
|
921
|
+
iter39.write(output);
|
922
|
+
}
|
923
|
+
}
|
924
|
+
output.writeListEnd();
|
925
|
+
output.writeFieldEnd();
|
926
|
+
}
|
927
|
+
output.writeFieldStop();
|
928
|
+
output.writeStructEnd();
|
929
|
+
return;
|
930
|
+
}
|
931
|
+
|
932
|
+
};
|
933
|
+
const SituationMention = module.exports.SituationMention = class {
|
934
|
+
constructor(args) {
|
935
|
+
this.uuid = null;
|
936
|
+
this.text = null;
|
937
|
+
this.situationType = null;
|
938
|
+
this.situationKind = null;
|
939
|
+
this.argumentList = null;
|
940
|
+
this.intensity = null;
|
941
|
+
this.polarity = null;
|
942
|
+
this.tokens = null;
|
943
|
+
this.confidence = null;
|
944
|
+
if (args) {
|
945
|
+
if (args.uuid !== undefined && args.uuid !== null) {
|
946
|
+
this.uuid = new uuid_ttypes.UUID(args.uuid);
|
947
|
+
} else {
|
948
|
+
throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field uuid is unset!');
|
949
|
+
}
|
950
|
+
if (args.text !== undefined && args.text !== null) {
|
951
|
+
this.text = args.text;
|
952
|
+
}
|
953
|
+
if (args.situationType !== undefined && args.situationType !== null) {
|
954
|
+
this.situationType = args.situationType;
|
955
|
+
}
|
956
|
+
if (args.situationKind !== undefined && args.situationKind !== null) {
|
957
|
+
this.situationKind = args.situationKind;
|
958
|
+
}
|
959
|
+
if (args.argumentList !== undefined && args.argumentList !== null) {
|
960
|
+
this.argumentList = Thrift.copyList(args.argumentList, [ttypes.MentionArgument]);
|
961
|
+
} else {
|
962
|
+
throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field argumentList is unset!');
|
963
|
+
}
|
964
|
+
if (args.intensity !== undefined && args.intensity !== null) {
|
965
|
+
this.intensity = args.intensity;
|
966
|
+
}
|
967
|
+
if (args.polarity !== undefined && args.polarity !== null) {
|
968
|
+
this.polarity = args.polarity;
|
969
|
+
}
|
970
|
+
if (args.tokens !== undefined && args.tokens !== null) {
|
971
|
+
this.tokens = new structure_ttypes.TokenRefSequence(args.tokens);
|
972
|
+
}
|
973
|
+
if (args.confidence !== undefined && args.confidence !== null) {
|
974
|
+
this.confidence = args.confidence;
|
975
|
+
}
|
976
|
+
}
|
977
|
+
}
|
978
|
+
|
979
|
+
read (input) {
|
980
|
+
input.readStructBegin();
|
981
|
+
while (true) {
|
982
|
+
const ret = input.readFieldBegin();
|
983
|
+
const ftype = ret.ftype;
|
984
|
+
const fid = ret.fid;
|
985
|
+
if (ftype == Thrift.Type.STOP) {
|
986
|
+
break;
|
987
|
+
}
|
988
|
+
switch (fid) {
|
989
|
+
case 1:
|
990
|
+
if (ftype == Thrift.Type.STRUCT) {
|
991
|
+
this.uuid = new uuid_ttypes.UUID();
|
992
|
+
this.uuid.read(input);
|
993
|
+
} else {
|
994
|
+
input.skip(ftype);
|
995
|
+
}
|
996
|
+
break;
|
997
|
+
case 2:
|
998
|
+
if (ftype == Thrift.Type.STRING) {
|
999
|
+
this.text = input.readString();
|
1000
|
+
} else {
|
1001
|
+
input.skip(ftype);
|
1002
|
+
}
|
1003
|
+
break;
|
1004
|
+
case 3:
|
1005
|
+
if (ftype == Thrift.Type.STRING) {
|
1006
|
+
this.situationType = input.readString();
|
1007
|
+
} else {
|
1008
|
+
input.skip(ftype);
|
1009
|
+
}
|
1010
|
+
break;
|
1011
|
+
case 50:
|
1012
|
+
if (ftype == Thrift.Type.STRING) {
|
1013
|
+
this.situationKind = input.readString();
|
1014
|
+
} else {
|
1015
|
+
input.skip(ftype);
|
1016
|
+
}
|
1017
|
+
break;
|
1018
|
+
case 4:
|
1019
|
+
if (ftype == Thrift.Type.LIST) {
|
1020
|
+
this.argumentList = [];
|
1021
|
+
const _rtmp341 = input.readListBegin();
|
1022
|
+
const _size40 = _rtmp341.size || 0;
|
1023
|
+
for (let _i42 = 0; _i42 < _size40; ++_i42) {
|
1024
|
+
let elem43 = null;
|
1025
|
+
elem43 = new ttypes.MentionArgument();
|
1026
|
+
elem43.read(input);
|
1027
|
+
this.argumentList.push(elem43);
|
1028
|
+
}
|
1029
|
+
input.readListEnd();
|
1030
|
+
} else {
|
1031
|
+
input.skip(ftype);
|
1032
|
+
}
|
1033
|
+
break;
|
1034
|
+
case 100:
|
1035
|
+
if (ftype == Thrift.Type.DOUBLE) {
|
1036
|
+
this.intensity = input.readDouble();
|
1037
|
+
} else {
|
1038
|
+
input.skip(ftype);
|
1039
|
+
}
|
1040
|
+
break;
|
1041
|
+
case 101:
|
1042
|
+
if (ftype == Thrift.Type.STRING) {
|
1043
|
+
this.polarity = input.readString();
|
1044
|
+
} else {
|
1045
|
+
input.skip(ftype);
|
1046
|
+
}
|
1047
|
+
break;
|
1048
|
+
case 150:
|
1049
|
+
if (ftype == Thrift.Type.STRUCT) {
|
1050
|
+
this.tokens = new structure_ttypes.TokenRefSequence();
|
1051
|
+
this.tokens.read(input);
|
1052
|
+
} else {
|
1053
|
+
input.skip(ftype);
|
1054
|
+
}
|
1055
|
+
break;
|
1056
|
+
case 200:
|
1057
|
+
if (ftype == Thrift.Type.DOUBLE) {
|
1058
|
+
this.confidence = input.readDouble();
|
1059
|
+
} else {
|
1060
|
+
input.skip(ftype);
|
1061
|
+
}
|
1062
|
+
break;
|
1063
|
+
default:
|
1064
|
+
input.skip(ftype);
|
1065
|
+
}
|
1066
|
+
input.readFieldEnd();
|
1067
|
+
}
|
1068
|
+
input.readStructEnd();
|
1069
|
+
return;
|
1070
|
+
}
|
1071
|
+
|
1072
|
+
write (output) {
|
1073
|
+
output.writeStructBegin('SituationMention');
|
1074
|
+
if (this.uuid !== null && this.uuid !== undefined) {
|
1075
|
+
output.writeFieldBegin('uuid', Thrift.Type.STRUCT, 1);
|
1076
|
+
this.uuid.write(output);
|
1077
|
+
output.writeFieldEnd();
|
1078
|
+
}
|
1079
|
+
if (this.text !== null && this.text !== undefined) {
|
1080
|
+
output.writeFieldBegin('text', Thrift.Type.STRING, 2);
|
1081
|
+
output.writeString(this.text);
|
1082
|
+
output.writeFieldEnd();
|
1083
|
+
}
|
1084
|
+
if (this.situationType !== null && this.situationType !== undefined) {
|
1085
|
+
output.writeFieldBegin('situationType', Thrift.Type.STRING, 3);
|
1086
|
+
output.writeString(this.situationType);
|
1087
|
+
output.writeFieldEnd();
|
1088
|
+
}
|
1089
|
+
if (this.situationKind !== null && this.situationKind !== undefined) {
|
1090
|
+
output.writeFieldBegin('situationKind', Thrift.Type.STRING, 50);
|
1091
|
+
output.writeString(this.situationKind);
|
1092
|
+
output.writeFieldEnd();
|
1093
|
+
}
|
1094
|
+
if (this.argumentList !== null && this.argumentList !== undefined) {
|
1095
|
+
output.writeFieldBegin('argumentList', Thrift.Type.LIST, 4);
|
1096
|
+
output.writeListBegin(Thrift.Type.STRUCT, this.argumentList.length);
|
1097
|
+
for (let iter44 in this.argumentList) {
|
1098
|
+
if (this.argumentList.hasOwnProperty(iter44)) {
|
1099
|
+
iter44 = this.argumentList[iter44];
|
1100
|
+
iter44.write(output);
|
1101
|
+
}
|
1102
|
+
}
|
1103
|
+
output.writeListEnd();
|
1104
|
+
output.writeFieldEnd();
|
1105
|
+
}
|
1106
|
+
if (this.intensity !== null && this.intensity !== undefined) {
|
1107
|
+
output.writeFieldBegin('intensity', Thrift.Type.DOUBLE, 100);
|
1108
|
+
output.writeDouble(this.intensity);
|
1109
|
+
output.writeFieldEnd();
|
1110
|
+
}
|
1111
|
+
if (this.polarity !== null && this.polarity !== undefined) {
|
1112
|
+
output.writeFieldBegin('polarity', Thrift.Type.STRING, 101);
|
1113
|
+
output.writeString(this.polarity);
|
1114
|
+
output.writeFieldEnd();
|
1115
|
+
}
|
1116
|
+
if (this.tokens !== null && this.tokens !== undefined) {
|
1117
|
+
output.writeFieldBegin('tokens', Thrift.Type.STRUCT, 150);
|
1118
|
+
this.tokens.write(output);
|
1119
|
+
output.writeFieldEnd();
|
1120
|
+
}
|
1121
|
+
if (this.confidence !== null && this.confidence !== undefined) {
|
1122
|
+
output.writeFieldBegin('confidence', Thrift.Type.DOUBLE, 200);
|
1123
|
+
output.writeDouble(this.confidence);
|
1124
|
+
output.writeFieldEnd();
|
1125
|
+
}
|
1126
|
+
output.writeFieldStop();
|
1127
|
+
output.writeStructEnd();
|
1128
|
+
return;
|
1129
|
+
}
|
1130
|
+
|
1131
|
+
};
|
1132
|
+
const SituationMentionSet = module.exports.SituationMentionSet = class {
|
1133
|
+
constructor(args) {
|
1134
|
+
this.uuid = null;
|
1135
|
+
this.metadata = null;
|
1136
|
+
this.mentionList = null;
|
1137
|
+
this.linkingList = null;
|
1138
|
+
if (args) {
|
1139
|
+
if (args.uuid !== undefined && args.uuid !== null) {
|
1140
|
+
this.uuid = new uuid_ttypes.UUID(args.uuid);
|
1141
|
+
} else {
|
1142
|
+
throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field uuid is unset!');
|
1143
|
+
}
|
1144
|
+
if (args.metadata !== undefined && args.metadata !== null) {
|
1145
|
+
this.metadata = new metadata_ttypes.AnnotationMetadata(args.metadata);
|
1146
|
+
} else {
|
1147
|
+
throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field metadata is unset!');
|
1148
|
+
}
|
1149
|
+
if (args.mentionList !== undefined && args.mentionList !== null) {
|
1150
|
+
this.mentionList = Thrift.copyList(args.mentionList, [ttypes.SituationMention]);
|
1151
|
+
} else {
|
1152
|
+
throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field mentionList is unset!');
|
1153
|
+
}
|
1154
|
+
if (args.linkingList !== undefined && args.linkingList !== null) {
|
1155
|
+
this.linkingList = Thrift.copyList(args.linkingList, [linking_ttypes.Linking]);
|
1156
|
+
}
|
1157
|
+
}
|
1158
|
+
}
|
1159
|
+
|
1160
|
+
read (input) {
|
1161
|
+
input.readStructBegin();
|
1162
|
+
while (true) {
|
1163
|
+
const ret = input.readFieldBegin();
|
1164
|
+
const ftype = ret.ftype;
|
1165
|
+
const fid = ret.fid;
|
1166
|
+
if (ftype == Thrift.Type.STOP) {
|
1167
|
+
break;
|
1168
|
+
}
|
1169
|
+
switch (fid) {
|
1170
|
+
case 1:
|
1171
|
+
if (ftype == Thrift.Type.STRUCT) {
|
1172
|
+
this.uuid = new uuid_ttypes.UUID();
|
1173
|
+
this.uuid.read(input);
|
1174
|
+
} else {
|
1175
|
+
input.skip(ftype);
|
1176
|
+
}
|
1177
|
+
break;
|
1178
|
+
case 2:
|
1179
|
+
if (ftype == Thrift.Type.STRUCT) {
|
1180
|
+
this.metadata = new metadata_ttypes.AnnotationMetadata();
|
1181
|
+
this.metadata.read(input);
|
1182
|
+
} else {
|
1183
|
+
input.skip(ftype);
|
1184
|
+
}
|
1185
|
+
break;
|
1186
|
+
case 3:
|
1187
|
+
if (ftype == Thrift.Type.LIST) {
|
1188
|
+
this.mentionList = [];
|
1189
|
+
const _rtmp346 = input.readListBegin();
|
1190
|
+
const _size45 = _rtmp346.size || 0;
|
1191
|
+
for (let _i47 = 0; _i47 < _size45; ++_i47) {
|
1192
|
+
let elem48 = null;
|
1193
|
+
elem48 = new ttypes.SituationMention();
|
1194
|
+
elem48.read(input);
|
1195
|
+
this.mentionList.push(elem48);
|
1196
|
+
}
|
1197
|
+
input.readListEnd();
|
1198
|
+
} else {
|
1199
|
+
input.skip(ftype);
|
1200
|
+
}
|
1201
|
+
break;
|
1202
|
+
case 4:
|
1203
|
+
if (ftype == Thrift.Type.LIST) {
|
1204
|
+
this.linkingList = [];
|
1205
|
+
const _rtmp350 = input.readListBegin();
|
1206
|
+
const _size49 = _rtmp350.size || 0;
|
1207
|
+
for (let _i51 = 0; _i51 < _size49; ++_i51) {
|
1208
|
+
let elem52 = null;
|
1209
|
+
elem52 = new linking_ttypes.Linking();
|
1210
|
+
elem52.read(input);
|
1211
|
+
this.linkingList.push(elem52);
|
1212
|
+
}
|
1213
|
+
input.readListEnd();
|
1214
|
+
} else {
|
1215
|
+
input.skip(ftype);
|
1216
|
+
}
|
1217
|
+
break;
|
1218
|
+
default:
|
1219
|
+
input.skip(ftype);
|
1220
|
+
}
|
1221
|
+
input.readFieldEnd();
|
1222
|
+
}
|
1223
|
+
input.readStructEnd();
|
1224
|
+
return;
|
1225
|
+
}
|
1226
|
+
|
1227
|
+
write (output) {
|
1228
|
+
output.writeStructBegin('SituationMentionSet');
|
1229
|
+
if (this.uuid !== null && this.uuid !== undefined) {
|
1230
|
+
output.writeFieldBegin('uuid', Thrift.Type.STRUCT, 1);
|
1231
|
+
this.uuid.write(output);
|
1232
|
+
output.writeFieldEnd();
|
1233
|
+
}
|
1234
|
+
if (this.metadata !== null && this.metadata !== undefined) {
|
1235
|
+
output.writeFieldBegin('metadata', Thrift.Type.STRUCT, 2);
|
1236
|
+
this.metadata.write(output);
|
1237
|
+
output.writeFieldEnd();
|
1238
|
+
}
|
1239
|
+
if (this.mentionList !== null && this.mentionList !== undefined) {
|
1240
|
+
output.writeFieldBegin('mentionList', Thrift.Type.LIST, 3);
|
1241
|
+
output.writeListBegin(Thrift.Type.STRUCT, this.mentionList.length);
|
1242
|
+
for (let iter53 in this.mentionList) {
|
1243
|
+
if (this.mentionList.hasOwnProperty(iter53)) {
|
1244
|
+
iter53 = this.mentionList[iter53];
|
1245
|
+
iter53.write(output);
|
1246
|
+
}
|
1247
|
+
}
|
1248
|
+
output.writeListEnd();
|
1249
|
+
output.writeFieldEnd();
|
1250
|
+
}
|
1251
|
+
if (this.linkingList !== null && this.linkingList !== undefined) {
|
1252
|
+
output.writeFieldBegin('linkingList', Thrift.Type.LIST, 4);
|
1253
|
+
output.writeListBegin(Thrift.Type.STRUCT, this.linkingList.length);
|
1254
|
+
for (let iter54 in this.linkingList) {
|
1255
|
+
if (this.linkingList.hasOwnProperty(iter54)) {
|
1256
|
+
iter54 = this.linkingList[iter54];
|
1257
|
+
iter54.write(output);
|
1258
|
+
}
|
1259
|
+
}
|
1260
|
+
output.writeListEnd();
|
1261
|
+
output.writeFieldEnd();
|
1262
|
+
}
|
1263
|
+
output.writeFieldStop();
|
1264
|
+
output.writeStructEnd();
|
1265
|
+
return;
|
1266
|
+
}
|
1267
|
+
|
1268
|
+
};
|