@ccmaymay/concrete 4.15.0
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 -0
- package/ActiveLearnerServerService.js +642 -0
- package/AnnotateCommunicationService.js +696 -0
- package/AnnotateWithContextService.js +298 -0
- package/FeedbackService.js +750 -0
- package/FetchCommunicationService.js +709 -0
- package/LICENSE +31 -0
- package/ResultsServerService.js +2138 -0
- package/SearchProxyService.js +962 -0
- package/SearchService.js +685 -0
- package/Service.js +373 -0
- package/StoreCommunicationService.js +255 -0
- package/SummarizationService.js +479 -0
- package/access_types.js +168 -0
- package/annotate_types.js +26 -0
- package/audio_types.js +110 -0
- package/cluster_types.js +398 -0
- package/communication_fu.js +432 -0
- package/communication_types.js +845 -0
- package/concrete.js +65 -0
- package/context_types.js +65 -0
- package/email_types.js +477 -0
- package/entities_types.js +658 -0
- package/ex_types.js +82 -0
- package/language_types.js +123 -0
- package/learn_types.js +207 -0
- package/linking_types.js +286 -0
- package/metadata_types.js +926 -0
- package/nitf_types.js +1005 -0
- package/package.json +23 -0
- package/results_types.js +18 -0
- package/search_types.js +661 -0
- package/services_types.js +384 -0
- package/situations_types.js +1268 -0
- package/spans_types.js +151 -0
- package/structure_types.js +2311 -0
- package/summarization_types.js +433 -0
- package/tokenization_fu.js +33 -0
- package/tokentagging_fu.js +241 -0
- package/twitter_types.js +1553 -0
- package/util.js +118 -0
- package/uuid_types.js +67 -0
package/ex_types.js
ADDED
@@ -0,0 +1,82 @@
|
|
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
|
+
|
13
|
+
const ttypes = module.exports = {};
|
14
|
+
const ConcreteThriftException = module.exports.ConcreteThriftException = class extends Thrift.TException {
|
15
|
+
constructor(args) {
|
16
|
+
super(args);
|
17
|
+
this.name = "ConcreteThriftException";
|
18
|
+
this.message = null;
|
19
|
+
this.serEx = null;
|
20
|
+
if (args) {
|
21
|
+
if (args.message !== undefined && args.message !== null) {
|
22
|
+
this.message = args.message;
|
23
|
+
} else {
|
24
|
+
throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field message is unset!');
|
25
|
+
}
|
26
|
+
if (args.serEx !== undefined && args.serEx !== null) {
|
27
|
+
this.serEx = args.serEx;
|
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.STRING) {
|
44
|
+
this.message = input.readString();
|
45
|
+
} else {
|
46
|
+
input.skip(ftype);
|
47
|
+
}
|
48
|
+
break;
|
49
|
+
case 2:
|
50
|
+
if (ftype == Thrift.Type.STRING) {
|
51
|
+
this.serEx = input.readBinary();
|
52
|
+
} else {
|
53
|
+
input.skip(ftype);
|
54
|
+
}
|
55
|
+
break;
|
56
|
+
default:
|
57
|
+
input.skip(ftype);
|
58
|
+
}
|
59
|
+
input.readFieldEnd();
|
60
|
+
}
|
61
|
+
input.readStructEnd();
|
62
|
+
return;
|
63
|
+
}
|
64
|
+
|
65
|
+
write (output) {
|
66
|
+
output.writeStructBegin('ConcreteThriftException');
|
67
|
+
if (this.message !== null && this.message !== undefined) {
|
68
|
+
output.writeFieldBegin('message', Thrift.Type.STRING, 1);
|
69
|
+
output.writeString(this.message);
|
70
|
+
output.writeFieldEnd();
|
71
|
+
}
|
72
|
+
if (this.serEx !== null && this.serEx !== undefined) {
|
73
|
+
output.writeFieldBegin('serEx', Thrift.Type.STRING, 2);
|
74
|
+
output.writeBinary(this.serEx);
|
75
|
+
output.writeFieldEnd();
|
76
|
+
}
|
77
|
+
output.writeFieldStop();
|
78
|
+
output.writeStructEnd();
|
79
|
+
return;
|
80
|
+
}
|
81
|
+
|
82
|
+
};
|
@@ -0,0 +1,123 @@
|
|
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 metadata_ttypes = require('./metadata_types');
|
13
|
+
const uuid_ttypes = require('./uuid_types');
|
14
|
+
|
15
|
+
|
16
|
+
const ttypes = module.exports = {};
|
17
|
+
const LanguageIdentification = module.exports.LanguageIdentification = class {
|
18
|
+
constructor(args) {
|
19
|
+
this.uuid = null;
|
20
|
+
this.metadata = null;
|
21
|
+
this.languageToProbabilityMap = null;
|
22
|
+
if (args) {
|
23
|
+
if (args.uuid !== undefined && args.uuid !== null) {
|
24
|
+
this.uuid = new uuid_ttypes.UUID(args.uuid);
|
25
|
+
} else {
|
26
|
+
throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field uuid is unset!');
|
27
|
+
}
|
28
|
+
if (args.metadata !== undefined && args.metadata !== null) {
|
29
|
+
this.metadata = new metadata_ttypes.AnnotationMetadata(args.metadata);
|
30
|
+
} else {
|
31
|
+
throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field metadata is unset!');
|
32
|
+
}
|
33
|
+
if (args.languageToProbabilityMap !== undefined && args.languageToProbabilityMap !== null) {
|
34
|
+
this.languageToProbabilityMap = Thrift.copyMap(args.languageToProbabilityMap, [null]);
|
35
|
+
} else {
|
36
|
+
throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field languageToProbabilityMap 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.uuid = new uuid_ttypes.UUID();
|
54
|
+
this.uuid.read(input);
|
55
|
+
} else {
|
56
|
+
input.skip(ftype);
|
57
|
+
}
|
58
|
+
break;
|
59
|
+
case 2:
|
60
|
+
if (ftype == Thrift.Type.STRUCT) {
|
61
|
+
this.metadata = new metadata_ttypes.AnnotationMetadata();
|
62
|
+
this.metadata.read(input);
|
63
|
+
} else {
|
64
|
+
input.skip(ftype);
|
65
|
+
}
|
66
|
+
break;
|
67
|
+
case 3:
|
68
|
+
if (ftype == Thrift.Type.MAP) {
|
69
|
+
this.languageToProbabilityMap = {};
|
70
|
+
const _rtmp31 = input.readMapBegin();
|
71
|
+
const _size0 = _rtmp31.size || 0;
|
72
|
+
for (let _i2 = 0; _i2 < _size0; ++_i2) {
|
73
|
+
let key3 = null;
|
74
|
+
let val4 = null;
|
75
|
+
key3 = input.readString();
|
76
|
+
val4 = input.readDouble();
|
77
|
+
this.languageToProbabilityMap[key3] = val4;
|
78
|
+
}
|
79
|
+
input.readMapEnd();
|
80
|
+
} else {
|
81
|
+
input.skip(ftype);
|
82
|
+
}
|
83
|
+
break;
|
84
|
+
default:
|
85
|
+
input.skip(ftype);
|
86
|
+
}
|
87
|
+
input.readFieldEnd();
|
88
|
+
}
|
89
|
+
input.readStructEnd();
|
90
|
+
return;
|
91
|
+
}
|
92
|
+
|
93
|
+
write (output) {
|
94
|
+
output.writeStructBegin('LanguageIdentification');
|
95
|
+
if (this.uuid !== null && this.uuid !== undefined) {
|
96
|
+
output.writeFieldBegin('uuid', Thrift.Type.STRUCT, 1);
|
97
|
+
this.uuid.write(output);
|
98
|
+
output.writeFieldEnd();
|
99
|
+
}
|
100
|
+
if (this.metadata !== null && this.metadata !== undefined) {
|
101
|
+
output.writeFieldBegin('metadata', Thrift.Type.STRUCT, 2);
|
102
|
+
this.metadata.write(output);
|
103
|
+
output.writeFieldEnd();
|
104
|
+
}
|
105
|
+
if (this.languageToProbabilityMap !== null && this.languageToProbabilityMap !== undefined) {
|
106
|
+
output.writeFieldBegin('languageToProbabilityMap', Thrift.Type.MAP, 3);
|
107
|
+
output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.DOUBLE, Thrift.objectLength(this.languageToProbabilityMap));
|
108
|
+
for (let kiter5 in this.languageToProbabilityMap) {
|
109
|
+
if (this.languageToProbabilityMap.hasOwnProperty(kiter5)) {
|
110
|
+
let viter6 = this.languageToProbabilityMap[kiter5];
|
111
|
+
output.writeString(kiter5);
|
112
|
+
output.writeDouble(viter6);
|
113
|
+
}
|
114
|
+
}
|
115
|
+
output.writeMapEnd();
|
116
|
+
output.writeFieldEnd();
|
117
|
+
}
|
118
|
+
output.writeFieldStop();
|
119
|
+
output.writeStructEnd();
|
120
|
+
return;
|
121
|
+
}
|
122
|
+
|
123
|
+
};
|
package/learn_types.js
ADDED
@@ -0,0 +1,207 @@
|
|
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 services_ttypes = require('./services_types');
|
13
|
+
const uuid_ttypes = require('./uuid_types');
|
14
|
+
const communication_ttypes = require('./communication_types');
|
15
|
+
|
16
|
+
|
17
|
+
const ttypes = module.exports = {};
|
18
|
+
const AnnotationTask = module.exports.AnnotationTask = class {
|
19
|
+
constructor(args) {
|
20
|
+
this.type = null;
|
21
|
+
this.language = null;
|
22
|
+
this.unitType = null;
|
23
|
+
this.units = null;
|
24
|
+
if (args) {
|
25
|
+
if (args.type !== undefined && args.type !== null) {
|
26
|
+
this.type = args.type;
|
27
|
+
} else {
|
28
|
+
throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field type is unset!');
|
29
|
+
}
|
30
|
+
if (args.language !== undefined && args.language !== null) {
|
31
|
+
this.language = args.language;
|
32
|
+
}
|
33
|
+
if (args.unitType !== undefined && args.unitType !== null) {
|
34
|
+
this.unitType = args.unitType;
|
35
|
+
} else {
|
36
|
+
throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field unitType is unset!');
|
37
|
+
}
|
38
|
+
if (args.units !== undefined && args.units !== null) {
|
39
|
+
this.units = Thrift.copyList(args.units, [services_ttypes.AnnotationUnitIdentifier]);
|
40
|
+
} else {
|
41
|
+
throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field units is unset!');
|
42
|
+
}
|
43
|
+
}
|
44
|
+
}
|
45
|
+
|
46
|
+
read (input) {
|
47
|
+
input.readStructBegin();
|
48
|
+
while (true) {
|
49
|
+
const ret = input.readFieldBegin();
|
50
|
+
const ftype = ret.ftype;
|
51
|
+
const fid = ret.fid;
|
52
|
+
if (ftype == Thrift.Type.STOP) {
|
53
|
+
break;
|
54
|
+
}
|
55
|
+
switch (fid) {
|
56
|
+
case 1:
|
57
|
+
if (ftype == Thrift.Type.I32) {
|
58
|
+
this.type = input.readI32();
|
59
|
+
} else {
|
60
|
+
input.skip(ftype);
|
61
|
+
}
|
62
|
+
break;
|
63
|
+
case 2:
|
64
|
+
if (ftype == Thrift.Type.STRING) {
|
65
|
+
this.language = input.readString();
|
66
|
+
} else {
|
67
|
+
input.skip(ftype);
|
68
|
+
}
|
69
|
+
break;
|
70
|
+
case 3:
|
71
|
+
if (ftype == Thrift.Type.I32) {
|
72
|
+
this.unitType = input.readI32();
|
73
|
+
} else {
|
74
|
+
input.skip(ftype);
|
75
|
+
}
|
76
|
+
break;
|
77
|
+
case 4:
|
78
|
+
if (ftype == Thrift.Type.LIST) {
|
79
|
+
this.units = [];
|
80
|
+
const _rtmp31 = input.readListBegin();
|
81
|
+
const _size0 = _rtmp31.size || 0;
|
82
|
+
for (let _i2 = 0; _i2 < _size0; ++_i2) {
|
83
|
+
let elem3 = null;
|
84
|
+
elem3 = new services_ttypes.AnnotationUnitIdentifier();
|
85
|
+
elem3.read(input);
|
86
|
+
this.units.push(elem3);
|
87
|
+
}
|
88
|
+
input.readListEnd();
|
89
|
+
} else {
|
90
|
+
input.skip(ftype);
|
91
|
+
}
|
92
|
+
break;
|
93
|
+
default:
|
94
|
+
input.skip(ftype);
|
95
|
+
}
|
96
|
+
input.readFieldEnd();
|
97
|
+
}
|
98
|
+
input.readStructEnd();
|
99
|
+
return;
|
100
|
+
}
|
101
|
+
|
102
|
+
write (output) {
|
103
|
+
output.writeStructBegin('AnnotationTask');
|
104
|
+
if (this.type !== null && this.type !== undefined) {
|
105
|
+
output.writeFieldBegin('type', Thrift.Type.I32, 1);
|
106
|
+
output.writeI32(this.type);
|
107
|
+
output.writeFieldEnd();
|
108
|
+
}
|
109
|
+
if (this.language !== null && this.language !== undefined) {
|
110
|
+
output.writeFieldBegin('language', Thrift.Type.STRING, 2);
|
111
|
+
output.writeString(this.language);
|
112
|
+
output.writeFieldEnd();
|
113
|
+
}
|
114
|
+
if (this.unitType !== null && this.unitType !== undefined) {
|
115
|
+
output.writeFieldBegin('unitType', Thrift.Type.I32, 3);
|
116
|
+
output.writeI32(this.unitType);
|
117
|
+
output.writeFieldEnd();
|
118
|
+
}
|
119
|
+
if (this.units !== null && this.units !== undefined) {
|
120
|
+
output.writeFieldBegin('units', Thrift.Type.LIST, 4);
|
121
|
+
output.writeListBegin(Thrift.Type.STRUCT, this.units.length);
|
122
|
+
for (let iter4 in this.units) {
|
123
|
+
if (this.units.hasOwnProperty(iter4)) {
|
124
|
+
iter4 = this.units[iter4];
|
125
|
+
iter4.write(output);
|
126
|
+
}
|
127
|
+
}
|
128
|
+
output.writeListEnd();
|
129
|
+
output.writeFieldEnd();
|
130
|
+
}
|
131
|
+
output.writeFieldStop();
|
132
|
+
output.writeStructEnd();
|
133
|
+
return;
|
134
|
+
}
|
135
|
+
|
136
|
+
};
|
137
|
+
const Annotation = module.exports.Annotation = class {
|
138
|
+
constructor(args) {
|
139
|
+
this.id = null;
|
140
|
+
this.communication = null;
|
141
|
+
if (args) {
|
142
|
+
if (args.id !== undefined && args.id !== null) {
|
143
|
+
this.id = new services_ttypes.AnnotationUnitIdentifier(args.id);
|
144
|
+
} else {
|
145
|
+
throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field id is unset!');
|
146
|
+
}
|
147
|
+
if (args.communication !== undefined && args.communication !== null) {
|
148
|
+
this.communication = new communication_ttypes.Communication(args.communication);
|
149
|
+
} else {
|
150
|
+
throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field communication is unset!');
|
151
|
+
}
|
152
|
+
}
|
153
|
+
}
|
154
|
+
|
155
|
+
read (input) {
|
156
|
+
input.readStructBegin();
|
157
|
+
while (true) {
|
158
|
+
const ret = input.readFieldBegin();
|
159
|
+
const ftype = ret.ftype;
|
160
|
+
const fid = ret.fid;
|
161
|
+
if (ftype == Thrift.Type.STOP) {
|
162
|
+
break;
|
163
|
+
}
|
164
|
+
switch (fid) {
|
165
|
+
case 1:
|
166
|
+
if (ftype == Thrift.Type.STRUCT) {
|
167
|
+
this.id = new services_ttypes.AnnotationUnitIdentifier();
|
168
|
+
this.id.read(input);
|
169
|
+
} else {
|
170
|
+
input.skip(ftype);
|
171
|
+
}
|
172
|
+
break;
|
173
|
+
case 2:
|
174
|
+
if (ftype == Thrift.Type.STRUCT) {
|
175
|
+
this.communication = new communication_ttypes.Communication();
|
176
|
+
this.communication.read(input);
|
177
|
+
} else {
|
178
|
+
input.skip(ftype);
|
179
|
+
}
|
180
|
+
break;
|
181
|
+
default:
|
182
|
+
input.skip(ftype);
|
183
|
+
}
|
184
|
+
input.readFieldEnd();
|
185
|
+
}
|
186
|
+
input.readStructEnd();
|
187
|
+
return;
|
188
|
+
}
|
189
|
+
|
190
|
+
write (output) {
|
191
|
+
output.writeStructBegin('Annotation');
|
192
|
+
if (this.id !== null && this.id !== undefined) {
|
193
|
+
output.writeFieldBegin('id', Thrift.Type.STRUCT, 1);
|
194
|
+
this.id.write(output);
|
195
|
+
output.writeFieldEnd();
|
196
|
+
}
|
197
|
+
if (this.communication !== null && this.communication !== undefined) {
|
198
|
+
output.writeFieldBegin('communication', Thrift.Type.STRUCT, 2);
|
199
|
+
this.communication.write(output);
|
200
|
+
output.writeFieldEnd();
|
201
|
+
}
|
202
|
+
output.writeFieldStop();
|
203
|
+
output.writeStructEnd();
|
204
|
+
return;
|
205
|
+
}
|
206
|
+
|
207
|
+
};
|
package/linking_types.js
ADDED
@@ -0,0 +1,286 @@
|
|
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 LinkTarget = module.exports.LinkTarget = class {
|
18
|
+
constructor(args) {
|
19
|
+
this.confidence = null;
|
20
|
+
this.targetId = null;
|
21
|
+
this.dbId = null;
|
22
|
+
this.dbName = null;
|
23
|
+
if (args) {
|
24
|
+
if (args.confidence !== undefined && args.confidence !== null) {
|
25
|
+
this.confidence = args.confidence;
|
26
|
+
}
|
27
|
+
if (args.targetId !== undefined && args.targetId !== null) {
|
28
|
+
this.targetId = new uuid_ttypes.UUID(args.targetId);
|
29
|
+
}
|
30
|
+
if (args.dbId !== undefined && args.dbId !== null) {
|
31
|
+
this.dbId = args.dbId;
|
32
|
+
}
|
33
|
+
if (args.dbName !== undefined && args.dbName !== null) {
|
34
|
+
this.dbName = args.dbName;
|
35
|
+
}
|
36
|
+
}
|
37
|
+
}
|
38
|
+
|
39
|
+
read (input) {
|
40
|
+
input.readStructBegin();
|
41
|
+
while (true) {
|
42
|
+
const ret = input.readFieldBegin();
|
43
|
+
const ftype = ret.ftype;
|
44
|
+
const fid = ret.fid;
|
45
|
+
if (ftype == Thrift.Type.STOP) {
|
46
|
+
break;
|
47
|
+
}
|
48
|
+
switch (fid) {
|
49
|
+
case 1:
|
50
|
+
if (ftype == Thrift.Type.DOUBLE) {
|
51
|
+
this.confidence = input.readDouble();
|
52
|
+
} else {
|
53
|
+
input.skip(ftype);
|
54
|
+
}
|
55
|
+
break;
|
56
|
+
case 2:
|
57
|
+
if (ftype == Thrift.Type.STRUCT) {
|
58
|
+
this.targetId = new uuid_ttypes.UUID();
|
59
|
+
this.targetId.read(input);
|
60
|
+
} else {
|
61
|
+
input.skip(ftype);
|
62
|
+
}
|
63
|
+
break;
|
64
|
+
case 3:
|
65
|
+
if (ftype == Thrift.Type.STRING) {
|
66
|
+
this.dbId = input.readString();
|
67
|
+
} else {
|
68
|
+
input.skip(ftype);
|
69
|
+
}
|
70
|
+
break;
|
71
|
+
case 4:
|
72
|
+
if (ftype == Thrift.Type.STRING) {
|
73
|
+
this.dbName = input.readString();
|
74
|
+
} else {
|
75
|
+
input.skip(ftype);
|
76
|
+
}
|
77
|
+
break;
|
78
|
+
default:
|
79
|
+
input.skip(ftype);
|
80
|
+
}
|
81
|
+
input.readFieldEnd();
|
82
|
+
}
|
83
|
+
input.readStructEnd();
|
84
|
+
return;
|
85
|
+
}
|
86
|
+
|
87
|
+
write (output) {
|
88
|
+
output.writeStructBegin('LinkTarget');
|
89
|
+
if (this.confidence !== null && this.confidence !== undefined) {
|
90
|
+
output.writeFieldBegin('confidence', Thrift.Type.DOUBLE, 1);
|
91
|
+
output.writeDouble(this.confidence);
|
92
|
+
output.writeFieldEnd();
|
93
|
+
}
|
94
|
+
if (this.targetId !== null && this.targetId !== undefined) {
|
95
|
+
output.writeFieldBegin('targetId', Thrift.Type.STRUCT, 2);
|
96
|
+
this.targetId.write(output);
|
97
|
+
output.writeFieldEnd();
|
98
|
+
}
|
99
|
+
if (this.dbId !== null && this.dbId !== undefined) {
|
100
|
+
output.writeFieldBegin('dbId', Thrift.Type.STRING, 3);
|
101
|
+
output.writeString(this.dbId);
|
102
|
+
output.writeFieldEnd();
|
103
|
+
}
|
104
|
+
if (this.dbName !== null && this.dbName !== undefined) {
|
105
|
+
output.writeFieldBegin('dbName', Thrift.Type.STRING, 4);
|
106
|
+
output.writeString(this.dbName);
|
107
|
+
output.writeFieldEnd();
|
108
|
+
}
|
109
|
+
output.writeFieldStop();
|
110
|
+
output.writeStructEnd();
|
111
|
+
return;
|
112
|
+
}
|
113
|
+
|
114
|
+
};
|
115
|
+
const Link = module.exports.Link = class {
|
116
|
+
constructor(args) {
|
117
|
+
this.sourceId = null;
|
118
|
+
this.linkTargetList = null;
|
119
|
+
if (args) {
|
120
|
+
if (args.sourceId !== undefined && args.sourceId !== null) {
|
121
|
+
this.sourceId = new uuid_ttypes.UUID(args.sourceId);
|
122
|
+
} else {
|
123
|
+
throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field sourceId is unset!');
|
124
|
+
}
|
125
|
+
if (args.linkTargetList !== undefined && args.linkTargetList !== null) {
|
126
|
+
this.linkTargetList = Thrift.copyList(args.linkTargetList, [ttypes.LinkTarget]);
|
127
|
+
} else {
|
128
|
+
throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field linkTargetList is unset!');
|
129
|
+
}
|
130
|
+
}
|
131
|
+
}
|
132
|
+
|
133
|
+
read (input) {
|
134
|
+
input.readStructBegin();
|
135
|
+
while (true) {
|
136
|
+
const ret = input.readFieldBegin();
|
137
|
+
const ftype = ret.ftype;
|
138
|
+
const fid = ret.fid;
|
139
|
+
if (ftype == Thrift.Type.STOP) {
|
140
|
+
break;
|
141
|
+
}
|
142
|
+
switch (fid) {
|
143
|
+
case 1:
|
144
|
+
if (ftype == Thrift.Type.STRUCT) {
|
145
|
+
this.sourceId = new uuid_ttypes.UUID();
|
146
|
+
this.sourceId.read(input);
|
147
|
+
} else {
|
148
|
+
input.skip(ftype);
|
149
|
+
}
|
150
|
+
break;
|
151
|
+
case 2:
|
152
|
+
if (ftype == Thrift.Type.LIST) {
|
153
|
+
this.linkTargetList = [];
|
154
|
+
const _rtmp31 = input.readListBegin();
|
155
|
+
const _size0 = _rtmp31.size || 0;
|
156
|
+
for (let _i2 = 0; _i2 < _size0; ++_i2) {
|
157
|
+
let elem3 = null;
|
158
|
+
elem3 = new ttypes.LinkTarget();
|
159
|
+
elem3.read(input);
|
160
|
+
this.linkTargetList.push(elem3);
|
161
|
+
}
|
162
|
+
input.readListEnd();
|
163
|
+
} else {
|
164
|
+
input.skip(ftype);
|
165
|
+
}
|
166
|
+
break;
|
167
|
+
default:
|
168
|
+
input.skip(ftype);
|
169
|
+
}
|
170
|
+
input.readFieldEnd();
|
171
|
+
}
|
172
|
+
input.readStructEnd();
|
173
|
+
return;
|
174
|
+
}
|
175
|
+
|
176
|
+
write (output) {
|
177
|
+
output.writeStructBegin('Link');
|
178
|
+
if (this.sourceId !== null && this.sourceId !== undefined) {
|
179
|
+
output.writeFieldBegin('sourceId', Thrift.Type.STRUCT, 1);
|
180
|
+
this.sourceId.write(output);
|
181
|
+
output.writeFieldEnd();
|
182
|
+
}
|
183
|
+
if (this.linkTargetList !== null && this.linkTargetList !== undefined) {
|
184
|
+
output.writeFieldBegin('linkTargetList', Thrift.Type.LIST, 2);
|
185
|
+
output.writeListBegin(Thrift.Type.STRUCT, this.linkTargetList.length);
|
186
|
+
for (let iter4 in this.linkTargetList) {
|
187
|
+
if (this.linkTargetList.hasOwnProperty(iter4)) {
|
188
|
+
iter4 = this.linkTargetList[iter4];
|
189
|
+
iter4.write(output);
|
190
|
+
}
|
191
|
+
}
|
192
|
+
output.writeListEnd();
|
193
|
+
output.writeFieldEnd();
|
194
|
+
}
|
195
|
+
output.writeFieldStop();
|
196
|
+
output.writeStructEnd();
|
197
|
+
return;
|
198
|
+
}
|
199
|
+
|
200
|
+
};
|
201
|
+
const Linking = module.exports.Linking = class {
|
202
|
+
constructor(args) {
|
203
|
+
this.metadata = null;
|
204
|
+
this.linkList = null;
|
205
|
+
if (args) {
|
206
|
+
if (args.metadata !== undefined && args.metadata !== null) {
|
207
|
+
this.metadata = new metadata_ttypes.AnnotationMetadata(args.metadata);
|
208
|
+
} else {
|
209
|
+
throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field metadata is unset!');
|
210
|
+
}
|
211
|
+
if (args.linkList !== undefined && args.linkList !== null) {
|
212
|
+
this.linkList = Thrift.copyList(args.linkList, [ttypes.Link]);
|
213
|
+
} else {
|
214
|
+
throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field linkList is unset!');
|
215
|
+
}
|
216
|
+
}
|
217
|
+
}
|
218
|
+
|
219
|
+
read (input) {
|
220
|
+
input.readStructBegin();
|
221
|
+
while (true) {
|
222
|
+
const ret = input.readFieldBegin();
|
223
|
+
const ftype = ret.ftype;
|
224
|
+
const fid = ret.fid;
|
225
|
+
if (ftype == Thrift.Type.STOP) {
|
226
|
+
break;
|
227
|
+
}
|
228
|
+
switch (fid) {
|
229
|
+
case 1:
|
230
|
+
if (ftype == Thrift.Type.STRUCT) {
|
231
|
+
this.metadata = new metadata_ttypes.AnnotationMetadata();
|
232
|
+
this.metadata.read(input);
|
233
|
+
} else {
|
234
|
+
input.skip(ftype);
|
235
|
+
}
|
236
|
+
break;
|
237
|
+
case 2:
|
238
|
+
if (ftype == Thrift.Type.LIST) {
|
239
|
+
this.linkList = [];
|
240
|
+
const _rtmp36 = input.readListBegin();
|
241
|
+
const _size5 = _rtmp36.size || 0;
|
242
|
+
for (let _i7 = 0; _i7 < _size5; ++_i7) {
|
243
|
+
let elem8 = null;
|
244
|
+
elem8 = new ttypes.Link();
|
245
|
+
elem8.read(input);
|
246
|
+
this.linkList.push(elem8);
|
247
|
+
}
|
248
|
+
input.readListEnd();
|
249
|
+
} else {
|
250
|
+
input.skip(ftype);
|
251
|
+
}
|
252
|
+
break;
|
253
|
+
default:
|
254
|
+
input.skip(ftype);
|
255
|
+
}
|
256
|
+
input.readFieldEnd();
|
257
|
+
}
|
258
|
+
input.readStructEnd();
|
259
|
+
return;
|
260
|
+
}
|
261
|
+
|
262
|
+
write (output) {
|
263
|
+
output.writeStructBegin('Linking');
|
264
|
+
if (this.metadata !== null && this.metadata !== undefined) {
|
265
|
+
output.writeFieldBegin('metadata', Thrift.Type.STRUCT, 1);
|
266
|
+
this.metadata.write(output);
|
267
|
+
output.writeFieldEnd();
|
268
|
+
}
|
269
|
+
if (this.linkList !== null && this.linkList !== undefined) {
|
270
|
+
output.writeFieldBegin('linkList', Thrift.Type.LIST, 2);
|
271
|
+
output.writeListBegin(Thrift.Type.STRUCT, this.linkList.length);
|
272
|
+
for (let iter9 in this.linkList) {
|
273
|
+
if (this.linkList.hasOwnProperty(iter9)) {
|
274
|
+
iter9 = this.linkList[iter9];
|
275
|
+
iter9.write(output);
|
276
|
+
}
|
277
|
+
}
|
278
|
+
output.writeListEnd();
|
279
|
+
output.writeFieldEnd();
|
280
|
+
}
|
281
|
+
output.writeFieldStop();
|
282
|
+
output.writeStructEnd();
|
283
|
+
return;
|
284
|
+
}
|
285
|
+
|
286
|
+
};
|