@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/cluster_types.js
CHANGED
@@ -1,398 +1,398 @@
|
|
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 uuid_ttypes = require('./uuid_types');
|
13
|
-
const metadata_ttypes = require('./metadata_types');
|
14
|
-
|
15
|
-
|
16
|
-
const ttypes = module.exports = {};
|
17
|
-
const ClusterMember = module.exports.ClusterMember = class {
|
18
|
-
constructor(args) {
|
19
|
-
this.communicationId = null;
|
20
|
-
this.setId = null;
|
21
|
-
this.elementId = null;
|
22
|
-
if (args) {
|
23
|
-
if (args.communicationId !== undefined && args.communicationId !== null) {
|
24
|
-
this.communicationId = new uuid_ttypes.UUID(args.communicationId);
|
25
|
-
} else {
|
26
|
-
throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field communicationId is unset!');
|
27
|
-
}
|
28
|
-
if (args.setId !== undefined && args.setId !== null) {
|
29
|
-
this.setId = new uuid_ttypes.UUID(args.setId);
|
30
|
-
} else {
|
31
|
-
throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field setId is unset!');
|
32
|
-
}
|
33
|
-
if (args.elementId !== undefined && args.elementId !== null) {
|
34
|
-
this.elementId = new uuid_ttypes.UUID(args.elementId);
|
35
|
-
} else {
|
36
|
-
throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field elementId is unset!');
|
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.STRUCT) {
|
53
|
-
this.communicationId = new uuid_ttypes.UUID();
|
54
|
-
this.communicationId.read(input);
|
55
|
-
} else {
|
56
|
-
input.skip(ftype);
|
57
|
-
}
|
58
|
-
break;
|
59
|
-
case 2:
|
60
|
-
if (ftype == Thrift.Type.STRUCT) {
|
61
|
-
this.setId = new uuid_ttypes.UUID();
|
62
|
-
this.setId.read(input);
|
63
|
-
} else {
|
64
|
-
input.skip(ftype);
|
65
|
-
}
|
66
|
-
break;
|
67
|
-
case 3:
|
68
|
-
if (ftype == Thrift.Type.STRUCT) {
|
69
|
-
this.elementId = new uuid_ttypes.UUID();
|
70
|
-
this.elementId.read(input);
|
71
|
-
} else {
|
72
|
-
input.skip(ftype);
|
73
|
-
}
|
74
|
-
break;
|
75
|
-
default:
|
76
|
-
input.skip(ftype);
|
77
|
-
}
|
78
|
-
input.readFieldEnd();
|
79
|
-
}
|
80
|
-
input.readStructEnd();
|
81
|
-
return;
|
82
|
-
}
|
83
|
-
|
84
|
-
write (output) {
|
85
|
-
output.writeStructBegin('ClusterMember');
|
86
|
-
if (this.communicationId !== null && this.communicationId !== undefined) {
|
87
|
-
output.writeFieldBegin('communicationId', Thrift.Type.STRUCT, 1);
|
88
|
-
this.communicationId.write(output);
|
89
|
-
output.writeFieldEnd();
|
90
|
-
}
|
91
|
-
if (this.setId !== null && this.setId !== undefined) {
|
92
|
-
output.writeFieldBegin('setId', Thrift.Type.STRUCT, 2);
|
93
|
-
this.setId.write(output);
|
94
|
-
output.writeFieldEnd();
|
95
|
-
}
|
96
|
-
if (this.elementId !== null && this.elementId !== undefined) {
|
97
|
-
output.writeFieldBegin('elementId', Thrift.Type.STRUCT, 3);
|
98
|
-
this.elementId.write(output);
|
99
|
-
output.writeFieldEnd();
|
100
|
-
}
|
101
|
-
output.writeFieldStop();
|
102
|
-
output.writeStructEnd();
|
103
|
-
return;
|
104
|
-
}
|
105
|
-
|
106
|
-
};
|
107
|
-
const Cluster = module.exports.Cluster = class {
|
108
|
-
constructor(args) {
|
109
|
-
this.clusterMemberIndexList = null;
|
110
|
-
this.confidenceList = null;
|
111
|
-
this.childIndexList = null;
|
112
|
-
if (args) {
|
113
|
-
if (args.clusterMemberIndexList !== undefined && args.clusterMemberIndexList !== null) {
|
114
|
-
this.clusterMemberIndexList = Thrift.copyList(args.clusterMemberIndexList, [null]);
|
115
|
-
}
|
116
|
-
if (args.confidenceList !== undefined && args.confidenceList !== null) {
|
117
|
-
this.confidenceList = Thrift.copyList(args.confidenceList, [null]);
|
118
|
-
}
|
119
|
-
if (args.childIndexList !== undefined && args.childIndexList !== null) {
|
120
|
-
this.childIndexList = Thrift.copyList(args.childIndexList, [null]);
|
121
|
-
}
|
122
|
-
}
|
123
|
-
}
|
124
|
-
|
125
|
-
read (input) {
|
126
|
-
input.readStructBegin();
|
127
|
-
while (true) {
|
128
|
-
const ret = input.readFieldBegin();
|
129
|
-
const ftype = ret.ftype;
|
130
|
-
const fid = ret.fid;
|
131
|
-
if (ftype == Thrift.Type.STOP) {
|
132
|
-
break;
|
133
|
-
}
|
134
|
-
switch (fid) {
|
135
|
-
case 1:
|
136
|
-
if (ftype == Thrift.Type.LIST) {
|
137
|
-
this.clusterMemberIndexList = [];
|
138
|
-
const _rtmp31 = input.readListBegin();
|
139
|
-
const _size0 = _rtmp31.size || 0;
|
140
|
-
for (let _i2 = 0; _i2 < _size0; ++_i2) {
|
141
|
-
let elem3 = null;
|
142
|
-
elem3 = input.readI32();
|
143
|
-
this.clusterMemberIndexList.push(elem3);
|
144
|
-
}
|
145
|
-
input.readListEnd();
|
146
|
-
} else {
|
147
|
-
input.skip(ftype);
|
148
|
-
}
|
149
|
-
break;
|
150
|
-
case 2:
|
151
|
-
if (ftype == Thrift.Type.LIST) {
|
152
|
-
this.confidenceList = [];
|
153
|
-
const _rtmp35 = input.readListBegin();
|
154
|
-
const _size4 = _rtmp35.size || 0;
|
155
|
-
for (let _i6 = 0; _i6 < _size4; ++_i6) {
|
156
|
-
let elem7 = null;
|
157
|
-
elem7 = input.readDouble();
|
158
|
-
this.confidenceList.push(elem7);
|
159
|
-
}
|
160
|
-
input.readListEnd();
|
161
|
-
} else {
|
162
|
-
input.skip(ftype);
|
163
|
-
}
|
164
|
-
break;
|
165
|
-
case 3:
|
166
|
-
if (ftype == Thrift.Type.LIST) {
|
167
|
-
this.childIndexList = [];
|
168
|
-
const _rtmp39 = input.readListBegin();
|
169
|
-
const _size8 = _rtmp39.size || 0;
|
170
|
-
for (let _i10 = 0; _i10 < _size8; ++_i10) {
|
171
|
-
let elem11 = null;
|
172
|
-
elem11 = input.readI32();
|
173
|
-
this.childIndexList.push(elem11);
|
174
|
-
}
|
175
|
-
input.readListEnd();
|
176
|
-
} else {
|
177
|
-
input.skip(ftype);
|
178
|
-
}
|
179
|
-
break;
|
180
|
-
default:
|
181
|
-
input.skip(ftype);
|
182
|
-
}
|
183
|
-
input.readFieldEnd();
|
184
|
-
}
|
185
|
-
input.readStructEnd();
|
186
|
-
return;
|
187
|
-
}
|
188
|
-
|
189
|
-
write (output) {
|
190
|
-
output.writeStructBegin('Cluster');
|
191
|
-
if (this.clusterMemberIndexList !== null && this.clusterMemberIndexList !== undefined) {
|
192
|
-
output.writeFieldBegin('clusterMemberIndexList', Thrift.Type.LIST, 1);
|
193
|
-
output.writeListBegin(Thrift.Type.I32, this.clusterMemberIndexList.length);
|
194
|
-
for (let iter12 in this.clusterMemberIndexList) {
|
195
|
-
if (this.clusterMemberIndexList.hasOwnProperty(iter12)) {
|
196
|
-
iter12 = this.clusterMemberIndexList[iter12];
|
197
|
-
output.writeI32(iter12);
|
198
|
-
}
|
199
|
-
}
|
200
|
-
output.writeListEnd();
|
201
|
-
output.writeFieldEnd();
|
202
|
-
}
|
203
|
-
if (this.confidenceList !== null && this.confidenceList !== undefined) {
|
204
|
-
output.writeFieldBegin('confidenceList', Thrift.Type.LIST, 2);
|
205
|
-
output.writeListBegin(Thrift.Type.DOUBLE, this.confidenceList.length);
|
206
|
-
for (let iter13 in this.confidenceList) {
|
207
|
-
if (this.confidenceList.hasOwnProperty(iter13)) {
|
208
|
-
iter13 = this.confidenceList[iter13];
|
209
|
-
output.writeDouble(iter13);
|
210
|
-
}
|
211
|
-
}
|
212
|
-
output.writeListEnd();
|
213
|
-
output.writeFieldEnd();
|
214
|
-
}
|
215
|
-
if (this.childIndexList !== null && this.childIndexList !== undefined) {
|
216
|
-
output.writeFieldBegin('childIndexList', Thrift.Type.LIST, 3);
|
217
|
-
output.writeListBegin(Thrift.Type.I32, this.childIndexList.length);
|
218
|
-
for (let iter14 in this.childIndexList) {
|
219
|
-
if (this.childIndexList.hasOwnProperty(iter14)) {
|
220
|
-
iter14 = this.childIndexList[iter14];
|
221
|
-
output.writeI32(iter14);
|
222
|
-
}
|
223
|
-
}
|
224
|
-
output.writeListEnd();
|
225
|
-
output.writeFieldEnd();
|
226
|
-
}
|
227
|
-
output.writeFieldStop();
|
228
|
-
output.writeStructEnd();
|
229
|
-
return;
|
230
|
-
}
|
231
|
-
|
232
|
-
};
|
233
|
-
const Clustering = module.exports.Clustering = class {
|
234
|
-
constructor(args) {
|
235
|
-
this.uuid = null;
|
236
|
-
this.metadata = null;
|
237
|
-
this.clusterMemberList = null;
|
238
|
-
this.clusterList = null;
|
239
|
-
this.rootClusterIndexList = null;
|
240
|
-
if (args) {
|
241
|
-
if (args.uuid !== undefined && args.uuid !== null) {
|
242
|
-
this.uuid = new uuid_ttypes.UUID(args.uuid);
|
243
|
-
} else {
|
244
|
-
throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field uuid is unset!');
|
245
|
-
}
|
246
|
-
if (args.metadata !== undefined && args.metadata !== null) {
|
247
|
-
this.metadata = new metadata_ttypes.AnnotationMetadata(args.metadata);
|
248
|
-
} else {
|
249
|
-
throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field metadata is unset!');
|
250
|
-
}
|
251
|
-
if (args.clusterMemberList !== undefined && args.clusterMemberList !== null) {
|
252
|
-
this.clusterMemberList = Thrift.copyList(args.clusterMemberList, [ttypes.ClusterMember]);
|
253
|
-
}
|
254
|
-
if (args.clusterList !== undefined && args.clusterList !== null) {
|
255
|
-
this.clusterList = Thrift.copyList(args.clusterList, [ttypes.Cluster]);
|
256
|
-
}
|
257
|
-
if (args.rootClusterIndexList !== undefined && args.rootClusterIndexList !== null) {
|
258
|
-
this.rootClusterIndexList = Thrift.copyList(args.rootClusterIndexList, [null]);
|
259
|
-
}
|
260
|
-
}
|
261
|
-
}
|
262
|
-
|
263
|
-
read (input) {
|
264
|
-
input.readStructBegin();
|
265
|
-
while (true) {
|
266
|
-
const ret = input.readFieldBegin();
|
267
|
-
const ftype = ret.ftype;
|
268
|
-
const fid = ret.fid;
|
269
|
-
if (ftype == Thrift.Type.STOP) {
|
270
|
-
break;
|
271
|
-
}
|
272
|
-
switch (fid) {
|
273
|
-
case 1:
|
274
|
-
if (ftype == Thrift.Type.STRUCT) {
|
275
|
-
this.uuid = new uuid_ttypes.UUID();
|
276
|
-
this.uuid.read(input);
|
277
|
-
} else {
|
278
|
-
input.skip(ftype);
|
279
|
-
}
|
280
|
-
break;
|
281
|
-
case 2:
|
282
|
-
if (ftype == Thrift.Type.STRUCT) {
|
283
|
-
this.metadata = new metadata_ttypes.AnnotationMetadata();
|
284
|
-
this.metadata.read(input);
|
285
|
-
} else {
|
286
|
-
input.skip(ftype);
|
287
|
-
}
|
288
|
-
break;
|
289
|
-
case 3:
|
290
|
-
if (ftype == Thrift.Type.LIST) {
|
291
|
-
this.clusterMemberList = [];
|
292
|
-
const _rtmp316 = input.readListBegin();
|
293
|
-
const _size15 = _rtmp316.size || 0;
|
294
|
-
for (let _i17 = 0; _i17 < _size15; ++_i17) {
|
295
|
-
let elem18 = null;
|
296
|
-
elem18 = new ttypes.ClusterMember();
|
297
|
-
elem18.read(input);
|
298
|
-
this.clusterMemberList.push(elem18);
|
299
|
-
}
|
300
|
-
input.readListEnd();
|
301
|
-
} else {
|
302
|
-
input.skip(ftype);
|
303
|
-
}
|
304
|
-
break;
|
305
|
-
case 4:
|
306
|
-
if (ftype == Thrift.Type.LIST) {
|
307
|
-
this.clusterList = [];
|
308
|
-
const _rtmp320 = input.readListBegin();
|
309
|
-
const _size19 = _rtmp320.size || 0;
|
310
|
-
for (let _i21 = 0; _i21 < _size19; ++_i21) {
|
311
|
-
let elem22 = null;
|
312
|
-
elem22 = new ttypes.Cluster();
|
313
|
-
elem22.read(input);
|
314
|
-
this.clusterList.push(elem22);
|
315
|
-
}
|
316
|
-
input.readListEnd();
|
317
|
-
} else {
|
318
|
-
input.skip(ftype);
|
319
|
-
}
|
320
|
-
break;
|
321
|
-
case 5:
|
322
|
-
if (ftype == Thrift.Type.LIST) {
|
323
|
-
this.rootClusterIndexList = [];
|
324
|
-
const _rtmp324 = input.readListBegin();
|
325
|
-
const _size23 = _rtmp324.size || 0;
|
326
|
-
for (let _i25 = 0; _i25 < _size23; ++_i25) {
|
327
|
-
let elem26 = null;
|
328
|
-
elem26 = input.readI32();
|
329
|
-
this.rootClusterIndexList.push(elem26);
|
330
|
-
}
|
331
|
-
input.readListEnd();
|
332
|
-
} else {
|
333
|
-
input.skip(ftype);
|
334
|
-
}
|
335
|
-
break;
|
336
|
-
default:
|
337
|
-
input.skip(ftype);
|
338
|
-
}
|
339
|
-
input.readFieldEnd();
|
340
|
-
}
|
341
|
-
input.readStructEnd();
|
342
|
-
return;
|
343
|
-
}
|
344
|
-
|
345
|
-
write (output) {
|
346
|
-
output.writeStructBegin('Clustering');
|
347
|
-
if (this.uuid !== null && this.uuid !== undefined) {
|
348
|
-
output.writeFieldBegin('uuid', Thrift.Type.STRUCT, 1);
|
349
|
-
this.uuid.write(output);
|
350
|
-
output.writeFieldEnd();
|
351
|
-
}
|
352
|
-
if (this.metadata !== null && this.metadata !== undefined) {
|
353
|
-
output.writeFieldBegin('metadata', Thrift.Type.STRUCT, 2);
|
354
|
-
this.metadata.write(output);
|
355
|
-
output.writeFieldEnd();
|
356
|
-
}
|
357
|
-
if (this.clusterMemberList !== null && this.clusterMemberList !== undefined) {
|
358
|
-
output.writeFieldBegin('clusterMemberList', Thrift.Type.LIST, 3);
|
359
|
-
output.writeListBegin(Thrift.Type.STRUCT, this.clusterMemberList.length);
|
360
|
-
for (let iter27 in this.clusterMemberList) {
|
361
|
-
if (this.clusterMemberList.hasOwnProperty(iter27)) {
|
362
|
-
iter27 = this.clusterMemberList[iter27];
|
363
|
-
iter27.write(output);
|
364
|
-
}
|
365
|
-
}
|
366
|
-
output.writeListEnd();
|
367
|
-
output.writeFieldEnd();
|
368
|
-
}
|
369
|
-
if (this.clusterList !== null && this.clusterList !== undefined) {
|
370
|
-
output.writeFieldBegin('clusterList', Thrift.Type.LIST, 4);
|
371
|
-
output.writeListBegin(Thrift.Type.STRUCT, this.clusterList.length);
|
372
|
-
for (let iter28 in this.clusterList) {
|
373
|
-
if (this.clusterList.hasOwnProperty(iter28)) {
|
374
|
-
iter28 = this.clusterList[iter28];
|
375
|
-
iter28.write(output);
|
376
|
-
}
|
377
|
-
}
|
378
|
-
output.writeListEnd();
|
379
|
-
output.writeFieldEnd();
|
380
|
-
}
|
381
|
-
if (this.rootClusterIndexList !== null && this.rootClusterIndexList !== undefined) {
|
382
|
-
output.writeFieldBegin('rootClusterIndexList', Thrift.Type.LIST, 5);
|
383
|
-
output.writeListBegin(Thrift.Type.I32, this.rootClusterIndexList.length);
|
384
|
-
for (let iter29 in this.rootClusterIndexList) {
|
385
|
-
if (this.rootClusterIndexList.hasOwnProperty(iter29)) {
|
386
|
-
iter29 = this.rootClusterIndexList[iter29];
|
387
|
-
output.writeI32(iter29);
|
388
|
-
}
|
389
|
-
}
|
390
|
-
output.writeListEnd();
|
391
|
-
output.writeFieldEnd();
|
392
|
-
}
|
393
|
-
output.writeFieldStop();
|
394
|
-
output.writeStructEnd();
|
395
|
-
return;
|
396
|
-
}
|
397
|
-
|
398
|
-
};
|
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 uuid_ttypes = require('./uuid_types');
|
13
|
+
const metadata_ttypes = require('./metadata_types');
|
14
|
+
|
15
|
+
|
16
|
+
const ttypes = module.exports = {};
|
17
|
+
const ClusterMember = module.exports.ClusterMember = class {
|
18
|
+
constructor(args) {
|
19
|
+
this.communicationId = null;
|
20
|
+
this.setId = null;
|
21
|
+
this.elementId = null;
|
22
|
+
if (args) {
|
23
|
+
if (args.communicationId !== undefined && args.communicationId !== null) {
|
24
|
+
this.communicationId = new uuid_ttypes.UUID(args.communicationId);
|
25
|
+
} else {
|
26
|
+
throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field communicationId is unset!');
|
27
|
+
}
|
28
|
+
if (args.setId !== undefined && args.setId !== null) {
|
29
|
+
this.setId = new uuid_ttypes.UUID(args.setId);
|
30
|
+
} else {
|
31
|
+
throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field setId is unset!');
|
32
|
+
}
|
33
|
+
if (args.elementId !== undefined && args.elementId !== null) {
|
34
|
+
this.elementId = new uuid_ttypes.UUID(args.elementId);
|
35
|
+
} else {
|
36
|
+
throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field elementId is unset!');
|
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.STRUCT) {
|
53
|
+
this.communicationId = new uuid_ttypes.UUID();
|
54
|
+
this.communicationId.read(input);
|
55
|
+
} else {
|
56
|
+
input.skip(ftype);
|
57
|
+
}
|
58
|
+
break;
|
59
|
+
case 2:
|
60
|
+
if (ftype == Thrift.Type.STRUCT) {
|
61
|
+
this.setId = new uuid_ttypes.UUID();
|
62
|
+
this.setId.read(input);
|
63
|
+
} else {
|
64
|
+
input.skip(ftype);
|
65
|
+
}
|
66
|
+
break;
|
67
|
+
case 3:
|
68
|
+
if (ftype == Thrift.Type.STRUCT) {
|
69
|
+
this.elementId = new uuid_ttypes.UUID();
|
70
|
+
this.elementId.read(input);
|
71
|
+
} else {
|
72
|
+
input.skip(ftype);
|
73
|
+
}
|
74
|
+
break;
|
75
|
+
default:
|
76
|
+
input.skip(ftype);
|
77
|
+
}
|
78
|
+
input.readFieldEnd();
|
79
|
+
}
|
80
|
+
input.readStructEnd();
|
81
|
+
return;
|
82
|
+
}
|
83
|
+
|
84
|
+
write (output) {
|
85
|
+
output.writeStructBegin('ClusterMember');
|
86
|
+
if (this.communicationId !== null && this.communicationId !== undefined) {
|
87
|
+
output.writeFieldBegin('communicationId', Thrift.Type.STRUCT, 1);
|
88
|
+
this.communicationId.write(output);
|
89
|
+
output.writeFieldEnd();
|
90
|
+
}
|
91
|
+
if (this.setId !== null && this.setId !== undefined) {
|
92
|
+
output.writeFieldBegin('setId', Thrift.Type.STRUCT, 2);
|
93
|
+
this.setId.write(output);
|
94
|
+
output.writeFieldEnd();
|
95
|
+
}
|
96
|
+
if (this.elementId !== null && this.elementId !== undefined) {
|
97
|
+
output.writeFieldBegin('elementId', Thrift.Type.STRUCT, 3);
|
98
|
+
this.elementId.write(output);
|
99
|
+
output.writeFieldEnd();
|
100
|
+
}
|
101
|
+
output.writeFieldStop();
|
102
|
+
output.writeStructEnd();
|
103
|
+
return;
|
104
|
+
}
|
105
|
+
|
106
|
+
};
|
107
|
+
const Cluster = module.exports.Cluster = class {
|
108
|
+
constructor(args) {
|
109
|
+
this.clusterMemberIndexList = null;
|
110
|
+
this.confidenceList = null;
|
111
|
+
this.childIndexList = null;
|
112
|
+
if (args) {
|
113
|
+
if (args.clusterMemberIndexList !== undefined && args.clusterMemberIndexList !== null) {
|
114
|
+
this.clusterMemberIndexList = Thrift.copyList(args.clusterMemberIndexList, [null]);
|
115
|
+
}
|
116
|
+
if (args.confidenceList !== undefined && args.confidenceList !== null) {
|
117
|
+
this.confidenceList = Thrift.copyList(args.confidenceList, [null]);
|
118
|
+
}
|
119
|
+
if (args.childIndexList !== undefined && args.childIndexList !== null) {
|
120
|
+
this.childIndexList = Thrift.copyList(args.childIndexList, [null]);
|
121
|
+
}
|
122
|
+
}
|
123
|
+
}
|
124
|
+
|
125
|
+
read (input) {
|
126
|
+
input.readStructBegin();
|
127
|
+
while (true) {
|
128
|
+
const ret = input.readFieldBegin();
|
129
|
+
const ftype = ret.ftype;
|
130
|
+
const fid = ret.fid;
|
131
|
+
if (ftype == Thrift.Type.STOP) {
|
132
|
+
break;
|
133
|
+
}
|
134
|
+
switch (fid) {
|
135
|
+
case 1:
|
136
|
+
if (ftype == Thrift.Type.LIST) {
|
137
|
+
this.clusterMemberIndexList = [];
|
138
|
+
const _rtmp31 = input.readListBegin();
|
139
|
+
const _size0 = _rtmp31.size || 0;
|
140
|
+
for (let _i2 = 0; _i2 < _size0; ++_i2) {
|
141
|
+
let elem3 = null;
|
142
|
+
elem3 = input.readI32();
|
143
|
+
this.clusterMemberIndexList.push(elem3);
|
144
|
+
}
|
145
|
+
input.readListEnd();
|
146
|
+
} else {
|
147
|
+
input.skip(ftype);
|
148
|
+
}
|
149
|
+
break;
|
150
|
+
case 2:
|
151
|
+
if (ftype == Thrift.Type.LIST) {
|
152
|
+
this.confidenceList = [];
|
153
|
+
const _rtmp35 = input.readListBegin();
|
154
|
+
const _size4 = _rtmp35.size || 0;
|
155
|
+
for (let _i6 = 0; _i6 < _size4; ++_i6) {
|
156
|
+
let elem7 = null;
|
157
|
+
elem7 = input.readDouble();
|
158
|
+
this.confidenceList.push(elem7);
|
159
|
+
}
|
160
|
+
input.readListEnd();
|
161
|
+
} else {
|
162
|
+
input.skip(ftype);
|
163
|
+
}
|
164
|
+
break;
|
165
|
+
case 3:
|
166
|
+
if (ftype == Thrift.Type.LIST) {
|
167
|
+
this.childIndexList = [];
|
168
|
+
const _rtmp39 = input.readListBegin();
|
169
|
+
const _size8 = _rtmp39.size || 0;
|
170
|
+
for (let _i10 = 0; _i10 < _size8; ++_i10) {
|
171
|
+
let elem11 = null;
|
172
|
+
elem11 = input.readI32();
|
173
|
+
this.childIndexList.push(elem11);
|
174
|
+
}
|
175
|
+
input.readListEnd();
|
176
|
+
} else {
|
177
|
+
input.skip(ftype);
|
178
|
+
}
|
179
|
+
break;
|
180
|
+
default:
|
181
|
+
input.skip(ftype);
|
182
|
+
}
|
183
|
+
input.readFieldEnd();
|
184
|
+
}
|
185
|
+
input.readStructEnd();
|
186
|
+
return;
|
187
|
+
}
|
188
|
+
|
189
|
+
write (output) {
|
190
|
+
output.writeStructBegin('Cluster');
|
191
|
+
if (this.clusterMemberIndexList !== null && this.clusterMemberIndexList !== undefined) {
|
192
|
+
output.writeFieldBegin('clusterMemberIndexList', Thrift.Type.LIST, 1);
|
193
|
+
output.writeListBegin(Thrift.Type.I32, this.clusterMemberIndexList.length);
|
194
|
+
for (let iter12 in this.clusterMemberIndexList) {
|
195
|
+
if (this.clusterMemberIndexList.hasOwnProperty(iter12)) {
|
196
|
+
iter12 = this.clusterMemberIndexList[iter12];
|
197
|
+
output.writeI32(iter12);
|
198
|
+
}
|
199
|
+
}
|
200
|
+
output.writeListEnd();
|
201
|
+
output.writeFieldEnd();
|
202
|
+
}
|
203
|
+
if (this.confidenceList !== null && this.confidenceList !== undefined) {
|
204
|
+
output.writeFieldBegin('confidenceList', Thrift.Type.LIST, 2);
|
205
|
+
output.writeListBegin(Thrift.Type.DOUBLE, this.confidenceList.length);
|
206
|
+
for (let iter13 in this.confidenceList) {
|
207
|
+
if (this.confidenceList.hasOwnProperty(iter13)) {
|
208
|
+
iter13 = this.confidenceList[iter13];
|
209
|
+
output.writeDouble(iter13);
|
210
|
+
}
|
211
|
+
}
|
212
|
+
output.writeListEnd();
|
213
|
+
output.writeFieldEnd();
|
214
|
+
}
|
215
|
+
if (this.childIndexList !== null && this.childIndexList !== undefined) {
|
216
|
+
output.writeFieldBegin('childIndexList', Thrift.Type.LIST, 3);
|
217
|
+
output.writeListBegin(Thrift.Type.I32, this.childIndexList.length);
|
218
|
+
for (let iter14 in this.childIndexList) {
|
219
|
+
if (this.childIndexList.hasOwnProperty(iter14)) {
|
220
|
+
iter14 = this.childIndexList[iter14];
|
221
|
+
output.writeI32(iter14);
|
222
|
+
}
|
223
|
+
}
|
224
|
+
output.writeListEnd();
|
225
|
+
output.writeFieldEnd();
|
226
|
+
}
|
227
|
+
output.writeFieldStop();
|
228
|
+
output.writeStructEnd();
|
229
|
+
return;
|
230
|
+
}
|
231
|
+
|
232
|
+
};
|
233
|
+
const Clustering = module.exports.Clustering = class {
|
234
|
+
constructor(args) {
|
235
|
+
this.uuid = null;
|
236
|
+
this.metadata = null;
|
237
|
+
this.clusterMemberList = null;
|
238
|
+
this.clusterList = null;
|
239
|
+
this.rootClusterIndexList = null;
|
240
|
+
if (args) {
|
241
|
+
if (args.uuid !== undefined && args.uuid !== null) {
|
242
|
+
this.uuid = new uuid_ttypes.UUID(args.uuid);
|
243
|
+
} else {
|
244
|
+
throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field uuid is unset!');
|
245
|
+
}
|
246
|
+
if (args.metadata !== undefined && args.metadata !== null) {
|
247
|
+
this.metadata = new metadata_ttypes.AnnotationMetadata(args.metadata);
|
248
|
+
} else {
|
249
|
+
throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field metadata is unset!');
|
250
|
+
}
|
251
|
+
if (args.clusterMemberList !== undefined && args.clusterMemberList !== null) {
|
252
|
+
this.clusterMemberList = Thrift.copyList(args.clusterMemberList, [ttypes.ClusterMember]);
|
253
|
+
}
|
254
|
+
if (args.clusterList !== undefined && args.clusterList !== null) {
|
255
|
+
this.clusterList = Thrift.copyList(args.clusterList, [ttypes.Cluster]);
|
256
|
+
}
|
257
|
+
if (args.rootClusterIndexList !== undefined && args.rootClusterIndexList !== null) {
|
258
|
+
this.rootClusterIndexList = Thrift.copyList(args.rootClusterIndexList, [null]);
|
259
|
+
}
|
260
|
+
}
|
261
|
+
}
|
262
|
+
|
263
|
+
read (input) {
|
264
|
+
input.readStructBegin();
|
265
|
+
while (true) {
|
266
|
+
const ret = input.readFieldBegin();
|
267
|
+
const ftype = ret.ftype;
|
268
|
+
const fid = ret.fid;
|
269
|
+
if (ftype == Thrift.Type.STOP) {
|
270
|
+
break;
|
271
|
+
}
|
272
|
+
switch (fid) {
|
273
|
+
case 1:
|
274
|
+
if (ftype == Thrift.Type.STRUCT) {
|
275
|
+
this.uuid = new uuid_ttypes.UUID();
|
276
|
+
this.uuid.read(input);
|
277
|
+
} else {
|
278
|
+
input.skip(ftype);
|
279
|
+
}
|
280
|
+
break;
|
281
|
+
case 2:
|
282
|
+
if (ftype == Thrift.Type.STRUCT) {
|
283
|
+
this.metadata = new metadata_ttypes.AnnotationMetadata();
|
284
|
+
this.metadata.read(input);
|
285
|
+
} else {
|
286
|
+
input.skip(ftype);
|
287
|
+
}
|
288
|
+
break;
|
289
|
+
case 3:
|
290
|
+
if (ftype == Thrift.Type.LIST) {
|
291
|
+
this.clusterMemberList = [];
|
292
|
+
const _rtmp316 = input.readListBegin();
|
293
|
+
const _size15 = _rtmp316.size || 0;
|
294
|
+
for (let _i17 = 0; _i17 < _size15; ++_i17) {
|
295
|
+
let elem18 = null;
|
296
|
+
elem18 = new ttypes.ClusterMember();
|
297
|
+
elem18.read(input);
|
298
|
+
this.clusterMemberList.push(elem18);
|
299
|
+
}
|
300
|
+
input.readListEnd();
|
301
|
+
} else {
|
302
|
+
input.skip(ftype);
|
303
|
+
}
|
304
|
+
break;
|
305
|
+
case 4:
|
306
|
+
if (ftype == Thrift.Type.LIST) {
|
307
|
+
this.clusterList = [];
|
308
|
+
const _rtmp320 = input.readListBegin();
|
309
|
+
const _size19 = _rtmp320.size || 0;
|
310
|
+
for (let _i21 = 0; _i21 < _size19; ++_i21) {
|
311
|
+
let elem22 = null;
|
312
|
+
elem22 = new ttypes.Cluster();
|
313
|
+
elem22.read(input);
|
314
|
+
this.clusterList.push(elem22);
|
315
|
+
}
|
316
|
+
input.readListEnd();
|
317
|
+
} else {
|
318
|
+
input.skip(ftype);
|
319
|
+
}
|
320
|
+
break;
|
321
|
+
case 5:
|
322
|
+
if (ftype == Thrift.Type.LIST) {
|
323
|
+
this.rootClusterIndexList = [];
|
324
|
+
const _rtmp324 = input.readListBegin();
|
325
|
+
const _size23 = _rtmp324.size || 0;
|
326
|
+
for (let _i25 = 0; _i25 < _size23; ++_i25) {
|
327
|
+
let elem26 = null;
|
328
|
+
elem26 = input.readI32();
|
329
|
+
this.rootClusterIndexList.push(elem26);
|
330
|
+
}
|
331
|
+
input.readListEnd();
|
332
|
+
} else {
|
333
|
+
input.skip(ftype);
|
334
|
+
}
|
335
|
+
break;
|
336
|
+
default:
|
337
|
+
input.skip(ftype);
|
338
|
+
}
|
339
|
+
input.readFieldEnd();
|
340
|
+
}
|
341
|
+
input.readStructEnd();
|
342
|
+
return;
|
343
|
+
}
|
344
|
+
|
345
|
+
write (output) {
|
346
|
+
output.writeStructBegin('Clustering');
|
347
|
+
if (this.uuid !== null && this.uuid !== undefined) {
|
348
|
+
output.writeFieldBegin('uuid', Thrift.Type.STRUCT, 1);
|
349
|
+
this.uuid.write(output);
|
350
|
+
output.writeFieldEnd();
|
351
|
+
}
|
352
|
+
if (this.metadata !== null && this.metadata !== undefined) {
|
353
|
+
output.writeFieldBegin('metadata', Thrift.Type.STRUCT, 2);
|
354
|
+
this.metadata.write(output);
|
355
|
+
output.writeFieldEnd();
|
356
|
+
}
|
357
|
+
if (this.clusterMemberList !== null && this.clusterMemberList !== undefined) {
|
358
|
+
output.writeFieldBegin('clusterMemberList', Thrift.Type.LIST, 3);
|
359
|
+
output.writeListBegin(Thrift.Type.STRUCT, this.clusterMemberList.length);
|
360
|
+
for (let iter27 in this.clusterMemberList) {
|
361
|
+
if (this.clusterMemberList.hasOwnProperty(iter27)) {
|
362
|
+
iter27 = this.clusterMemberList[iter27];
|
363
|
+
iter27.write(output);
|
364
|
+
}
|
365
|
+
}
|
366
|
+
output.writeListEnd();
|
367
|
+
output.writeFieldEnd();
|
368
|
+
}
|
369
|
+
if (this.clusterList !== null && this.clusterList !== undefined) {
|
370
|
+
output.writeFieldBegin('clusterList', Thrift.Type.LIST, 4);
|
371
|
+
output.writeListBegin(Thrift.Type.STRUCT, this.clusterList.length);
|
372
|
+
for (let iter28 in this.clusterList) {
|
373
|
+
if (this.clusterList.hasOwnProperty(iter28)) {
|
374
|
+
iter28 = this.clusterList[iter28];
|
375
|
+
iter28.write(output);
|
376
|
+
}
|
377
|
+
}
|
378
|
+
output.writeListEnd();
|
379
|
+
output.writeFieldEnd();
|
380
|
+
}
|
381
|
+
if (this.rootClusterIndexList !== null && this.rootClusterIndexList !== undefined) {
|
382
|
+
output.writeFieldBegin('rootClusterIndexList', Thrift.Type.LIST, 5);
|
383
|
+
output.writeListBegin(Thrift.Type.I32, this.rootClusterIndexList.length);
|
384
|
+
for (let iter29 in this.rootClusterIndexList) {
|
385
|
+
if (this.rootClusterIndexList.hasOwnProperty(iter29)) {
|
386
|
+
iter29 = this.rootClusterIndexList[iter29];
|
387
|
+
output.writeI32(iter29);
|
388
|
+
}
|
389
|
+
}
|
390
|
+
output.writeListEnd();
|
391
|
+
output.writeFieldEnd();
|
392
|
+
}
|
393
|
+
output.writeFieldStop();
|
394
|
+
output.writeStructEnd();
|
395
|
+
return;
|
396
|
+
}
|
397
|
+
|
398
|
+
};
|