@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.
Files changed (42) hide show
  1. package/ActiveLearnerClientService.js +249 -249
  2. package/ActiveLearnerServerService.js +642 -642
  3. package/AnnotateCommunicationService.js +696 -696
  4. package/AnnotateWithContextService.js +298 -298
  5. package/FeedbackService.js +750 -750
  6. package/FetchCommunicationService.js +709 -709
  7. package/README.md +125 -0
  8. package/ResultsServerService.js +2138 -2138
  9. package/SearchProxyService.js +962 -962
  10. package/SearchService.js +685 -685
  11. package/Service.js +373 -373
  12. package/StoreCommunicationService.js +255 -255
  13. package/SummarizationService.js +479 -479
  14. package/access_types.js +168 -168
  15. package/annotate_types.js +26 -26
  16. package/audio_types.js +110 -110
  17. package/cluster_types.js +398 -398
  18. package/communication_fu.js +432 -432
  19. package/communication_types.js +845 -845
  20. package/concrete.js +64 -64
  21. package/context_types.js +65 -65
  22. package/email_types.js +477 -477
  23. package/entities_types.js +658 -658
  24. package/ex_types.js +82 -82
  25. package/language_types.js +123 -123
  26. package/learn_types.js +207 -207
  27. package/linking_types.js +286 -286
  28. package/metadata_types.js +926 -926
  29. package/nitf_types.js +1005 -1005
  30. package/package.json +26 -5
  31. package/results_types.js +18 -18
  32. package/search_types.js +661 -661
  33. package/services_types.js +384 -384
  34. package/situations_types.js +1268 -1268
  35. package/spans_types.js +151 -151
  36. package/structure_types.js +2311 -2311
  37. package/summarization_types.js +433 -433
  38. package/tokenization_fu.js +33 -33
  39. package/tokentagging_fu.js +241 -241
  40. package/twitter_types.js +1553 -1553
  41. package/util.js +117 -117
  42. package/uuid_types.js +67 -67
