-
Notifications
You must be signed in to change notification settings - Fork 1
/
OuterGoogleSpeciesList.java
443 lines (403 loc) · 17.3 KB
/
OuterGoogleSpeciesList.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
// Generated by the protocol buffer compiler. DO NOT EDIT!
package com.benjaminwicks.structureddatademo.model.protobuf.google.nano;
@SuppressWarnings("hiding")
public interface OuterGoogleSpeciesList {
final class SpeciesList extends
com.google.protobuf.nano.MessageNano {
public static final class Species extends
com.google.protobuf.nano.MessageNano {
private static volatile Species[] _emptyArray;
public static Species[] emptyArray() {
// Lazily initializes the empty array
if (_emptyArray == null) {
synchronized (
com.google.protobuf.nano.InternalNano.LAZY_INIT_LOCK) {
if (_emptyArray == null) {
_emptyArray = new Species[0];
}
}
}
return _emptyArray;
}
// optional string kingdom = 1;
public String kingdom;
// optional string parent = 2;
public String parent;
// optional string family = 3;
public String family;
// optional string imageURL = 4;
public String imageURL;
// optional string lastInterpreted = 5;
public String lastInterpreted;
// optional string accordingTo = 6;
public String accordingTo;
// optional int32 speciesKey = 7;
public int speciesKey;
// optional string canonicalName = 8;
public String canonicalName;
// optional string theClass = 9;
public String theClass;
// optional string order = 10;
public String order;
// optional string phylum = 11;
public String phylum;
// optional string scientificName = 12;
public String scientificName;
// optional string authorship = 13;
public String authorship;
// optional string genus = 14;
public String genus;
// optional int32 parentKey = 15;
public int parentKey;
// optional string species = 16;
public String species;
// optional string lastCrawled = 17;
public String lastCrawled;
public Species() {
clear();
}
public Species clear() {
kingdom = "";
parent = "";
family = "";
imageURL = "";
lastInterpreted = "";
accordingTo = "";
speciesKey = 0;
canonicalName = "";
theClass = "";
order = "";
phylum = "";
scientificName = "";
authorship = "";
genus = "";
parentKey = 0;
species = "";
lastCrawled = "";
cachedSize = -1;
return this;
}
@Override
public void writeTo(com.google.protobuf.nano.CodedOutputByteBufferNano output)
throws java.io.IOException {
if (!this.kingdom.equals("")) {
output.writeString(1, this.kingdom);
}
if (!this.parent.equals("")) {
output.writeString(2, this.parent);
}
if (!this.family.equals("")) {
output.writeString(3, this.family);
}
if (!this.imageURL.equals("")) {
output.writeString(4, this.imageURL);
}
if (!this.lastInterpreted.equals("")) {
output.writeString(5, this.lastInterpreted);
}
if (!this.accordingTo.equals("")) {
output.writeString(6, this.accordingTo);
}
if (this.speciesKey != 0) {
output.writeInt32(7, this.speciesKey);
}
if (!this.canonicalName.equals("")) {
output.writeString(8, this.canonicalName);
}
if (!this.theClass.equals("")) {
output.writeString(9, this.theClass);
}
if (!this.order.equals("")) {
output.writeString(10, this.order);
}
if (!this.phylum.equals("")) {
output.writeString(11, this.phylum);
}
if (!this.scientificName.equals("")) {
output.writeString(12, this.scientificName);
}
if (!this.authorship.equals("")) {
output.writeString(13, this.authorship);
}
if (!this.genus.equals("")) {
output.writeString(14, this.genus);
}
if (this.parentKey != 0) {
output.writeInt32(15, this.parentKey);
}
if (!this.species.equals("")) {
output.writeString(16, this.species);
}
if (!this.lastCrawled.equals("")) {
output.writeString(17, this.lastCrawled);
}
super.writeTo(output);
}
@Override
protected int computeSerializedSize() {
int size = super.computeSerializedSize();
if (!this.kingdom.equals("")) {
size += com.google.protobuf.nano.CodedOutputByteBufferNano
.computeStringSize(1, this.kingdom);
}
if (!this.parent.equals("")) {
size += com.google.protobuf.nano.CodedOutputByteBufferNano
.computeStringSize(2, this.parent);
}
if (!this.family.equals("")) {
size += com.google.protobuf.nano.CodedOutputByteBufferNano
.computeStringSize(3, this.family);
}
if (!this.imageURL.equals("")) {
size += com.google.protobuf.nano.CodedOutputByteBufferNano
.computeStringSize(4, this.imageURL);
}
if (!this.lastInterpreted.equals("")) {
size += com.google.protobuf.nano.CodedOutputByteBufferNano
.computeStringSize(5, this.lastInterpreted);
}
if (!this.accordingTo.equals("")) {
size += com.google.protobuf.nano.CodedOutputByteBufferNano
.computeStringSize(6, this.accordingTo);
}
if (this.speciesKey != 0) {
size += com.google.protobuf.nano.CodedOutputByteBufferNano
.computeInt32Size(7, this.speciesKey);
}
if (!this.canonicalName.equals("")) {
size += com.google.protobuf.nano.CodedOutputByteBufferNano
.computeStringSize(8, this.canonicalName);
}
if (!this.theClass.equals("")) {
size += com.google.protobuf.nano.CodedOutputByteBufferNano
.computeStringSize(9, this.theClass);
}
if (!this.order.equals("")) {
size += com.google.protobuf.nano.CodedOutputByteBufferNano
.computeStringSize(10, this.order);
}
if (!this.phylum.equals("")) {
size += com.google.protobuf.nano.CodedOutputByteBufferNano
.computeStringSize(11, this.phylum);
}
if (!this.scientificName.equals("")) {
size += com.google.protobuf.nano.CodedOutputByteBufferNano
.computeStringSize(12, this.scientificName);
}
if (!this.authorship.equals("")) {
size += com.google.protobuf.nano.CodedOutputByteBufferNano
.computeStringSize(13, this.authorship);
}
if (!this.genus.equals("")) {
size += com.google.protobuf.nano.CodedOutputByteBufferNano
.computeStringSize(14, this.genus);
}
if (this.parentKey != 0) {
size += com.google.protobuf.nano.CodedOutputByteBufferNano
.computeInt32Size(15, this.parentKey);
}
if (!this.species.equals("")) {
size += com.google.protobuf.nano.CodedOutputByteBufferNano
.computeStringSize(16, this.species);
}
if (!this.lastCrawled.equals("")) {
size += com.google.protobuf.nano.CodedOutputByteBufferNano
.computeStringSize(17, this.lastCrawled);
}
return size;
}
@Override
public Species mergeFrom(
com.google.protobuf.nano.CodedInputByteBufferNano input)
throws java.io.IOException {
while (true) {
int tag = input.readTag();
switch (tag) {
case 0:
return this;
default: {
if (!com.google.protobuf.nano.WireFormatNano.parseUnknownField(input, tag)) {
return this;
}
break;
}
case 10: {
this.kingdom = input.readString();
break;
}
case 18: {
this.parent = input.readString();
break;
}
case 26: {
this.family = input.readString();
break;
}
case 34: {
this.imageURL = input.readString();
break;
}
case 42: {
this.lastInterpreted = input.readString();
break;
}
case 50: {
this.accordingTo = input.readString();
break;
}
case 56: {
this.speciesKey = input.readInt32();
break;
}
case 66: {
this.canonicalName = input.readString();
break;
}
case 74: {
this.theClass = input.readString();
break;
}
case 82: {
this.order = input.readString();
break;
}
case 90: {
this.phylum = input.readString();
break;
}
case 98: {
this.scientificName = input.readString();
break;
}
case 106: {
this.authorship = input.readString();
break;
}
case 114: {
this.genus = input.readString();
break;
}
case 120: {
this.parentKey = input.readInt32();
break;
}
case 130: {
this.species = input.readString();
break;
}
case 138: {
this.lastCrawled = input.readString();
break;
}
}
}
}
public static Species parseFrom(byte[] data)
throws com.google.protobuf.nano.InvalidProtocolBufferNanoException {
return com.google.protobuf.nano.MessageNano.mergeFrom(new Species(), data);
}
public static Species parseFrom(
com.google.protobuf.nano.CodedInputByteBufferNano input)
throws java.io.IOException {
return new Species().mergeFrom(input);
}
}
private static volatile SpeciesList[] _emptyArray;
public static SpeciesList[] emptyArray() {
// Lazily initializes the empty array
if (_emptyArray == null) {
synchronized (
com.google.protobuf.nano.InternalNano.LAZY_INIT_LOCK) {
if (_emptyArray == null) {
_emptyArray = new SpeciesList[0];
}
}
}
return _emptyArray;
}
// repeated .benjaminwicks.structureddatademo.model.protobuf.google.SpeciesList.Species speciesList = 1;
public OuterGoogleSpeciesList.SpeciesList.Species[] speciesList;
public SpeciesList() {
clear();
}
public SpeciesList clear() {
speciesList = OuterGoogleSpeciesList.SpeciesList.Species.emptyArray();
cachedSize = -1;
return this;
}
@Override
public void writeTo(com.google.protobuf.nano.CodedOutputByteBufferNano output)
throws java.io.IOException {
if (this.speciesList != null && this.speciesList.length > 0) {
for (int i = 0; i < this.speciesList.length; i++) {
OuterGoogleSpeciesList.SpeciesList.Species element = this.speciesList[i];
if (element != null) {
output.writeMessage(1, element);
}
}
}
super.writeTo(output);
}
@Override
protected int computeSerializedSize() {
int size = super.computeSerializedSize();
if (this.speciesList != null && this.speciesList.length > 0) {
for (int i = 0; i < this.speciesList.length; i++) {
OuterGoogleSpeciesList.SpeciesList.Species element = this.speciesList[i];
if (element != null) {
size += com.google.protobuf.nano.CodedOutputByteBufferNano
.computeMessageSize(1, element);
}
}
}
return size;
}
@Override
public SpeciesList mergeFrom(
com.google.protobuf.nano.CodedInputByteBufferNano input)
throws java.io.IOException {
while (true) {
int tag = input.readTag();
switch (tag) {
case 0:
return this;
default: {
if (!com.google.protobuf.nano.WireFormatNano.parseUnknownField(input, tag)) {
return this;
}
break;
}
case 10: {
int arrayLength = com.google.protobuf.nano.WireFormatNano
.getRepeatedFieldArrayLength(input, 10);
int i = this.speciesList == null ? 0 : this.speciesList.length;
OuterGoogleSpeciesList.SpeciesList.Species[] newArray =
new OuterGoogleSpeciesList.SpeciesList.Species[i + arrayLength];
if (i != 0) {
System.arraycopy(this.speciesList, 0, newArray, 0, i);
}
for (; i < newArray.length - 1; i++) {
newArray[i] = new OuterGoogleSpeciesList.SpeciesList.Species();
input.readMessage(newArray[i]);
input.readTag();
}
// Last one without readTag.
newArray[i] = new OuterGoogleSpeciesList.SpeciesList.Species();
input.readMessage(newArray[i]);
this.speciesList = newArray;
break;
}
}
}
}
public static SpeciesList parseFrom(byte[] data)
throws com.google.protobuf.nano.InvalidProtocolBufferNanoException {
return com.google.protobuf.nano.MessageNano.mergeFrom(new SpeciesList(), data);
}
public static SpeciesList parseFrom(
com.google.protobuf.nano.CodedInputByteBufferNano input)
throws java.io.IOException {
return new SpeciesList().mergeFrom(input);
}
}
}