iudex-brutefuzzy-protobuf 1.2.b.0-java

Sign up to get free protection for your applications and to get access to all the features.
data/History.rdoc ADDED
@@ -0,0 +1,2 @@
1
+ === 1.2.b.0 (2012-3-4)
2
+ * Initial release.
data/Manifest.txt ADDED
@@ -0,0 +1,12 @@
1
+ History.rdoc
2
+ Manifest.txt
3
+ README.rdoc
4
+ Rakefile
5
+ pom.xml
6
+ lib/iudex-brutefuzzy-protobuf/base.rb
7
+ lib/iudex-brutefuzzy-protobuf.rb
8
+ proto/brutefuzzy.proto
9
+ test/setup.rb
10
+ test/test_protobuf.rb
11
+ src/main/java/iudex/brutefuzzy/protobuf/ProtocolBuffers.java
12
+ lib/iudex-brutefuzzy-protobuf/iudex-brutefuzzy-protobuf-1.2.b.0.jar
data/README.rdoc ADDED
@@ -0,0 +1,33 @@
1
+ = iudex-brutefuzzy-protobuf
2
+
3
+ * http://github.com/dekellum/iudex
4
+
5
+ == Description
6
+
7
+ Iudex is a general purpose web crawler and feed processor in
8
+ ruby/java. The iudex-brutefuzzy-protobuf gem contains the protocol
9
+ buffer generated java classes for the iudex-brutefuzzy-service.
10
+
11
+ == Dependencies
12
+
13
+ * Java 1.5+
14
+
15
+ For tests:
16
+
17
+ * JRuby 1.3+
18
+
19
+ == License
20
+
21
+ Copyright (c) 2008-2012 David Kellum
22
+
23
+ Licensed under the Apache License, Version 2.0 (the "License"); you
24
+ may not use this file except in compliance with the License. You
25
+ may obtain a copy of the License at:
26
+
27
+ http://www.apache.org/licenses/LICENSE-2.0
28
+
29
+ Unless required by applicable law or agreed to in writing, software
30
+ distributed under the License is distributed on an "AS IS" BASIS,
31
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
32
+ implied. See the License for the specific language governing
33
+ permissions and limitations under the License.
data/Rakefile ADDED
@@ -0,0 +1,15 @@
1
+ # -*- ruby -*-
2
+
3
+ require 'rubygems'
4
+ require 'bundler/setup'
5
+ require 'rjack-tarpit'
6
+
7
+ RJack::TarPit.new( 'iudex-brutefuzzy-protobuf' ).define_tasks
8
+
9
+ directory 'src/main/java'
10
+
11
+ messages_java = 'src/main/java/iudex/brutefuzzy/protobuf/ProtocolBuffers.java'
12
+
13
+ file messages_java => [ 'proto/brutefuzzy.proto', 'src/main/java' ] do
14
+ sh "protoc --java_out=src/main/java proto/brutefuzzy.proto"
15
+ end
@@ -0,0 +1,23 @@
1
+ #--
2
+ # Copyright (c) 2008-2012 David Kellum
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License"); you
5
+ # may not use this file except in compliance with the License. You may
6
+ # obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13
+ # implied. See the License for the specific language governing
14
+ # permissions and limitations under the License.
15
+ #++
16
+
17
+ module Iudex
18
+ module BruteFuzzy
19
+ module Protobuf
20
+ VERSION = '1.2.b.0'
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,29 @@
1
+ #--
2
+ # Copyright (c) 2008-2012 David Kellum
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License"); you
5
+ # may not use this file except in compliance with the License. You may
6
+ # obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13
+ # implied. See the License for the specific language governing
14
+ # permissions and limitations under the License.
15
+ #++
16
+
17
+ require 'rjack-protobuf'
18
+
19
+ require 'iudex-brutefuzzy-protobuf/base.rb'
20
+
21
+ require 'java'
22
+
23
+ module Iudex
24
+ module BruteFuzzy
25
+ module Protobuf
26
+ require "iudex-brutefuzzy-protobuf/iudex-brutefuzzy-protobuf-#{VERSION}.jar"
27
+ end
28
+ end
29
+ end
data/pom.xml ADDED
@@ -0,0 +1,37 @@
1
+ <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
2
+ <modelVersion>4.0.0</modelVersion>
3
+ <groupId>iudex</groupId>
4
+ <artifactId>iudex-brutefuzzy-protobuf</artifactId>
5
+ <packaging>jar</packaging>
6
+ <version>1.2.b.0</version>
7
+ <name>Iudex BruteFuzzy Service Protocol Buffers</name>
8
+
9
+ <parent>
10
+ <groupId>iudex</groupId>
11
+ <artifactId>iudex-parent</artifactId>
12
+ <version>1.2.b.0</version>
13
+ <relativePath>..</relativePath>
14
+ </parent>
15
+
16
+ <dependencies>
17
+ <dependency>
18
+ <groupId>com.google.protobuf</groupId>
19
+ <artifactId>protobuf-java</artifactId>
20
+ <version>2.4.1</version>
21
+ </dependency>
22
+ </dependencies>
23
+
24
+ <build>
25
+ <plugins>
26
+ <plugin>
27
+ <!-- Parent settings -->
28
+ <artifactId>maven-compiler-plugin</artifactId>
29
+ </plugin>
30
+ <plugin>
31
+ <!-- Parent settings -->
32
+ <artifactId>maven-source-plugin</artifactId>
33
+ </plugin>
34
+ </plugins>
35
+ </build>
36
+
37
+ </project>
@@ -0,0 +1,36 @@
1
+ /*
2
+ * Copyright (c) 2008-2012 David Kellum
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License"); you
5
+ * may not use this file except in compliance with the License. You may
6
+ * obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13
+ * implied. See the License for the specific language governing
14
+ * permissions and limitations under the License.
15
+ */
16
+
17
+ package iudex.brutefuzzy.protobuf;
18
+ // option java_package = "iudex.brutefuzzy.protobuf";
19
+
20
+ option java_outer_classname = "ProtocolBuffers";
21
+
22
+ enum RequestAction {
23
+ CHECK_ONLY = 0;
24
+ ADD = 1;
25
+ REMOVE = 3;
26
+ }
27
+
28
+ message Request {
29
+ required sfixed64 simhash = 1;
30
+ optional RequestAction action = 2 [ default = CHECK_ONLY ];
31
+ }
32
+
33
+ message Response {
34
+ required sfixed64 simhash = 1;
35
+ repeated sfixed64 matches = 2;
36
+ }
@@ -0,0 +1,1004 @@
1
+ // Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ // source: proto/brutefuzzy.proto
3
+
4
+ package iudex.brutefuzzy.protobuf;
5
+
6
+ public final class ProtocolBuffers {
7
+ private ProtocolBuffers() {}
8
+ public static void registerAllExtensions(
9
+ com.google.protobuf.ExtensionRegistry registry) {
10
+ }
11
+ public enum RequestAction
12
+ implements com.google.protobuf.ProtocolMessageEnum {
13
+ CHECK_ONLY(0, 0),
14
+ ADD(1, 1),
15
+ REMOVE(2, 3),
16
+ ;
17
+
18
+ public static final int CHECK_ONLY_VALUE = 0;
19
+ public static final int ADD_VALUE = 1;
20
+ public static final int REMOVE_VALUE = 3;
21
+
22
+
23
+ public final int getNumber() { return value; }
24
+
25
+ public static RequestAction valueOf(int value) {
26
+ switch (value) {
27
+ case 0: return CHECK_ONLY;
28
+ case 1: return ADD;
29
+ case 3: return REMOVE;
30
+ default: return null;
31
+ }
32
+ }
33
+
34
+ public static com.google.protobuf.Internal.EnumLiteMap<RequestAction>
35
+ internalGetValueMap() {
36
+ return internalValueMap;
37
+ }
38
+ private static com.google.protobuf.Internal.EnumLiteMap<RequestAction>
39
+ internalValueMap =
40
+ new com.google.protobuf.Internal.EnumLiteMap<RequestAction>() {
41
+ public RequestAction findValueByNumber(int number) {
42
+ return RequestAction.valueOf(number);
43
+ }
44
+ };
45
+
46
+ public final com.google.protobuf.Descriptors.EnumValueDescriptor
47
+ getValueDescriptor() {
48
+ return getDescriptor().getValues().get(index);
49
+ }
50
+ public final com.google.protobuf.Descriptors.EnumDescriptor
51
+ getDescriptorForType() {
52
+ return getDescriptor();
53
+ }
54
+ public static final com.google.protobuf.Descriptors.EnumDescriptor
55
+ getDescriptor() {
56
+ return iudex.brutefuzzy.protobuf.ProtocolBuffers.getDescriptor().getEnumTypes().get(0);
57
+ }
58
+
59
+ private static final RequestAction[] VALUES = {
60
+ CHECK_ONLY, ADD, REMOVE,
61
+ };
62
+
63
+ public static RequestAction valueOf(
64
+ com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
65
+ if (desc.getType() != getDescriptor()) {
66
+ throw new java.lang.IllegalArgumentException(
67
+ "EnumValueDescriptor is not for this type.");
68
+ }
69
+ return VALUES[desc.getIndex()];
70
+ }
71
+
72
+ private final int index;
73
+ private final int value;
74
+
75
+ private RequestAction(int index, int value) {
76
+ this.index = index;
77
+ this.value = value;
78
+ }
79
+
80
+ // @@protoc_insertion_point(enum_scope:iudex.brutefuzzy.protobuf.RequestAction)
81
+ }
82
+
83
+ public interface RequestOrBuilder
84
+ extends com.google.protobuf.MessageOrBuilder {
85
+
86
+ // required sfixed64 simhash = 1;
87
+ boolean hasSimhash();
88
+ long getSimhash();
89
+
90
+ // optional .iudex.brutefuzzy.protobuf.RequestAction action = 2 [default = CHECK_ONLY];
91
+ boolean hasAction();
92
+ iudex.brutefuzzy.protobuf.ProtocolBuffers.RequestAction getAction();
93
+ }
94
+ public static final class Request extends
95
+ com.google.protobuf.GeneratedMessage
96
+ implements RequestOrBuilder {
97
+ // Use Request.newBuilder() to construct.
98
+ private Request(Builder builder) {
99
+ super(builder);
100
+ }
101
+ private Request(boolean noInit) {}
102
+
103
+ private static final Request defaultInstance;
104
+ public static Request getDefaultInstance() {
105
+ return defaultInstance;
106
+ }
107
+
108
+ public Request getDefaultInstanceForType() {
109
+ return defaultInstance;
110
+ }
111
+
112
+ public static final com.google.protobuf.Descriptors.Descriptor
113
+ getDescriptor() {
114
+ return iudex.brutefuzzy.protobuf.ProtocolBuffers.internal_static_iudex_brutefuzzy_protobuf_Request_descriptor;
115
+ }
116
+
117
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
118
+ internalGetFieldAccessorTable() {
119
+ return iudex.brutefuzzy.protobuf.ProtocolBuffers.internal_static_iudex_brutefuzzy_protobuf_Request_fieldAccessorTable;
120
+ }
121
+
122
+ private int bitField0_;
123
+ // required sfixed64 simhash = 1;
124
+ public static final int SIMHASH_FIELD_NUMBER = 1;
125
+ private long simhash_;
126
+ public boolean hasSimhash() {
127
+ return ((bitField0_ & 0x00000001) == 0x00000001);
128
+ }
129
+ public long getSimhash() {
130
+ return simhash_;
131
+ }
132
+
133
+ // optional .iudex.brutefuzzy.protobuf.RequestAction action = 2 [default = CHECK_ONLY];
134
+ public static final int ACTION_FIELD_NUMBER = 2;
135
+ private iudex.brutefuzzy.protobuf.ProtocolBuffers.RequestAction action_;
136
+ public boolean hasAction() {
137
+ return ((bitField0_ & 0x00000002) == 0x00000002);
138
+ }
139
+ public iudex.brutefuzzy.protobuf.ProtocolBuffers.RequestAction getAction() {
140
+ return action_;
141
+ }
142
+
143
+ private void initFields() {
144
+ simhash_ = 0L;
145
+ action_ = iudex.brutefuzzy.protobuf.ProtocolBuffers.RequestAction.CHECK_ONLY;
146
+ }
147
+ private byte memoizedIsInitialized = -1;
148
+ public final boolean isInitialized() {
149
+ byte isInitialized = memoizedIsInitialized;
150
+ if (isInitialized != -1) return isInitialized == 1;
151
+
152
+ if (!hasSimhash()) {
153
+ memoizedIsInitialized = 0;
154
+ return false;
155
+ }
156
+ memoizedIsInitialized = 1;
157
+ return true;
158
+ }
159
+
160
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
161
+ throws java.io.IOException {
162
+ getSerializedSize();
163
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
164
+ output.writeSFixed64(1, simhash_);
165
+ }
166
+ if (((bitField0_ & 0x00000002) == 0x00000002)) {
167
+ output.writeEnum(2, action_.getNumber());
168
+ }
169
+ getUnknownFields().writeTo(output);
170
+ }
171
+
172
+ private int memoizedSerializedSize = -1;
173
+ public int getSerializedSize() {
174
+ int size = memoizedSerializedSize;
175
+ if (size != -1) return size;
176
+
177
+ size = 0;
178
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
179
+ size += com.google.protobuf.CodedOutputStream
180
+ .computeSFixed64Size(1, simhash_);
181
+ }
182
+ if (((bitField0_ & 0x00000002) == 0x00000002)) {
183
+ size += com.google.protobuf.CodedOutputStream
184
+ .computeEnumSize(2, action_.getNumber());
185
+ }
186
+ size += getUnknownFields().getSerializedSize();
187
+ memoizedSerializedSize = size;
188
+ return size;
189
+ }
190
+
191
+ private static final long serialVersionUID = 0L;
192
+ @java.lang.Override
193
+ protected java.lang.Object writeReplace()
194
+ throws java.io.ObjectStreamException {
195
+ return super.writeReplace();
196
+ }
197
+
198
+ public static iudex.brutefuzzy.protobuf.ProtocolBuffers.Request parseFrom(
199
+ com.google.protobuf.ByteString data)
200
+ throws com.google.protobuf.InvalidProtocolBufferException {
201
+ return newBuilder().mergeFrom(data).buildParsed();
202
+ }
203
+ public static iudex.brutefuzzy.protobuf.ProtocolBuffers.Request parseFrom(
204
+ com.google.protobuf.ByteString data,
205
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
206
+ throws com.google.protobuf.InvalidProtocolBufferException {
207
+ return newBuilder().mergeFrom(data, extensionRegistry)
208
+ .buildParsed();
209
+ }
210
+ public static iudex.brutefuzzy.protobuf.ProtocolBuffers.Request parseFrom(byte[] data)
211
+ throws com.google.protobuf.InvalidProtocolBufferException {
212
+ return newBuilder().mergeFrom(data).buildParsed();
213
+ }
214
+ public static iudex.brutefuzzy.protobuf.ProtocolBuffers.Request parseFrom(
215
+ byte[] data,
216
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
217
+ throws com.google.protobuf.InvalidProtocolBufferException {
218
+ return newBuilder().mergeFrom(data, extensionRegistry)
219
+ .buildParsed();
220
+ }
221
+ public static iudex.brutefuzzy.protobuf.ProtocolBuffers.Request parseFrom(java.io.InputStream input)
222
+ throws java.io.IOException {
223
+ return newBuilder().mergeFrom(input).buildParsed();
224
+ }
225
+ public static iudex.brutefuzzy.protobuf.ProtocolBuffers.Request parseFrom(
226
+ java.io.InputStream input,
227
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
228
+ throws java.io.IOException {
229
+ return newBuilder().mergeFrom(input, extensionRegistry)
230
+ .buildParsed();
231
+ }
232
+ public static iudex.brutefuzzy.protobuf.ProtocolBuffers.Request parseDelimitedFrom(java.io.InputStream input)
233
+ throws java.io.IOException {
234
+ Builder builder = newBuilder();
235
+ if (builder.mergeDelimitedFrom(input)) {
236
+ return builder.buildParsed();
237
+ } else {
238
+ return null;
239
+ }
240
+ }
241
+ public static iudex.brutefuzzy.protobuf.ProtocolBuffers.Request parseDelimitedFrom(
242
+ java.io.InputStream input,
243
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
244
+ throws java.io.IOException {
245
+ Builder builder = newBuilder();
246
+ if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
247
+ return builder.buildParsed();
248
+ } else {
249
+ return null;
250
+ }
251
+ }
252
+ public static iudex.brutefuzzy.protobuf.ProtocolBuffers.Request parseFrom(
253
+ com.google.protobuf.CodedInputStream input)
254
+ throws java.io.IOException {
255
+ return newBuilder().mergeFrom(input).buildParsed();
256
+ }
257
+ public static iudex.brutefuzzy.protobuf.ProtocolBuffers.Request parseFrom(
258
+ com.google.protobuf.CodedInputStream input,
259
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
260
+ throws java.io.IOException {
261
+ return newBuilder().mergeFrom(input, extensionRegistry)
262
+ .buildParsed();
263
+ }
264
+
265
+ public static Builder newBuilder() { return Builder.create(); }
266
+ public Builder newBuilderForType() { return newBuilder(); }
267
+ public static Builder newBuilder(iudex.brutefuzzy.protobuf.ProtocolBuffers.Request prototype) {
268
+ return newBuilder().mergeFrom(prototype);
269
+ }
270
+ public Builder toBuilder() { return newBuilder(this); }
271
+
272
+ @java.lang.Override
273
+ protected Builder newBuilderForType(
274
+ com.google.protobuf.GeneratedMessage.BuilderParent parent) {
275
+ Builder builder = new Builder(parent);
276
+ return builder;
277
+ }
278
+ public static final class Builder extends
279
+ com.google.protobuf.GeneratedMessage.Builder<Builder>
280
+ implements iudex.brutefuzzy.protobuf.ProtocolBuffers.RequestOrBuilder {
281
+ public static final com.google.protobuf.Descriptors.Descriptor
282
+ getDescriptor() {
283
+ return iudex.brutefuzzy.protobuf.ProtocolBuffers.internal_static_iudex_brutefuzzy_protobuf_Request_descriptor;
284
+ }
285
+
286
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
287
+ internalGetFieldAccessorTable() {
288
+ return iudex.brutefuzzy.protobuf.ProtocolBuffers.internal_static_iudex_brutefuzzy_protobuf_Request_fieldAccessorTable;
289
+ }
290
+
291
+ // Construct using iudex.brutefuzzy.protobuf.ProtocolBuffers.Request.newBuilder()
292
+ private Builder() {
293
+ maybeForceBuilderInitialization();
294
+ }
295
+
296
+ private Builder(BuilderParent parent) {
297
+ super(parent);
298
+ maybeForceBuilderInitialization();
299
+ }
300
+ private void maybeForceBuilderInitialization() {
301
+ if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
302
+ }
303
+ }
304
+ private static Builder create() {
305
+ return new Builder();
306
+ }
307
+
308
+ public Builder clear() {
309
+ super.clear();
310
+ simhash_ = 0L;
311
+ bitField0_ = (bitField0_ & ~0x00000001);
312
+ action_ = iudex.brutefuzzy.protobuf.ProtocolBuffers.RequestAction.CHECK_ONLY;
313
+ bitField0_ = (bitField0_ & ~0x00000002);
314
+ return this;
315
+ }
316
+
317
+ public Builder clone() {
318
+ return create().mergeFrom(buildPartial());
319
+ }
320
+
321
+ public com.google.protobuf.Descriptors.Descriptor
322
+ getDescriptorForType() {
323
+ return iudex.brutefuzzy.protobuf.ProtocolBuffers.Request.getDescriptor();
324
+ }
325
+
326
+ public iudex.brutefuzzy.protobuf.ProtocolBuffers.Request getDefaultInstanceForType() {
327
+ return iudex.brutefuzzy.protobuf.ProtocolBuffers.Request.getDefaultInstance();
328
+ }
329
+
330
+ public iudex.brutefuzzy.protobuf.ProtocolBuffers.Request build() {
331
+ iudex.brutefuzzy.protobuf.ProtocolBuffers.Request result = buildPartial();
332
+ if (!result.isInitialized()) {
333
+ throw newUninitializedMessageException(result);
334
+ }
335
+ return result;
336
+ }
337
+
338
+ private iudex.brutefuzzy.protobuf.ProtocolBuffers.Request buildParsed()
339
+ throws com.google.protobuf.InvalidProtocolBufferException {
340
+ iudex.brutefuzzy.protobuf.ProtocolBuffers.Request result = buildPartial();
341
+ if (!result.isInitialized()) {
342
+ throw newUninitializedMessageException(
343
+ result).asInvalidProtocolBufferException();
344
+ }
345
+ return result;
346
+ }
347
+
348
+ public iudex.brutefuzzy.protobuf.ProtocolBuffers.Request buildPartial() {
349
+ iudex.brutefuzzy.protobuf.ProtocolBuffers.Request result = new iudex.brutefuzzy.protobuf.ProtocolBuffers.Request(this);
350
+ int from_bitField0_ = bitField0_;
351
+ int to_bitField0_ = 0;
352
+ if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
353
+ to_bitField0_ |= 0x00000001;
354
+ }
355
+ result.simhash_ = simhash_;
356
+ if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
357
+ to_bitField0_ |= 0x00000002;
358
+ }
359
+ result.action_ = action_;
360
+ result.bitField0_ = to_bitField0_;
361
+ onBuilt();
362
+ return result;
363
+ }
364
+
365
+ public Builder mergeFrom(com.google.protobuf.Message other) {
366
+ if (other instanceof iudex.brutefuzzy.protobuf.ProtocolBuffers.Request) {
367
+ return mergeFrom((iudex.brutefuzzy.protobuf.ProtocolBuffers.Request)other);
368
+ } else {
369
+ super.mergeFrom(other);
370
+ return this;
371
+ }
372
+ }
373
+
374
+ public Builder mergeFrom(iudex.brutefuzzy.protobuf.ProtocolBuffers.Request other) {
375
+ if (other == iudex.brutefuzzy.protobuf.ProtocolBuffers.Request.getDefaultInstance()) return this;
376
+ if (other.hasSimhash()) {
377
+ setSimhash(other.getSimhash());
378
+ }
379
+ if (other.hasAction()) {
380
+ setAction(other.getAction());
381
+ }
382
+ this.mergeUnknownFields(other.getUnknownFields());
383
+ return this;
384
+ }
385
+
386
+ public final boolean isInitialized() {
387
+ if (!hasSimhash()) {
388
+
389
+ return false;
390
+ }
391
+ return true;
392
+ }
393
+
394
+ public Builder mergeFrom(
395
+ com.google.protobuf.CodedInputStream input,
396
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
397
+ throws java.io.IOException {
398
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
399
+ com.google.protobuf.UnknownFieldSet.newBuilder(
400
+ this.getUnknownFields());
401
+ while (true) {
402
+ int tag = input.readTag();
403
+ switch (tag) {
404
+ case 0:
405
+ this.setUnknownFields(unknownFields.build());
406
+ onChanged();
407
+ return this;
408
+ default: {
409
+ if (!parseUnknownField(input, unknownFields,
410
+ extensionRegistry, tag)) {
411
+ this.setUnknownFields(unknownFields.build());
412
+ onChanged();
413
+ return this;
414
+ }
415
+ break;
416
+ }
417
+ case 9: {
418
+ bitField0_ |= 0x00000001;
419
+ simhash_ = input.readSFixed64();
420
+ break;
421
+ }
422
+ case 16: {
423
+ int rawValue = input.readEnum();
424
+ iudex.brutefuzzy.protobuf.ProtocolBuffers.RequestAction value = iudex.brutefuzzy.protobuf.ProtocolBuffers.RequestAction.valueOf(rawValue);
425
+ if (value == null) {
426
+ unknownFields.mergeVarintField(2, rawValue);
427
+ } else {
428
+ bitField0_ |= 0x00000002;
429
+ action_ = value;
430
+ }
431
+ break;
432
+ }
433
+ }
434
+ }
435
+ }
436
+
437
+ private int bitField0_;
438
+
439
+ // required sfixed64 simhash = 1;
440
+ private long simhash_ ;
441
+ public boolean hasSimhash() {
442
+ return ((bitField0_ & 0x00000001) == 0x00000001);
443
+ }
444
+ public long getSimhash() {
445
+ return simhash_;
446
+ }
447
+ public Builder setSimhash(long value) {
448
+ bitField0_ |= 0x00000001;
449
+ simhash_ = value;
450
+ onChanged();
451
+ return this;
452
+ }
453
+ public Builder clearSimhash() {
454
+ bitField0_ = (bitField0_ & ~0x00000001);
455
+ simhash_ = 0L;
456
+ onChanged();
457
+ return this;
458
+ }
459
+
460
+ // optional .iudex.brutefuzzy.protobuf.RequestAction action = 2 [default = CHECK_ONLY];
461
+ private iudex.brutefuzzy.protobuf.ProtocolBuffers.RequestAction action_ = iudex.brutefuzzy.protobuf.ProtocolBuffers.RequestAction.CHECK_ONLY;
462
+ public boolean hasAction() {
463
+ return ((bitField0_ & 0x00000002) == 0x00000002);
464
+ }
465
+ public iudex.brutefuzzy.protobuf.ProtocolBuffers.RequestAction getAction() {
466
+ return action_;
467
+ }
468
+ public Builder setAction(iudex.brutefuzzy.protobuf.ProtocolBuffers.RequestAction value) {
469
+ if (value == null) {
470
+ throw new NullPointerException();
471
+ }
472
+ bitField0_ |= 0x00000002;
473
+ action_ = value;
474
+ onChanged();
475
+ return this;
476
+ }
477
+ public Builder clearAction() {
478
+ bitField0_ = (bitField0_ & ~0x00000002);
479
+ action_ = iudex.brutefuzzy.protobuf.ProtocolBuffers.RequestAction.CHECK_ONLY;
480
+ onChanged();
481
+ return this;
482
+ }
483
+
484
+ // @@protoc_insertion_point(builder_scope:iudex.brutefuzzy.protobuf.Request)
485
+ }
486
+
487
+ static {
488
+ defaultInstance = new Request(true);
489
+ defaultInstance.initFields();
490
+ }
491
+
492
+ // @@protoc_insertion_point(class_scope:iudex.brutefuzzy.protobuf.Request)
493
+ }
494
+
495
+ public interface ResponseOrBuilder
496
+ extends com.google.protobuf.MessageOrBuilder {
497
+
498
+ // required sfixed64 simhash = 1;
499
+ boolean hasSimhash();
500
+ long getSimhash();
501
+
502
+ // repeated sfixed64 matches = 2;
503
+ java.util.List<java.lang.Long> getMatchesList();
504
+ int getMatchesCount();
505
+ long getMatches(int index);
506
+ }
507
+ public static final class Response extends
508
+ com.google.protobuf.GeneratedMessage
509
+ implements ResponseOrBuilder {
510
+ // Use Response.newBuilder() to construct.
511
+ private Response(Builder builder) {
512
+ super(builder);
513
+ }
514
+ private Response(boolean noInit) {}
515
+
516
+ private static final Response defaultInstance;
517
+ public static Response getDefaultInstance() {
518
+ return defaultInstance;
519
+ }
520
+
521
+ public Response getDefaultInstanceForType() {
522
+ return defaultInstance;
523
+ }
524
+
525
+ public static final com.google.protobuf.Descriptors.Descriptor
526
+ getDescriptor() {
527
+ return iudex.brutefuzzy.protobuf.ProtocolBuffers.internal_static_iudex_brutefuzzy_protobuf_Response_descriptor;
528
+ }
529
+
530
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
531
+ internalGetFieldAccessorTable() {
532
+ return iudex.brutefuzzy.protobuf.ProtocolBuffers.internal_static_iudex_brutefuzzy_protobuf_Response_fieldAccessorTable;
533
+ }
534
+
535
+ private int bitField0_;
536
+ // required sfixed64 simhash = 1;
537
+ public static final int SIMHASH_FIELD_NUMBER = 1;
538
+ private long simhash_;
539
+ public boolean hasSimhash() {
540
+ return ((bitField0_ & 0x00000001) == 0x00000001);
541
+ }
542
+ public long getSimhash() {
543
+ return simhash_;
544
+ }
545
+
546
+ // repeated sfixed64 matches = 2;
547
+ public static final int MATCHES_FIELD_NUMBER = 2;
548
+ private java.util.List<java.lang.Long> matches_;
549
+ public java.util.List<java.lang.Long>
550
+ getMatchesList() {
551
+ return matches_;
552
+ }
553
+ public int getMatchesCount() {
554
+ return matches_.size();
555
+ }
556
+ public long getMatches(int index) {
557
+ return matches_.get(index);
558
+ }
559
+
560
+ private void initFields() {
561
+ simhash_ = 0L;
562
+ matches_ = java.util.Collections.emptyList();;
563
+ }
564
+ private byte memoizedIsInitialized = -1;
565
+ public final boolean isInitialized() {
566
+ byte isInitialized = memoizedIsInitialized;
567
+ if (isInitialized != -1) return isInitialized == 1;
568
+
569
+ if (!hasSimhash()) {
570
+ memoizedIsInitialized = 0;
571
+ return false;
572
+ }
573
+ memoizedIsInitialized = 1;
574
+ return true;
575
+ }
576
+
577
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
578
+ throws java.io.IOException {
579
+ getSerializedSize();
580
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
581
+ output.writeSFixed64(1, simhash_);
582
+ }
583
+ for (int i = 0; i < matches_.size(); i++) {
584
+ output.writeSFixed64(2, matches_.get(i));
585
+ }
586
+ getUnknownFields().writeTo(output);
587
+ }
588
+
589
+ private int memoizedSerializedSize = -1;
590
+ public int getSerializedSize() {
591
+ int size = memoizedSerializedSize;
592
+ if (size != -1) return size;
593
+
594
+ size = 0;
595
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
596
+ size += com.google.protobuf.CodedOutputStream
597
+ .computeSFixed64Size(1, simhash_);
598
+ }
599
+ {
600
+ int dataSize = 0;
601
+ dataSize = 8 * getMatchesList().size();
602
+ size += dataSize;
603
+ size += 1 * getMatchesList().size();
604
+ }
605
+ size += getUnknownFields().getSerializedSize();
606
+ memoizedSerializedSize = size;
607
+ return size;
608
+ }
609
+
610
+ private static final long serialVersionUID = 0L;
611
+ @java.lang.Override
612
+ protected java.lang.Object writeReplace()
613
+ throws java.io.ObjectStreamException {
614
+ return super.writeReplace();
615
+ }
616
+
617
+ public static iudex.brutefuzzy.protobuf.ProtocolBuffers.Response parseFrom(
618
+ com.google.protobuf.ByteString data)
619
+ throws com.google.protobuf.InvalidProtocolBufferException {
620
+ return newBuilder().mergeFrom(data).buildParsed();
621
+ }
622
+ public static iudex.brutefuzzy.protobuf.ProtocolBuffers.Response parseFrom(
623
+ com.google.protobuf.ByteString data,
624
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
625
+ throws com.google.protobuf.InvalidProtocolBufferException {
626
+ return newBuilder().mergeFrom(data, extensionRegistry)
627
+ .buildParsed();
628
+ }
629
+ public static iudex.brutefuzzy.protobuf.ProtocolBuffers.Response parseFrom(byte[] data)
630
+ throws com.google.protobuf.InvalidProtocolBufferException {
631
+ return newBuilder().mergeFrom(data).buildParsed();
632
+ }
633
+ public static iudex.brutefuzzy.protobuf.ProtocolBuffers.Response parseFrom(
634
+ byte[] data,
635
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
636
+ throws com.google.protobuf.InvalidProtocolBufferException {
637
+ return newBuilder().mergeFrom(data, extensionRegistry)
638
+ .buildParsed();
639
+ }
640
+ public static iudex.brutefuzzy.protobuf.ProtocolBuffers.Response parseFrom(java.io.InputStream input)
641
+ throws java.io.IOException {
642
+ return newBuilder().mergeFrom(input).buildParsed();
643
+ }
644
+ public static iudex.brutefuzzy.protobuf.ProtocolBuffers.Response parseFrom(
645
+ java.io.InputStream input,
646
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
647
+ throws java.io.IOException {
648
+ return newBuilder().mergeFrom(input, extensionRegistry)
649
+ .buildParsed();
650
+ }
651
+ public static iudex.brutefuzzy.protobuf.ProtocolBuffers.Response parseDelimitedFrom(java.io.InputStream input)
652
+ throws java.io.IOException {
653
+ Builder builder = newBuilder();
654
+ if (builder.mergeDelimitedFrom(input)) {
655
+ return builder.buildParsed();
656
+ } else {
657
+ return null;
658
+ }
659
+ }
660
+ public static iudex.brutefuzzy.protobuf.ProtocolBuffers.Response parseDelimitedFrom(
661
+ java.io.InputStream input,
662
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
663
+ throws java.io.IOException {
664
+ Builder builder = newBuilder();
665
+ if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
666
+ return builder.buildParsed();
667
+ } else {
668
+ return null;
669
+ }
670
+ }
671
+ public static iudex.brutefuzzy.protobuf.ProtocolBuffers.Response parseFrom(
672
+ com.google.protobuf.CodedInputStream input)
673
+ throws java.io.IOException {
674
+ return newBuilder().mergeFrom(input).buildParsed();
675
+ }
676
+ public static iudex.brutefuzzy.protobuf.ProtocolBuffers.Response parseFrom(
677
+ com.google.protobuf.CodedInputStream input,
678
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
679
+ throws java.io.IOException {
680
+ return newBuilder().mergeFrom(input, extensionRegistry)
681
+ .buildParsed();
682
+ }
683
+
684
+ public static Builder newBuilder() { return Builder.create(); }
685
+ public Builder newBuilderForType() { return newBuilder(); }
686
+ public static Builder newBuilder(iudex.brutefuzzy.protobuf.ProtocolBuffers.Response prototype) {
687
+ return newBuilder().mergeFrom(prototype);
688
+ }
689
+ public Builder toBuilder() { return newBuilder(this); }
690
+
691
+ @java.lang.Override
692
+ protected Builder newBuilderForType(
693
+ com.google.protobuf.GeneratedMessage.BuilderParent parent) {
694
+ Builder builder = new Builder(parent);
695
+ return builder;
696
+ }
697
+ public static final class Builder extends
698
+ com.google.protobuf.GeneratedMessage.Builder<Builder>
699
+ implements iudex.brutefuzzy.protobuf.ProtocolBuffers.ResponseOrBuilder {
700
+ public static final com.google.protobuf.Descriptors.Descriptor
701
+ getDescriptor() {
702
+ return iudex.brutefuzzy.protobuf.ProtocolBuffers.internal_static_iudex_brutefuzzy_protobuf_Response_descriptor;
703
+ }
704
+
705
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
706
+ internalGetFieldAccessorTable() {
707
+ return iudex.brutefuzzy.protobuf.ProtocolBuffers.internal_static_iudex_brutefuzzy_protobuf_Response_fieldAccessorTable;
708
+ }
709
+
710
+ // Construct using iudex.brutefuzzy.protobuf.ProtocolBuffers.Response.newBuilder()
711
+ private Builder() {
712
+ maybeForceBuilderInitialization();
713
+ }
714
+
715
+ private Builder(BuilderParent parent) {
716
+ super(parent);
717
+ maybeForceBuilderInitialization();
718
+ }
719
+ private void maybeForceBuilderInitialization() {
720
+ if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
721
+ }
722
+ }
723
+ private static Builder create() {
724
+ return new Builder();
725
+ }
726
+
727
+ public Builder clear() {
728
+ super.clear();
729
+ simhash_ = 0L;
730
+ bitField0_ = (bitField0_ & ~0x00000001);
731
+ matches_ = java.util.Collections.emptyList();;
732
+ bitField0_ = (bitField0_ & ~0x00000002);
733
+ return this;
734
+ }
735
+
736
+ public Builder clone() {
737
+ return create().mergeFrom(buildPartial());
738
+ }
739
+
740
+ public com.google.protobuf.Descriptors.Descriptor
741
+ getDescriptorForType() {
742
+ return iudex.brutefuzzy.protobuf.ProtocolBuffers.Response.getDescriptor();
743
+ }
744
+
745
+ public iudex.brutefuzzy.protobuf.ProtocolBuffers.Response getDefaultInstanceForType() {
746
+ return iudex.brutefuzzy.protobuf.ProtocolBuffers.Response.getDefaultInstance();
747
+ }
748
+
749
+ public iudex.brutefuzzy.protobuf.ProtocolBuffers.Response build() {
750
+ iudex.brutefuzzy.protobuf.ProtocolBuffers.Response result = buildPartial();
751
+ if (!result.isInitialized()) {
752
+ throw newUninitializedMessageException(result);
753
+ }
754
+ return result;
755
+ }
756
+
757
+ private iudex.brutefuzzy.protobuf.ProtocolBuffers.Response buildParsed()
758
+ throws com.google.protobuf.InvalidProtocolBufferException {
759
+ iudex.brutefuzzy.protobuf.ProtocolBuffers.Response result = buildPartial();
760
+ if (!result.isInitialized()) {
761
+ throw newUninitializedMessageException(
762
+ result).asInvalidProtocolBufferException();
763
+ }
764
+ return result;
765
+ }
766
+
767
+ public iudex.brutefuzzy.protobuf.ProtocolBuffers.Response buildPartial() {
768
+ iudex.brutefuzzy.protobuf.ProtocolBuffers.Response result = new iudex.brutefuzzy.protobuf.ProtocolBuffers.Response(this);
769
+ int from_bitField0_ = bitField0_;
770
+ int to_bitField0_ = 0;
771
+ if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
772
+ to_bitField0_ |= 0x00000001;
773
+ }
774
+ result.simhash_ = simhash_;
775
+ if (((bitField0_ & 0x00000002) == 0x00000002)) {
776
+ matches_ = java.util.Collections.unmodifiableList(matches_);
777
+ bitField0_ = (bitField0_ & ~0x00000002);
778
+ }
779
+ result.matches_ = matches_;
780
+ result.bitField0_ = to_bitField0_;
781
+ onBuilt();
782
+ return result;
783
+ }
784
+
785
+ public Builder mergeFrom(com.google.protobuf.Message other) {
786
+ if (other instanceof iudex.brutefuzzy.protobuf.ProtocolBuffers.Response) {
787
+ return mergeFrom((iudex.brutefuzzy.protobuf.ProtocolBuffers.Response)other);
788
+ } else {
789
+ super.mergeFrom(other);
790
+ return this;
791
+ }
792
+ }
793
+
794
+ public Builder mergeFrom(iudex.brutefuzzy.protobuf.ProtocolBuffers.Response other) {
795
+ if (other == iudex.brutefuzzy.protobuf.ProtocolBuffers.Response.getDefaultInstance()) return this;
796
+ if (other.hasSimhash()) {
797
+ setSimhash(other.getSimhash());
798
+ }
799
+ if (!other.matches_.isEmpty()) {
800
+ if (matches_.isEmpty()) {
801
+ matches_ = other.matches_;
802
+ bitField0_ = (bitField0_ & ~0x00000002);
803
+ } else {
804
+ ensureMatchesIsMutable();
805
+ matches_.addAll(other.matches_);
806
+ }
807
+ onChanged();
808
+ }
809
+ this.mergeUnknownFields(other.getUnknownFields());
810
+ return this;
811
+ }
812
+
813
+ public final boolean isInitialized() {
814
+ if (!hasSimhash()) {
815
+
816
+ return false;
817
+ }
818
+ return true;
819
+ }
820
+
821
+ public Builder mergeFrom(
822
+ com.google.protobuf.CodedInputStream input,
823
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
824
+ throws java.io.IOException {
825
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
826
+ com.google.protobuf.UnknownFieldSet.newBuilder(
827
+ this.getUnknownFields());
828
+ while (true) {
829
+ int tag = input.readTag();
830
+ switch (tag) {
831
+ case 0:
832
+ this.setUnknownFields(unknownFields.build());
833
+ onChanged();
834
+ return this;
835
+ default: {
836
+ if (!parseUnknownField(input, unknownFields,
837
+ extensionRegistry, tag)) {
838
+ this.setUnknownFields(unknownFields.build());
839
+ onChanged();
840
+ return this;
841
+ }
842
+ break;
843
+ }
844
+ case 9: {
845
+ bitField0_ |= 0x00000001;
846
+ simhash_ = input.readSFixed64();
847
+ break;
848
+ }
849
+ case 17: {
850
+ ensureMatchesIsMutable();
851
+ matches_.add(input.readSFixed64());
852
+ break;
853
+ }
854
+ case 18: {
855
+ int length = input.readRawVarint32();
856
+ int limit = input.pushLimit(length);
857
+ while (input.getBytesUntilLimit() > 0) {
858
+ addMatches(input.readSFixed64());
859
+ }
860
+ input.popLimit(limit);
861
+ break;
862
+ }
863
+ }
864
+ }
865
+ }
866
+
867
+ private int bitField0_;
868
+
869
+ // required sfixed64 simhash = 1;
870
+ private long simhash_ ;
871
+ public boolean hasSimhash() {
872
+ return ((bitField0_ & 0x00000001) == 0x00000001);
873
+ }
874
+ public long getSimhash() {
875
+ return simhash_;
876
+ }
877
+ public Builder setSimhash(long value) {
878
+ bitField0_ |= 0x00000001;
879
+ simhash_ = value;
880
+ onChanged();
881
+ return this;
882
+ }
883
+ public Builder clearSimhash() {
884
+ bitField0_ = (bitField0_ & ~0x00000001);
885
+ simhash_ = 0L;
886
+ onChanged();
887
+ return this;
888
+ }
889
+
890
+ // repeated sfixed64 matches = 2;
891
+ private java.util.List<java.lang.Long> matches_ = java.util.Collections.emptyList();;
892
+ private void ensureMatchesIsMutable() {
893
+ if (!((bitField0_ & 0x00000002) == 0x00000002)) {
894
+ matches_ = new java.util.ArrayList<java.lang.Long>(matches_);
895
+ bitField0_ |= 0x00000002;
896
+ }
897
+ }
898
+ public java.util.List<java.lang.Long>
899
+ getMatchesList() {
900
+ return java.util.Collections.unmodifiableList(matches_);
901
+ }
902
+ public int getMatchesCount() {
903
+ return matches_.size();
904
+ }
905
+ public long getMatches(int index) {
906
+ return matches_.get(index);
907
+ }
908
+ public Builder setMatches(
909
+ int index, long value) {
910
+ ensureMatchesIsMutable();
911
+ matches_.set(index, value);
912
+ onChanged();
913
+ return this;
914
+ }
915
+ public Builder addMatches(long value) {
916
+ ensureMatchesIsMutable();
917
+ matches_.add(value);
918
+ onChanged();
919
+ return this;
920
+ }
921
+ public Builder addAllMatches(
922
+ java.lang.Iterable<? extends java.lang.Long> values) {
923
+ ensureMatchesIsMutable();
924
+ super.addAll(values, matches_);
925
+ onChanged();
926
+ return this;
927
+ }
928
+ public Builder clearMatches() {
929
+ matches_ = java.util.Collections.emptyList();;
930
+ bitField0_ = (bitField0_ & ~0x00000002);
931
+ onChanged();
932
+ return this;
933
+ }
934
+
935
+ // @@protoc_insertion_point(builder_scope:iudex.brutefuzzy.protobuf.Response)
936
+ }
937
+
938
+ static {
939
+ defaultInstance = new Response(true);
940
+ defaultInstance.initFields();
941
+ }
942
+
943
+ // @@protoc_insertion_point(class_scope:iudex.brutefuzzy.protobuf.Response)
944
+ }
945
+
946
+ private static com.google.protobuf.Descriptors.Descriptor
947
+ internal_static_iudex_brutefuzzy_protobuf_Request_descriptor;
948
+ private static
949
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable
950
+ internal_static_iudex_brutefuzzy_protobuf_Request_fieldAccessorTable;
951
+ private static com.google.protobuf.Descriptors.Descriptor
952
+ internal_static_iudex_brutefuzzy_protobuf_Response_descriptor;
953
+ private static
954
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable
955
+ internal_static_iudex_brutefuzzy_protobuf_Response_fieldAccessorTable;
956
+
957
+ public static com.google.protobuf.Descriptors.FileDescriptor
958
+ getDescriptor() {
959
+ return descriptor;
960
+ }
961
+ private static com.google.protobuf.Descriptors.FileDescriptor
962
+ descriptor;
963
+ static {
964
+ java.lang.String[] descriptorData = {
965
+ "\n\026proto/brutefuzzy.proto\022\031iudex.brutefuz" +
966
+ "zy.protobuf\"`\n\007Request\022\017\n\007simhash\030\001 \002(\020\022" +
967
+ "D\n\006action\030\002 \001(\0162(.iudex.brutefuzzy.proto" +
968
+ "buf.RequestAction:\nCHECK_ONLY\",\n\010Respons" +
969
+ "e\022\017\n\007simhash\030\001 \002(\020\022\017\n\007matches\030\002 \003(\020*4\n\rR" +
970
+ "equestAction\022\016\n\nCHECK_ONLY\020\000\022\007\n\003ADD\020\001\022\n\n" +
971
+ "\006REMOVE\020\003B\021B\017ProtocolBuffers"
972
+ };
973
+ com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
974
+ new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
975
+ public com.google.protobuf.ExtensionRegistry assignDescriptors(
976
+ com.google.protobuf.Descriptors.FileDescriptor root) {
977
+ descriptor = root;
978
+ internal_static_iudex_brutefuzzy_protobuf_Request_descriptor =
979
+ getDescriptor().getMessageTypes().get(0);
980
+ internal_static_iudex_brutefuzzy_protobuf_Request_fieldAccessorTable = new
981
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable(
982
+ internal_static_iudex_brutefuzzy_protobuf_Request_descriptor,
983
+ new java.lang.String[] { "Simhash", "Action", },
984
+ iudex.brutefuzzy.protobuf.ProtocolBuffers.Request.class,
985
+ iudex.brutefuzzy.protobuf.ProtocolBuffers.Request.Builder.class);
986
+ internal_static_iudex_brutefuzzy_protobuf_Response_descriptor =
987
+ getDescriptor().getMessageTypes().get(1);
988
+ internal_static_iudex_brutefuzzy_protobuf_Response_fieldAccessorTable = new
989
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable(
990
+ internal_static_iudex_brutefuzzy_protobuf_Response_descriptor,
991
+ new java.lang.String[] { "Simhash", "Matches", },
992
+ iudex.brutefuzzy.protobuf.ProtocolBuffers.Response.class,
993
+ iudex.brutefuzzy.protobuf.ProtocolBuffers.Response.Builder.class);
994
+ return null;
995
+ }
996
+ };
997
+ com.google.protobuf.Descriptors.FileDescriptor
998
+ .internalBuildGeneratedFileFrom(descriptorData,
999
+ new com.google.protobuf.Descriptors.FileDescriptor[] {
1000
+ }, assigner);
1001
+ }
1002
+
1003
+ // @@protoc_insertion_point(outer_class_scope)
1004
+ }
data/test/setup.rb ADDED
@@ -0,0 +1,23 @@
1
+ #--
2
+ # Copyright (c) 2008-2012 David Kellum
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License"); you
5
+ # may not use this file except in compliance with the License. You
6
+ # may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13
+ # implied. See the License for the specific language governing
14
+ # permissions and limitations under the License.
15
+ #++
16
+
17
+ #### General test setup, logging, console output ####
18
+
19
+ require 'rubygems'
20
+ require 'bundler/setup'
21
+
22
+ require 'minitest/unit'
23
+ require 'minitest/autorun'
@@ -0,0 +1,31 @@
1
+ #!/usr/bin/env jruby
2
+ #.hashdot.profile += jruby-shortlived
3
+
4
+ #--
5
+ # Copyright (c) 2008-2012 David Kellum
6
+ #
7
+ # Licensed under the Apache License, Version 2.0 (the "License"); you
8
+ # may not use this file except in compliance with the License. You may
9
+ # obtain a copy of the License at
10
+ #
11
+ # http://www.apache.org/licenses/LICENSE-2.0
12
+ #
13
+ # Unless required by applicable law or agreed to in writing, software
14
+ # distributed under the License is distributed on an "AS IS" BASIS,
15
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
16
+ # implied. See the License for the specific language governing
17
+ # permissions and limitations under the License.
18
+ #++
19
+
20
+ require File.join( File.dirname( __FILE__ ), "setup" )
21
+
22
+ require 'iudex-brutefuzzy-protobuf'
23
+
24
+ class TestProtobuf < MiniTest::Unit::TestCase
25
+ include Iudex::BruteFuzzy::Protobuf
26
+
27
+ def test_load
28
+ assert( true )
29
+ end
30
+
31
+ end
metadata ADDED
@@ -0,0 +1,103 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: iudex-brutefuzzy-protobuf
3
+ version: !ruby/object:Gem::Version
4
+ prerelease: 4
5
+ version: 1.2.b.0
6
+ platform: java
7
+ authors:
8
+ - David Kellum
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+
13
+ date: 2012-03-05 00:00:00 Z
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: rjack-protobuf
17
+ version_requirements: &id001 !ruby/object:Gem::Requirement
18
+ none: false
19
+ requirements:
20
+ - - ~>
21
+ - !ruby/object:Gem::Version
22
+ version: 2.4.1
23
+ requirement: *id001
24
+ prerelease: false
25
+ type: :runtime
26
+ - !ruby/object:Gem::Dependency
27
+ name: minitest
28
+ version_requirements: &id002 !ruby/object:Gem::Requirement
29
+ none: false
30
+ requirements:
31
+ - - ~>
32
+ - !ruby/object:Gem::Version
33
+ version: "2.3"
34
+ requirement: *id002
35
+ prerelease: false
36
+ type: :development
37
+ - !ruby/object:Gem::Dependency
38
+ name: rjack-tarpit
39
+ version_requirements: &id003 !ruby/object:Gem::Requirement
40
+ none: false
41
+ requirements:
42
+ - - ~>
43
+ - !ruby/object:Gem::Version
44
+ version: "2.0"
45
+ requirement: *id003
46
+ prerelease: false
47
+ type: :development
48
+ description: Iudex is a general purpose web crawler and feed processor in ruby/java. The iudex-brutefuzzy-protobuf gem contains the protocol buffer generated java classes for the iudex-brutefuzzy-service.
49
+ email:
50
+ - dek-oss@gravitext.com
51
+ executables: []
52
+
53
+ extensions: []
54
+
55
+ extra_rdoc_files:
56
+ - History.rdoc
57
+ - README.rdoc
58
+ files:
59
+ - History.rdoc
60
+ - Manifest.txt
61
+ - README.rdoc
62
+ - Rakefile
63
+ - pom.xml
64
+ - lib/iudex-brutefuzzy-protobuf/base.rb
65
+ - lib/iudex-brutefuzzy-protobuf.rb
66
+ - proto/brutefuzzy.proto
67
+ - test/setup.rb
68
+ - test/test_protobuf.rb
69
+ - src/main/java/iudex/brutefuzzy/protobuf/ProtocolBuffers.java
70
+ - lib/iudex-brutefuzzy-protobuf/iudex-brutefuzzy-protobuf-1.2.b.0.jar
71
+ homepage: http://github.com/dekellum/iudex
72
+ licenses: []
73
+
74
+ post_install_message:
75
+ rdoc_options:
76
+ - --main
77
+ - README.rdoc
78
+ require_paths:
79
+ - lib
80
+ required_ruby_version: !ruby/object:Gem::Requirement
81
+ none: false
82
+ requirements:
83
+ - - ">="
84
+ - !ruby/object:Gem::Version
85
+ hash: 2
86
+ segments:
87
+ - 0
88
+ version: "0"
89
+ required_rubygems_version: !ruby/object:Gem::Requirement
90
+ none: false
91
+ requirements:
92
+ - - ">"
93
+ - !ruby/object:Gem::Version
94
+ version: 1.3.1
95
+ requirements: []
96
+
97
+ rubyforge_project:
98
+ rubygems_version: 1.8.15
99
+ signing_key:
100
+ specification_version: 3
101
+ summary: Iudex is a general purpose web crawler and feed processor in ruby/java.
102
+ test_files: []
103
+