@@ -1,255 +1,255 @@
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 communication_ttypes = require('./communication_types');
13
- const services_ttypes = require('./services_types');
14
-
15
-
16
- const Service = require('./Service');
17
- const ServiceClient = Service.Client;
18
- const ServiceProcessor = Service.Processor;
19
- const ttypes = require('./access_types');
20
- //HELPER FUNCTIONS AND STRUCTURES
21
-
22
- const StoreCommunicationService_store_args = class {
23
- constructor(args) {
24
- this.communication = null;
25
- if (args) {
26
- if (args.communication !== undefined && args.communication !== null) {
27
- this.communication = new communication_ttypes.Communication(args.communication);
28
- }
29
- }
30
- }
31
-
32
- read (input) {
33
- input.readStructBegin();
34
- while (true) {
35
- const ret = input.readFieldBegin();
36
- const ftype = ret.ftype;
37
- const fid = ret.fid;
38
- if (ftype == Thrift.Type.STOP) {
39
- break;
40
- }
41
- switch (fid) {
42
- case 1:
43
- if (ftype == Thrift.Type.STRUCT) {
44
- this.communication = new communication_ttypes.Communication();
45
- this.communication.read(input);
46
- } else {
47
- input.skip(ftype);
48
- }
49
- break;
50
- case 0:
51
- input.skip(ftype);
52
- break;
53
- default:
54
- input.skip(ftype);
55
- }
56
- input.readFieldEnd();
57
- }
58
- input.readStructEnd();
59
- return;
60
- }
61
-
62
- write (output) {
63
- output.writeStructBegin('StoreCommunicationService_store_args');
64
- if (this.communication !== null && this.communication !== undefined) {
65
- output.writeFieldBegin('communication', Thrift.Type.STRUCT, 1);
66
- this.communication.write(output);
67
- output.writeFieldEnd();
68
- }
69
- output.writeFieldStop();
70
- output.writeStructEnd();
71
- return;
72
- }
73
-
74
- };
75
- const StoreCommunicationService_store_result = class {
76
- constructor(args) {
77
- this.ex = null;
78
- if (args instanceof services_ttypes.ServicesException) {
79
- this.ex = args;
80
- return;
81
- }
82
- if (args) {
83
- if (args.ex !== undefined && args.ex !== null) {
84
- this.ex = args.ex;
85
- }
86
- }
87
- }
88
-
89
- read (input) {
90
- input.readStructBegin();
91
- while (true) {
92
- const ret = input.readFieldBegin();
93
- const ftype = ret.ftype;
94
- const fid = ret.fid;
95
- if (ftype == Thrift.Type.STOP) {
96
- break;
97
- }
98
- switch (fid) {
99
- case 1:
100
- if (ftype == Thrift.Type.STRUCT) {
101
- this.ex = new services_ttypes.ServicesException();
102
- this.ex.read(input);
103
- } else {
104
- input.skip(ftype);
105
- }
106
- break;
107
- case 0:
108
- input.skip(ftype);
109
- break;
110
- default:
111
- input.skip(ftype);
112
- }
113
- input.readFieldEnd();
114
- }
115
- input.readStructEnd();
116
- return;
117
- }
118
-
119
- write (output) {
120
- output.writeStructBegin('StoreCommunicationService_store_result');
121
- if (this.ex !== null && this.ex !== undefined) {
122
- output.writeFieldBegin('ex', Thrift.Type.STRUCT, 1);
123
- this.ex.write(output);
124
- output.writeFieldEnd();
125
- }
126
- output.writeFieldStop();
127
- output.writeStructEnd();
128
- return;
129
- }
130
-
131
- };
132
- const StoreCommunicationServiceClient = exports.Client = class StoreCommunicationServiceClient extends ServiceClient {
133
- constructor(output, pClass) {
134
- super(output, pClass);
135
- this.output = output;
136
- this.pClass = pClass;
137
- this._seqid = 0;
138
- this._reqs = {};
139
- }
140
- seqid () { return this._seqid; }
141
- new_seqid () { return this._seqid += 1; }
142
-
143
- store (communication) {
144
- this._seqid = this.new_seqid();
145
- const self = this;
146
- return new Promise((resolve, reject) => {
147
- self._reqs[self.seqid()] = (error, result) => {
148
- return error ? reject(error) : resolve(result);
149
- };
150
- self.send_store(communication);
151
- });
152
- }
153
-
154
- send_store (communication) {
155
- const output = new this.pClass(this.output);
156
- const params = {
157
- communication: communication
158
- };
159
- const args = new StoreCommunicationService_store_args(params);
160
- try {
161
- output.writeMessageBegin('store', Thrift.MessageType.CALL, this.seqid());
162
- args.write(output);
163
- output.writeMessageEnd();
164
- return this.output.flush();
165
- }
166
- catch (e) {
167
- delete this._reqs[this.seqid()];
168
- if (typeof output.reset === 'function') {
169
- output.reset();
170
- }
171
- throw e;
172
- }
173
- }
174
-
175
- recv_store (input, mtype, rseqid) {
176
- const callback = this._reqs[rseqid] || function() {};
177
- delete this._reqs[rseqid];
178
- if (mtype == Thrift.MessageType.EXCEPTION) {
179
- const x = new Thrift.TApplicationException();
180
- x.read(input);
181
- input.readMessageEnd();
182
- return callback(x);
183
- }
184
- const result = new StoreCommunicationService_store_result();
185
- result.read(input);
186
- input.readMessageEnd();
187
-
188
- if (null !== result.ex) {
189
- return callback(result.ex);
190
- }
191
- callback(null);
192
- }
193
- };
194
- const StoreCommunicationServiceProcessor = exports.Processor = class StoreCommunicationServiceProcessor extends ServiceProcessor {
195
- constructor(handler) {
196
- super(handler);
197
- this._handler = handler;
198
- }
199
- process (input, output) {
200
- const r = input.readMessageBegin();
201
- if (this['process_' + r.fname]) {
202
- return this['process_' + r.fname].call(this, r.rseqid, input, output);
203
- } else {
204
- input.skip(Thrift.Type.STRUCT);
205
- input.readMessageEnd();
206
- const x = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN_METHOD, 'Unknown function ' + r.fname);
207
- output.writeMessageBegin(r.fname, Thrift.MessageType.EXCEPTION, r.rseqid);
208
- x.write(output);
209
- output.writeMessageEnd();
210
- output.flush();
211
- }
212
- }
213
- process_store (seqid, input, output) {
214
- const args = new StoreCommunicationService_store_args();
215
- args.read(input);
216
- input.readMessageEnd();
217
- if (this._handler.store.length === 1) {
218
- Promise.resolve(this._handler.store.bind(this._handler)(
219
- args.communication
220
- )).then(result => {
221
- const result_obj = new StoreCommunicationService_store_result({success: result});
222
- output.writeMessageBegin("store", Thrift.MessageType.REPLY, seqid);
223
- result_obj.write(output);
224
- output.writeMessageEnd();
225
- output.flush();
226
- }).catch(err => {
227
- let result;
228
- if (err instanceof services_ttypes.ServicesException) {
229
- result = new StoreCommunicationService_store_result(err);
230
- output.writeMessageBegin("store", Thrift.MessageType.REPLY, seqid);
231
- } else {
232
- result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
233
- output.writeMessageBegin("store", Thrift.MessageType.EXCEPTION, seqid);
234
- }
235
- result.write(output);
236
- output.writeMessageEnd();
237
- output.flush();
238
- });
239
- } else {
240
- this._handler.store(args.communication, (err, result) => {
241
- let result_obj;
242
- if ((err === null || typeof err === 'undefined') || err instanceof services_ttypes.ServicesException) {
243
- result_obj = new StoreCommunicationService_store_result((err !== null || typeof err === 'undefined') ? err : {success: result});
244
- output.writeMessageBegin("store", Thrift.MessageType.REPLY, seqid);
245
- } else {
246
- result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
247
- output.writeMessageBegin("store", Thrift.MessageType.EXCEPTION, seqid);
248
- }
249
- result_obj.write(output);
250
- output.writeMessageEnd();
251
- output.flush();
252
- });
253
- }
254
- }
255
- };
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 communication_ttypes = require('./communication_types');
13
+ const services_ttypes = require('./services_types');
14
+
15
+
16
+ const Service = require('./Service');
17
+ const ServiceClient = Service.Client;
18
+ const ServiceProcessor = Service.Processor;
19
+ const ttypes = require('./access_types');
20
+ //HELPER FUNCTIONS AND STRUCTURES
21
+
22
+ const StoreCommunicationService_store_args = class {
23
+ constructor(args) {
24
+ this.communication = null;
25
+ if (args) {
26
+ if (args.communication !== undefined && args.communication !== null) {
27
+ this.communication = new communication_ttypes.Communication(args.communication);
28
+ }
29
+ }
30
+ }
31
+
32
+ read (input) {
33
+ input.readStructBegin();
34
+ while (true) {
35
+ const ret = input.readFieldBegin();
36
+ const ftype = ret.ftype;
37
+ const fid = ret.fid;
38
+ if (ftype == Thrift.Type.STOP) {
39
+ break;
40
+ }
41
+ switch (fid) {
42
+ case 1:
43
+ if (ftype == Thrift.Type.STRUCT) {
44
+ this.communication = new communication_ttypes.Communication();
45
+ this.communication.read(input);
46
+ } else {
47
+ input.skip(ftype);
48
+ }
49
+ break;
50
+ case 0:
51
+ input.skip(ftype);
52
+ break;
53
+ default:
54
+ input.skip(ftype);
55
+ }
56
+ input.readFieldEnd();
57
+ }
58
+ input.readStructEnd();
59
+ return;
60
+ }
61
+
62
+ write (output) {
63
+ output.writeStructBegin('StoreCommunicationService_store_args');
64
+ if (this.communication !== null && this.communication !== undefined) {
65
+ output.writeFieldBegin('communication', Thrift.Type.STRUCT, 1);
66
+ this.communication.write(output);
67
+ output.writeFieldEnd();
68
+ }
69
+ output.writeFieldStop();
70
+ output.writeStructEnd();
71
+ return;
72
+ }
73
+
74
+ };
75
+ const StoreCommunicationService_store_result = class {
76
+ constructor(args) {
77
+ this.ex = null;
78
+ if (args instanceof services_ttypes.ServicesException) {
79
+ this.ex = args;
80
+ return;
81
+ }
82
+ if (args) {
83
+ if (args.ex !== undefined && args.ex !== null) {
84
+ this.ex = args.ex;
85
+ }
86
+ }
87
+ }
88
+
89
+ read (input) {
90
+ input.readStructBegin();
91
+ while (true) {
92
+ const ret = input.readFieldBegin();
93
+ const ftype = ret.ftype;
94
+ const fid = ret.fid;
95
+ if (ftype == Thrift.Type.STOP) {
96
+ break;
97
+ }
98
+ switch (fid) {
99
+ case 1:
100
+ if (ftype == Thrift.Type.STRUCT) {
101
+ this.ex = new services_ttypes.ServicesException();
102
+ this.ex.read(input);
103
+ } else {
104
+ input.skip(ftype);
105
+ }
106
+ break;
107
+ case 0:
108
+ input.skip(ftype);
109
+ break;
110
+ default:
111
+ input.skip(ftype);
112
+ }
113
+ input.readFieldEnd();
114
+ }
115
+ input.readStructEnd();
116
+ return;
117
+ }
118
+
119
+ write (output) {
120
+ output.writeStructBegin('StoreCommunicationService_store_result');
121
+ if (this.ex !== null && this.ex !== undefined) {
122
+ output.writeFieldBegin('ex', Thrift.Type.STRUCT, 1);
123
+ this.ex.write(output);
124
+ output.writeFieldEnd();
125
+ }
126
+ output.writeFieldStop();
127
+ output.writeStructEnd();
128
+ return;
129
+ }
130
+
131
+ };
132
+ const StoreCommunicationServiceClient = exports.Client = class StoreCommunicationServiceClient extends ServiceClient {
133
+ constructor(output, pClass) {
134
+ super(output, pClass);
135
+ this.output = output;
136
+ this.pClass = pClass;
137
+ this._seqid = 0;
138
+ this._reqs = {};
139
+ }
140
+ seqid () { return this._seqid; }
141
+ new_seqid () { return this._seqid += 1; }
142
+
143
+ store (communication) {
144
+ this._seqid = this.new_seqid();
145
+ const self = this;
146
+ return new Promise((resolve, reject) => {
147
+ self._reqs[self.seqid()] = (error, result) => {
148
+ return error ? reject(error) : resolve(result);
149
+ };
150
+ self.send_store(communication);
151
+ });
152
+ }
153
+
154
+ send_store (communication) {
155
+ const output = new this.pClass(this.output);
156
+ const params = {
157
+ communication: communication
158
+ };
159
+ const args = new StoreCommunicationService_store_args(params);
160
+ try {
161
+ output.writeMessageBegin('store', Thrift.MessageType.CALL, this.seqid());
162
+ args.write(output);
163
+ output.writeMessageEnd();
164
+ return this.output.flush();
165
+ }
166
+ catch (e) {
167
+ delete this._reqs[this.seqid()];
168
+ if (typeof output.reset === 'function') {
169
+ output.reset();
170
+ }
171
+ throw e;
172
+ }
173
+ }
174
+
175
+ recv_store (input, mtype, rseqid) {
176
+ const callback = this._reqs[rseqid] || function() {};
177
+ delete this._reqs[rseqid];
178
+ if (mtype == Thrift.MessageType.EXCEPTION) {
179
+ const x = new Thrift.TApplicationException();
180
+ x.read(input);
181
+ input.readMessageEnd();
182
+ return callback(x);
183
+ }
184
+ const result = new StoreCommunicationService_store_result();
185
+ result.read(input);
186
+ input.readMessageEnd();
187
+
188
+ if (null !== result.ex) {
189
+ return callback(result.ex);
190
+ }
191
+ callback(null);
192
+ }
193
+ };
194
+ const StoreCommunicationServiceProcessor = exports.Processor = class StoreCommunicationServiceProcessor extends ServiceProcessor {
195
+ constructor(handler) {
196
+ super(handler);
197
+ this._handler = handler;
198
+ }
199
+ process (input, output) {
200
+ const r = input.readMessageBegin();
201
+ if (this['process_' + r.fname]) {
202
+ return this['process_' + r.fname].call(this, r.rseqid, input, output);
203
+ } else {
204
+ input.skip(Thrift.Type.STRUCT);
205
+ input.readMessageEnd();
206
+ const x = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN_METHOD, 'Unknown function ' + r.fname);
207
+ output.writeMessageBegin(r.fname, Thrift.MessageType.EXCEPTION, r.rseqid);
208
+ x.write(output);
209
+ output.writeMessageEnd();
210
+ output.flush();
211
+ }
212
+ }
213
+ process_store (seqid, input, output) {
214
+ const args = new StoreCommunicationService_store_args();
215
+ args.read(input);
216
+ input.readMessageEnd();
217
+ if (this._handler.store.length === 1) {
218
+ Promise.resolve(this._handler.store.bind(this._handler)(
219
+ args.communication
220
+ )).then(result => {
221
+ const result_obj = new StoreCommunicationService_store_result({success: result});
222
+ output.writeMessageBegin("store", Thrift.MessageType.REPLY, seqid);
223
+ result_obj.write(output);
224
+ output.writeMessageEnd();
225
+ output.flush();
226
+ }).catch(err => {
227
+ let result;
228
+ if (err instanceof services_ttypes.ServicesException) {
229
+ result = new StoreCommunicationService_store_result(err);
230
+ output.writeMessageBegin("store", Thrift.MessageType.REPLY, seqid);
231
+ } else {
232
+ result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
233
+ output.writeMessageBegin("store", Thrift.MessageType.EXCEPTION, seqid);
234
+ }
235
+ result.write(output);
236
+ output.writeMessageEnd();
237
+ output.flush();
238
+ });
239
+ } else {
240
+ this._handler.store(args.communication, (err, result) => {
241
+ let result_obj;
242
+ if ((err === null || typeof err === 'undefined') || err instanceof services_ttypes.ServicesException) {
243
+ result_obj = new StoreCommunicationService_store_result((err !== null || typeof err === 'undefined') ? err : {success: result});
244
+ output.writeMessageBegin("store", Thrift.MessageType.REPLY, seqid);
245
+ } else {
246
+ result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
247
+ output.writeMessageBegin("store", Thrift.MessageType.EXCEPTION, seqid);
248
+ }
249
+ result_obj.write(output);
250
+ output.writeMessageEnd();
251
+ output.flush();
252
+ });
253
+ }
254
+ }
255
+ };