diff --git a/voter-registry/.gitignore b/voter-registry/.gitignore
index b4b41cf..a3f1a26 100644
--- a/voter-registry/.gitignore
+++ b/voter-registry/.gitignore
@@ -1,3 +1,3 @@
-/bin/
/protoc.exe
+/bin/
/comment-info.txt
\ No newline at end of file
diff --git a/voter-registry/src/main/java/meerkat/ProtobufsMessages.java b/voter-registry/src/main/java/meerkat/ProtobufsMessages.java
index b08f874..9f4a612 100644
--- a/voter-registry/src/main/java/meerkat/ProtobufsMessages.java
+++ b/voter-registry/src/main/java/meerkat/ProtobufsMessages.java
@@ -1264,983 +1264,6 @@ public final class ProtobufsMessages {
// @@protoc_insertion_point(class_scope:meerkat.BasicMessage)
}
- public interface BulletinBoardMessageOrBuilder extends
- // @@protoc_insertion_point(interface_extends:meerkat.BulletinBoardMessage)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- * repeated .meerkat.Tag tag = 1;
- */
- java.util.List
- getTagList();
- /**
- * repeated .meerkat.Tag tag = 1;
- */
- meerkat.ProtobufsMessages.Tag getTag(int index);
- /**
- * repeated .meerkat.Tag tag = 1;
- */
- int getTagCount();
- /**
- * repeated .meerkat.Tag tag = 1;
- */
- java.util.List extends meerkat.ProtobufsMessages.TagOrBuilder>
- getTagOrBuilderList();
- /**
- * repeated .meerkat.Tag tag = 1;
- */
- meerkat.ProtobufsMessages.TagOrBuilder getTagOrBuilder(
- int index);
-
- /**
- * required .meerkat.BasicMessage basicMessage = 2;
- */
- boolean hasBasicMessage();
- /**
- * required .meerkat.BasicMessage basicMessage = 2;
- */
- meerkat.ProtobufsMessages.BasicMessage getBasicMessage();
- /**
- * required .meerkat.BasicMessage basicMessage = 2;
- */
- meerkat.ProtobufsMessages.BasicMessageOrBuilder getBasicMessageOrBuilder();
-
- /**
- * optional bytes signatures = 3;
- */
- boolean hasSignatures();
- /**
- * optional bytes signatures = 3;
- */
- com.google.protobuf.ByteString getSignatures();
- }
- /**
- * Protobuf type {@code meerkat.BulletinBoardMessage}
- */
- public static final class BulletinBoardMessage extends
- com.google.protobuf.GeneratedMessage implements
- // @@protoc_insertion_point(message_implements:meerkat.BulletinBoardMessage)
- BulletinBoardMessageOrBuilder {
- // Use BulletinBoardMessage.newBuilder() to construct.
- private BulletinBoardMessage(com.google.protobuf.GeneratedMessage.Builder> builder) {
- super(builder);
- this.unknownFields = builder.getUnknownFields();
- }
- private BulletinBoardMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
-
- private static final BulletinBoardMessage defaultInstance;
- public static BulletinBoardMessage getDefaultInstance() {
- return defaultInstance;
- }
-
- public BulletinBoardMessage getDefaultInstanceForType() {
- return defaultInstance;
- }
-
- private final com.google.protobuf.UnknownFieldSet unknownFields;
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return this.unknownFields;
- }
- private BulletinBoardMessage(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- initFields();
- int mutable_bitField0_ = 0;
- com.google.protobuf.UnknownFieldSet.Builder unknownFields =
- com.google.protobuf.UnknownFieldSet.newBuilder();
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- default: {
- if (!parseUnknownField(input, unknownFields,
- extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- case 10: {
- if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
- tag_ = new java.util.ArrayList();
- mutable_bitField0_ |= 0x00000001;
- }
- tag_.add(input.readMessage(meerkat.ProtobufsMessages.Tag.PARSER, extensionRegistry));
- break;
- }
- case 18: {
- meerkat.ProtobufsMessages.BasicMessage.Builder subBuilder = null;
- if (((bitField0_ & 0x00000001) == 0x00000001)) {
- subBuilder = basicMessage_.toBuilder();
- }
- basicMessage_ = input.readMessage(meerkat.ProtobufsMessages.BasicMessage.PARSER, extensionRegistry);
- if (subBuilder != null) {
- subBuilder.mergeFrom(basicMessage_);
- basicMessage_ = subBuilder.buildPartial();
- }
- bitField0_ |= 0x00000001;
- break;
- }
- case 26: {
- bitField0_ |= 0x00000002;
- signatures_ = input.readBytes();
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e.getMessage()).setUnfinishedMessage(this);
- } finally {
- if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
- tag_ = java.util.Collections.unmodifiableList(tag_);
- }
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return meerkat.ProtobufsMessages.internal_static_meerkat_BulletinBoardMessage_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return meerkat.ProtobufsMessages.internal_static_meerkat_BulletinBoardMessage_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- meerkat.ProtobufsMessages.BulletinBoardMessage.class, meerkat.ProtobufsMessages.BulletinBoardMessage.Builder.class);
- }
-
- public static com.google.protobuf.Parser PARSER =
- new com.google.protobuf.AbstractParser() {
- public BulletinBoardMessage parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new BulletinBoardMessage(input, extensionRegistry);
- }
- };
-
- @java.lang.Override
- public com.google.protobuf.Parser getParserForType() {
- return PARSER;
- }
-
- private int bitField0_;
- public static final int TAG_FIELD_NUMBER = 1;
- private java.util.List tag_;
- /**
- * repeated .meerkat.Tag tag = 1;
- */
- public java.util.List getTagList() {
- return tag_;
- }
- /**
- * repeated .meerkat.Tag tag = 1;
- */
- public java.util.List extends meerkat.ProtobufsMessages.TagOrBuilder>
- getTagOrBuilderList() {
- return tag_;
- }
- /**
- * repeated .meerkat.Tag tag = 1;
- */
- public int getTagCount() {
- return tag_.size();
- }
- /**
- * repeated .meerkat.Tag tag = 1;
- */
- public meerkat.ProtobufsMessages.Tag getTag(int index) {
- return tag_.get(index);
- }
- /**
- * repeated .meerkat.Tag tag = 1;
- */
- public meerkat.ProtobufsMessages.TagOrBuilder getTagOrBuilder(
- int index) {
- return tag_.get(index);
- }
-
- public static final int BASICMESSAGE_FIELD_NUMBER = 2;
- private meerkat.ProtobufsMessages.BasicMessage basicMessage_;
- /**
- * required .meerkat.BasicMessage basicMessage = 2;
- */
- public boolean hasBasicMessage() {
- return ((bitField0_ & 0x00000001) == 0x00000001);
- }
- /**
- * required .meerkat.BasicMessage basicMessage = 2;
- */
- public meerkat.ProtobufsMessages.BasicMessage getBasicMessage() {
- return basicMessage_;
- }
- /**
- * required .meerkat.BasicMessage basicMessage = 2;
- */
- public meerkat.ProtobufsMessages.BasicMessageOrBuilder getBasicMessageOrBuilder() {
- return basicMessage_;
- }
-
- public static final int SIGNATURES_FIELD_NUMBER = 3;
- private com.google.protobuf.ByteString signatures_;
- /**
- * optional bytes signatures = 3;
- */
- public boolean hasSignatures() {
- return ((bitField0_ & 0x00000002) == 0x00000002);
- }
- /**
- * optional bytes signatures = 3;
- */
- public com.google.protobuf.ByteString getSignatures() {
- return signatures_;
- }
-
- private void initFields() {
- tag_ = java.util.Collections.emptyList();
- basicMessage_ = meerkat.ProtobufsMessages.BasicMessage.getDefaultInstance();
- signatures_ = com.google.protobuf.ByteString.EMPTY;
- }
- private byte memoizedIsInitialized = -1;
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized == 1) return true;
- if (isInitialized == 0) return false;
-
- if (!hasBasicMessage()) {
- memoizedIsInitialized = 0;
- return false;
- }
- for (int i = 0; i < getTagCount(); i++) {
- if (!getTag(i).isInitialized()) {
- memoizedIsInitialized = 0;
- return false;
- }
- }
- if (!getBasicMessage().isInitialized()) {
- memoizedIsInitialized = 0;
- return false;
- }
- memoizedIsInitialized = 1;
- return true;
- }
-
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- getSerializedSize();
- for (int i = 0; i < tag_.size(); i++) {
- output.writeMessage(1, tag_.get(i));
- }
- if (((bitField0_ & 0x00000001) == 0x00000001)) {
- output.writeMessage(2, basicMessage_);
- }
- if (((bitField0_ & 0x00000002) == 0x00000002)) {
- output.writeBytes(3, signatures_);
- }
- getUnknownFields().writeTo(output);
- }
-
- private int memoizedSerializedSize = -1;
- public int getSerializedSize() {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
-
- size = 0;
- for (int i = 0; i < tag_.size(); i++) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(1, tag_.get(i));
- }
- if (((bitField0_ & 0x00000001) == 0x00000001)) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(2, basicMessage_);
- }
- if (((bitField0_ & 0x00000002) == 0x00000002)) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(3, signatures_);
- }
- size += getUnknownFields().getSerializedSize();
- memoizedSerializedSize = size;
- return size;
- }
-
- private static final long serialVersionUID = 0L;
- @java.lang.Override
- protected java.lang.Object writeReplace()
- throws java.io.ObjectStreamException {
- return super.writeReplace();
- }
-
- public static meerkat.ProtobufsMessages.BulletinBoardMessage parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static meerkat.ProtobufsMessages.BulletinBoardMessage parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static meerkat.ProtobufsMessages.BulletinBoardMessage parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static meerkat.ProtobufsMessages.BulletinBoardMessage parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static meerkat.ProtobufsMessages.BulletinBoardMessage parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return PARSER.parseFrom(input);
- }
- public static meerkat.ProtobufsMessages.BulletinBoardMessage parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return PARSER.parseFrom(input, extensionRegistry);
- }
- public static meerkat.ProtobufsMessages.BulletinBoardMessage parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return PARSER.parseDelimitedFrom(input);
- }
- public static meerkat.ProtobufsMessages.BulletinBoardMessage parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return PARSER.parseDelimitedFrom(input, extensionRegistry);
- }
- public static meerkat.ProtobufsMessages.BulletinBoardMessage parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return PARSER.parseFrom(input);
- }
- public static meerkat.ProtobufsMessages.BulletinBoardMessage parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return PARSER.parseFrom(input, extensionRegistry);
- }
-
- public static Builder newBuilder() { return Builder.create(); }
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder(meerkat.ProtobufsMessages.BulletinBoardMessage prototype) {
- return newBuilder().mergeFrom(prototype);
- }
- public Builder toBuilder() { return newBuilder(this); }
-
- @java.lang.Override
- protected Builder newBuilderForType(
- com.google.protobuf.GeneratedMessage.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- * Protobuf type {@code meerkat.BulletinBoardMessage}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessage.Builder implements
- // @@protoc_insertion_point(builder_implements:meerkat.BulletinBoardMessage)
- meerkat.ProtobufsMessages.BulletinBoardMessageOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return meerkat.ProtobufsMessages.internal_static_meerkat_BulletinBoardMessage_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return meerkat.ProtobufsMessages.internal_static_meerkat_BulletinBoardMessage_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- meerkat.ProtobufsMessages.BulletinBoardMessage.class, meerkat.ProtobufsMessages.BulletinBoardMessage.Builder.class);
- }
-
- // Construct using meerkat.ProtobufsMessages.BulletinBoardMessage.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
-
- private Builder(
- com.google.protobuf.GeneratedMessage.BuilderParent parent) {
- super(parent);
- maybeForceBuilderInitialization();
- }
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
- getTagFieldBuilder();
- getBasicMessageFieldBuilder();
- }
- }
- private static Builder create() {
- return new Builder();
- }
-
- public Builder clear() {
- super.clear();
- if (tagBuilder_ == null) {
- tag_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000001);
- } else {
- tagBuilder_.clear();
- }
- if (basicMessageBuilder_ == null) {
- basicMessage_ = meerkat.ProtobufsMessages.BasicMessage.getDefaultInstance();
- } else {
- basicMessageBuilder_.clear();
- }
- bitField0_ = (bitField0_ & ~0x00000002);
- signatures_ = com.google.protobuf.ByteString.EMPTY;
- bitField0_ = (bitField0_ & ~0x00000004);
- return this;
- }
-
- public Builder clone() {
- return create().mergeFrom(buildPartial());
- }
-
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return meerkat.ProtobufsMessages.internal_static_meerkat_BulletinBoardMessage_descriptor;
- }
-
- public meerkat.ProtobufsMessages.BulletinBoardMessage getDefaultInstanceForType() {
- return meerkat.ProtobufsMessages.BulletinBoardMessage.getDefaultInstance();
- }
-
- public meerkat.ProtobufsMessages.BulletinBoardMessage build() {
- meerkat.ProtobufsMessages.BulletinBoardMessage result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- public meerkat.ProtobufsMessages.BulletinBoardMessage buildPartial() {
- meerkat.ProtobufsMessages.BulletinBoardMessage result = new meerkat.ProtobufsMessages.BulletinBoardMessage(this);
- int from_bitField0_ = bitField0_;
- int to_bitField0_ = 0;
- if (tagBuilder_ == null) {
- if (((bitField0_ & 0x00000001) == 0x00000001)) {
- tag_ = java.util.Collections.unmodifiableList(tag_);
- bitField0_ = (bitField0_ & ~0x00000001);
- }
- result.tag_ = tag_;
- } else {
- result.tag_ = tagBuilder_.build();
- }
- if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
- to_bitField0_ |= 0x00000001;
- }
- if (basicMessageBuilder_ == null) {
- result.basicMessage_ = basicMessage_;
- } else {
- result.basicMessage_ = basicMessageBuilder_.build();
- }
- if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
- to_bitField0_ |= 0x00000002;
- }
- result.signatures_ = signatures_;
- result.bitField0_ = to_bitField0_;
- onBuilt();
- return result;
- }
-
- public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof meerkat.ProtobufsMessages.BulletinBoardMessage) {
- return mergeFrom((meerkat.ProtobufsMessages.BulletinBoardMessage)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(meerkat.ProtobufsMessages.BulletinBoardMessage other) {
- if (other == meerkat.ProtobufsMessages.BulletinBoardMessage.getDefaultInstance()) return this;
- if (tagBuilder_ == null) {
- if (!other.tag_.isEmpty()) {
- if (tag_.isEmpty()) {
- tag_ = other.tag_;
- bitField0_ = (bitField0_ & ~0x00000001);
- } else {
- ensureTagIsMutable();
- tag_.addAll(other.tag_);
- }
- onChanged();
- }
- } else {
- if (!other.tag_.isEmpty()) {
- if (tagBuilder_.isEmpty()) {
- tagBuilder_.dispose();
- tagBuilder_ = null;
- tag_ = other.tag_;
- bitField0_ = (bitField0_ & ~0x00000001);
- tagBuilder_ =
- com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
- getTagFieldBuilder() : null;
- } else {
- tagBuilder_.addAllMessages(other.tag_);
- }
- }
- }
- if (other.hasBasicMessage()) {
- mergeBasicMessage(other.getBasicMessage());
- }
- if (other.hasSignatures()) {
- setSignatures(other.getSignatures());
- }
- this.mergeUnknownFields(other.getUnknownFields());
- return this;
- }
-
- public final boolean isInitialized() {
- if (!hasBasicMessage()) {
-
- return false;
- }
- for (int i = 0; i < getTagCount(); i++) {
- if (!getTag(i).isInitialized()) {
-
- return false;
- }
- }
- if (!getBasicMessage().isInitialized()) {
-
- return false;
- }
- return true;
- }
-
- public Builder mergeFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- meerkat.ProtobufsMessages.BulletinBoardMessage parsedMessage = null;
- try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (meerkat.ProtobufsMessages.BulletinBoardMessage) e.getUnfinishedMessage();
- throw e;
- } finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
- return this;
- }
- private int bitField0_;
-
- private java.util.List tag_ =
- java.util.Collections.emptyList();
- private void ensureTagIsMutable() {
- if (!((bitField0_ & 0x00000001) == 0x00000001)) {
- tag_ = new java.util.ArrayList(tag_);
- bitField0_ |= 0x00000001;
- }
- }
-
- private com.google.protobuf.RepeatedFieldBuilder<
- meerkat.ProtobufsMessages.Tag, meerkat.ProtobufsMessages.Tag.Builder, meerkat.ProtobufsMessages.TagOrBuilder> tagBuilder_;
-
- /**
- * repeated .meerkat.Tag tag = 1;
- */
- public java.util.List getTagList() {
- if (tagBuilder_ == null) {
- return java.util.Collections.unmodifiableList(tag_);
- } else {
- return tagBuilder_.getMessageList();
- }
- }
- /**
- * repeated .meerkat.Tag tag = 1;
- */
- public int getTagCount() {
- if (tagBuilder_ == null) {
- return tag_.size();
- } else {
- return tagBuilder_.getCount();
- }
- }
- /**
- * repeated .meerkat.Tag tag = 1;
- */
- public meerkat.ProtobufsMessages.Tag getTag(int index) {
- if (tagBuilder_ == null) {
- return tag_.get(index);
- } else {
- return tagBuilder_.getMessage(index);
- }
- }
- /**
- * repeated .meerkat.Tag tag = 1;
- */
- public Builder setTag(
- int index, meerkat.ProtobufsMessages.Tag value) {
- if (tagBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureTagIsMutable();
- tag_.set(index, value);
- onChanged();
- } else {
- tagBuilder_.setMessage(index, value);
- }
- return this;
- }
- /**
- * repeated .meerkat.Tag tag = 1;
- */
- public Builder setTag(
- int index, meerkat.ProtobufsMessages.Tag.Builder builderForValue) {
- if (tagBuilder_ == null) {
- ensureTagIsMutable();
- tag_.set(index, builderForValue.build());
- onChanged();
- } else {
- tagBuilder_.setMessage(index, builderForValue.build());
- }
- return this;
- }
- /**
- * repeated .meerkat.Tag tag = 1;
- */
- public Builder addTag(meerkat.ProtobufsMessages.Tag value) {
- if (tagBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureTagIsMutable();
- tag_.add(value);
- onChanged();
- } else {
- tagBuilder_.addMessage(value);
- }
- return this;
- }
- /**
- * repeated .meerkat.Tag tag = 1;
- */
- public Builder addTag(
- int index, meerkat.ProtobufsMessages.Tag value) {
- if (tagBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureTagIsMutable();
- tag_.add(index, value);
- onChanged();
- } else {
- tagBuilder_.addMessage(index, value);
- }
- return this;
- }
- /**
- * repeated .meerkat.Tag tag = 1;
- */
- public Builder addTag(
- meerkat.ProtobufsMessages.Tag.Builder builderForValue) {
- if (tagBuilder_ == null) {
- ensureTagIsMutable();
- tag_.add(builderForValue.build());
- onChanged();
- } else {
- tagBuilder_.addMessage(builderForValue.build());
- }
- return this;
- }
- /**
- * repeated .meerkat.Tag tag = 1;
- */
- public Builder addTag(
- int index, meerkat.ProtobufsMessages.Tag.Builder builderForValue) {
- if (tagBuilder_ == null) {
- ensureTagIsMutable();
- tag_.add(index, builderForValue.build());
- onChanged();
- } else {
- tagBuilder_.addMessage(index, builderForValue.build());
- }
- return this;
- }
- /**
- * repeated .meerkat.Tag tag = 1;
- */
- public Builder addAllTag(
- java.lang.Iterable extends meerkat.ProtobufsMessages.Tag> values) {
- if (tagBuilder_ == null) {
- ensureTagIsMutable();
- com.google.protobuf.AbstractMessageLite.Builder.addAll(
- values, tag_);
- onChanged();
- } else {
- tagBuilder_.addAllMessages(values);
- }
- return this;
- }
- /**
- * repeated .meerkat.Tag tag = 1;
- */
- public Builder clearTag() {
- if (tagBuilder_ == null) {
- tag_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000001);
- onChanged();
- } else {
- tagBuilder_.clear();
- }
- return this;
- }
- /**
- * repeated .meerkat.Tag tag = 1;
- */
- public Builder removeTag(int index) {
- if (tagBuilder_ == null) {
- ensureTagIsMutable();
- tag_.remove(index);
- onChanged();
- } else {
- tagBuilder_.remove(index);
- }
- return this;
- }
- /**
- * repeated .meerkat.Tag tag = 1;
- */
- public meerkat.ProtobufsMessages.Tag.Builder getTagBuilder(
- int index) {
- return getTagFieldBuilder().getBuilder(index);
- }
- /**
- * repeated .meerkat.Tag tag = 1;
- */
- public meerkat.ProtobufsMessages.TagOrBuilder getTagOrBuilder(
- int index) {
- if (tagBuilder_ == null) {
- return tag_.get(index); } else {
- return tagBuilder_.getMessageOrBuilder(index);
- }
- }
- /**
- * repeated .meerkat.Tag tag = 1;
- */
- public java.util.List extends meerkat.ProtobufsMessages.TagOrBuilder>
- getTagOrBuilderList() {
- if (tagBuilder_ != null) {
- return tagBuilder_.getMessageOrBuilderList();
- } else {
- return java.util.Collections.unmodifiableList(tag_);
- }
- }
- /**
- * repeated .meerkat.Tag tag = 1;
- */
- public meerkat.ProtobufsMessages.Tag.Builder addTagBuilder() {
- return getTagFieldBuilder().addBuilder(
- meerkat.ProtobufsMessages.Tag.getDefaultInstance());
- }
- /**
- * repeated .meerkat.Tag tag = 1;
- */
- public meerkat.ProtobufsMessages.Tag.Builder addTagBuilder(
- int index) {
- return getTagFieldBuilder().addBuilder(
- index, meerkat.ProtobufsMessages.Tag.getDefaultInstance());
- }
- /**
- * repeated .meerkat.Tag tag = 1;
- */
- public java.util.List
- getTagBuilderList() {
- return getTagFieldBuilder().getBuilderList();
- }
- private com.google.protobuf.RepeatedFieldBuilder<
- meerkat.ProtobufsMessages.Tag, meerkat.ProtobufsMessages.Tag.Builder, meerkat.ProtobufsMessages.TagOrBuilder>
- getTagFieldBuilder() {
- if (tagBuilder_ == null) {
- tagBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
- meerkat.ProtobufsMessages.Tag, meerkat.ProtobufsMessages.Tag.Builder, meerkat.ProtobufsMessages.TagOrBuilder>(
- tag_,
- ((bitField0_ & 0x00000001) == 0x00000001),
- getParentForChildren(),
- isClean());
- tag_ = null;
- }
- return tagBuilder_;
- }
-
- private meerkat.ProtobufsMessages.BasicMessage basicMessage_ = meerkat.ProtobufsMessages.BasicMessage.getDefaultInstance();
- private com.google.protobuf.SingleFieldBuilder<
- meerkat.ProtobufsMessages.BasicMessage, meerkat.ProtobufsMessages.BasicMessage.Builder, meerkat.ProtobufsMessages.BasicMessageOrBuilder> basicMessageBuilder_;
- /**
- * required .meerkat.BasicMessage basicMessage = 2;
- */
- public boolean hasBasicMessage() {
- return ((bitField0_ & 0x00000002) == 0x00000002);
- }
- /**
- * required .meerkat.BasicMessage basicMessage = 2;
- */
- public meerkat.ProtobufsMessages.BasicMessage getBasicMessage() {
- if (basicMessageBuilder_ == null) {
- return basicMessage_;
- } else {
- return basicMessageBuilder_.getMessage();
- }
- }
- /**
- * required .meerkat.BasicMessage basicMessage = 2;
- */
- public Builder setBasicMessage(meerkat.ProtobufsMessages.BasicMessage value) {
- if (basicMessageBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- basicMessage_ = value;
- onChanged();
- } else {
- basicMessageBuilder_.setMessage(value);
- }
- bitField0_ |= 0x00000002;
- return this;
- }
- /**
- * required .meerkat.BasicMessage basicMessage = 2;
- */
- public Builder setBasicMessage(
- meerkat.ProtobufsMessages.BasicMessage.Builder builderForValue) {
- if (basicMessageBuilder_ == null) {
- basicMessage_ = builderForValue.build();
- onChanged();
- } else {
- basicMessageBuilder_.setMessage(builderForValue.build());
- }
- bitField0_ |= 0x00000002;
- return this;
- }
- /**
- * required .meerkat.BasicMessage basicMessage = 2;
- */
- public Builder mergeBasicMessage(meerkat.ProtobufsMessages.BasicMessage value) {
- if (basicMessageBuilder_ == null) {
- if (((bitField0_ & 0x00000002) == 0x00000002) &&
- basicMessage_ != meerkat.ProtobufsMessages.BasicMessage.getDefaultInstance()) {
- basicMessage_ =
- meerkat.ProtobufsMessages.BasicMessage.newBuilder(basicMessage_).mergeFrom(value).buildPartial();
- } else {
- basicMessage_ = value;
- }
- onChanged();
- } else {
- basicMessageBuilder_.mergeFrom(value);
- }
- bitField0_ |= 0x00000002;
- return this;
- }
- /**
- * required .meerkat.BasicMessage basicMessage = 2;
- */
- public Builder clearBasicMessage() {
- if (basicMessageBuilder_ == null) {
- basicMessage_ = meerkat.ProtobufsMessages.BasicMessage.getDefaultInstance();
- onChanged();
- } else {
- basicMessageBuilder_.clear();
- }
- bitField0_ = (bitField0_ & ~0x00000002);
- return this;
- }
- /**
- * required .meerkat.BasicMessage basicMessage = 2;
- */
- public meerkat.ProtobufsMessages.BasicMessage.Builder getBasicMessageBuilder() {
- bitField0_ |= 0x00000002;
- onChanged();
- return getBasicMessageFieldBuilder().getBuilder();
- }
- /**
- * required .meerkat.BasicMessage basicMessage = 2;
- */
- public meerkat.ProtobufsMessages.BasicMessageOrBuilder getBasicMessageOrBuilder() {
- if (basicMessageBuilder_ != null) {
- return basicMessageBuilder_.getMessageOrBuilder();
- } else {
- return basicMessage_;
- }
- }
- /**
- * required .meerkat.BasicMessage basicMessage = 2;
- */
- private com.google.protobuf.SingleFieldBuilder<
- meerkat.ProtobufsMessages.BasicMessage, meerkat.ProtobufsMessages.BasicMessage.Builder, meerkat.ProtobufsMessages.BasicMessageOrBuilder>
- getBasicMessageFieldBuilder() {
- if (basicMessageBuilder_ == null) {
- basicMessageBuilder_ = new com.google.protobuf.SingleFieldBuilder<
- meerkat.ProtobufsMessages.BasicMessage, meerkat.ProtobufsMessages.BasicMessage.Builder, meerkat.ProtobufsMessages.BasicMessageOrBuilder>(
- getBasicMessage(),
- getParentForChildren(),
- isClean());
- basicMessage_ = null;
- }
- return basicMessageBuilder_;
- }
-
- private com.google.protobuf.ByteString signatures_ = com.google.protobuf.ByteString.EMPTY;
- /**
- * optional bytes signatures = 3;
- */
- public boolean hasSignatures() {
- return ((bitField0_ & 0x00000004) == 0x00000004);
- }
- /**
- * optional bytes signatures = 3;
- */
- public com.google.protobuf.ByteString getSignatures() {
- return signatures_;
- }
- /**
- * optional bytes signatures = 3;
- */
- public Builder setSignatures(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000004;
- signatures_ = value;
- onChanged();
- return this;
- }
- /**
- * optional bytes signatures = 3;
- */
- public Builder clearSignatures() {
- bitField0_ = (bitField0_ & ~0x00000004);
- signatures_ = getDefaultInstance().getSignatures();
- onChanged();
- return this;
- }
-
- // @@protoc_insertion_point(builder_scope:meerkat.BulletinBoardMessage)
- }
-
- static {
- defaultInstance = new BulletinBoardMessage(true);
- defaultInstance.initFields();
- }
-
- // @@protoc_insertion_point(class_scope:meerkat.BulletinBoardMessage)
- }
-
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_meerkat_Tag_descriptor;
private static
@@ -2251,11 +1274,6 @@ public final class ProtobufsMessages {
private static
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_meerkat_BasicMessage_fieldAccessorTable;
- private static final com.google.protobuf.Descriptors.Descriptor
- internal_static_meerkat_BulletinBoardMessage_descriptor;
- private static
- com.google.protobuf.GeneratedMessage.FieldAccessorTable
- internal_static_meerkat_BulletinBoardMessage_fieldAccessorTable;
public static com.google.protobuf.Descriptors.FileDescriptor
getDescriptor() {
@@ -2267,11 +1285,8 @@ public final class ProtobufsMessages {
java.lang.String[] descriptorData = {
"\n\027ProtobufsMessages.proto\022\007meerkat\"\026\n\003Ta" +
"g\022\017\n\007content\030\001 \002(\t\"7\n\014BasicMessage\022\031\n\003ta" +
- "g\030\001 \003(\0132\014.meerkat.Tag\022\014\n\004data\030\002 \001(\014\"r\n\024B" +
- "ulletinBoardMessage\022\031\n\003tag\030\001 \003(\0132\014.meerk" +
- "at.Tag\022+\n\014basicMessage\030\002 \002(\0132\025.meerkat.B" +
- "asicMessage\022\022\n\nsignatures\030\003 \001(\014B\023B\021Proto" +
- "bufsMessages"
+ "g\030\001 \003(\0132\014.meerkat.Tag\022\014\n\004data\030\002 \001(\014B\023B\021P" +
+ "rotobufsMessages"
};
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() {
@@ -2297,12 +1312,6 @@ public final class ProtobufsMessages {
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_meerkat_BasicMessage_descriptor,
new java.lang.String[] { "Tag", "Data", });
- internal_static_meerkat_BulletinBoardMessage_descriptor =
- getDescriptor().getMessageTypes().get(2);
- internal_static_meerkat_BulletinBoardMessage_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessage.FieldAccessorTable(
- internal_static_meerkat_BulletinBoardMessage_descriptor,
- new java.lang.String[] { "Tag", "BasicMessage", "Signatures", });
}
// @@protoc_insertion_point(outer_class_scope)
diff --git a/voter-registry/src/main/java/meerkat/SimpleRegistry.java b/voter-registry/src/main/java/meerkat/SimpleRegistry.java
index a9c5e0d..8db83e0 100644
--- a/voter-registry/src/main/java/meerkat/SimpleRegistry.java
+++ b/voter-registry/src/main/java/meerkat/SimpleRegistry.java
@@ -1,18 +1,14 @@
package meerkat;
-import com.google.protobuf.*;
+import com.google.protobuf.ByteString;
import meerkat.ProtobufsMessages.BasicMessage;
-import meerkat.ProtobufsMessages.BulletinBoardMessage;
import meerkat.ProtobufsMessages.Tag;
import meerkat.bulletinboard.BulletinBoardClient;
import meerkat.comm.CommunicationException;
import meerkat.crypto.DigitalSignature;
import meerkat.protobuf.BulletinBoardAPI;
-import java.io.IOException;
-import java.io.OutputStream;
import java.util.List;
-import java.util.Map;
/**
* Created by Vladimir Eliezer Tokarev on 1/8/2016.
@@ -132,119 +128,9 @@ public class SimpleRegistry {
* @return BulletinBoardAPI.BulletinBoardMessage
*/
private BulletinBoardAPI.BulletinBoardMessage CreateBulletinBoardMessage(BasicMessage.Builder basicMessage) {
- BulletinBoardMessage.Builder bulletinBoardmessage = BulletinBoardMessage.newBuilder();
- Message encodableMessage = new Message() {
- @Override
- public Parser extends Message> getParserForType() {
- return null;
- }
-
- @Override
- public Builder newBuilderForType() {
- return null;
- }
-
- @Override
- public Builder toBuilder() {
- return null;
- }
-
- @Override
- public void writeTo(CodedOutputStream output) throws IOException {
-
- }
-
- @Override
- public int getSerializedSize() {
- return 0;
- }
-
- @Override
- public ByteString toByteString() {
- return null;
- }
-
- @Override
- public byte[] toByteArray() {
- return new byte[0];
- }
-
- @Override
- public void writeTo(OutputStream output) throws IOException {
-
- }
-
- @Override
- public void writeDelimitedTo(OutputStream output) throws IOException {
-
- }
-
- @Override
- public Message getDefaultInstanceForType() {
- return null;
- }
-
- @Override
- public List findInitializationErrors() {
- return null;
- }
-
- @Override
- public String getInitializationErrorString() {
- return null;
- }
-
- @Override
- public Descriptors.Descriptor getDescriptorForType() {
- return null;
- }
-
- @Override
- public Map getAllFields() {
- return null;
- }
-
- @Override
- public boolean hasOneof(Descriptors.OneofDescriptor oneof) {
- return false;
- }
-
- @Override
- public Descriptors.FieldDescriptor getOneofFieldDescriptor(Descriptors.OneofDescriptor oneof) {
- return null;
- }
-
- @Override
- public boolean hasField(Descriptors.FieldDescriptor field) {
- return false;
- }
-
- @Override
- public Object getField(Descriptors.FieldDescriptor field) {
- return null;
- }
-
- @Override
- public int getRepeatedFieldCount(Descriptors.FieldDescriptor field) {
- return 0;
- }
-
- @Override
- public Object getRepeatedField(Descriptors.FieldDescriptor field, int index) {
- return null;
- }
-
- @Override
- public UnknownFieldSet getUnknownFields() {
- return null;
- }
-
- @Override
- public boolean isInitialized() {
- return false;
- }
- }
-
+ BulletinBoardAPI.BulletinBoardMessage.Builder bulletinBoardmessage =
+ BulletinBoardAPI.BulletinBoardMessage.newBuilder();
+ signatory.updateContent((ProtobufsMessages)basicMessage);
/**
* encode the basic message
* create bulletin board message
diff --git a/voter-registry/src/main/proto/ProtobufsMessages.proto b/voter-registry/src/main/proto/ProtobufsMessages.proto
index 05ae4ee..b66c001 100644
--- a/voter-registry/src/main/proto/ProtobufsMessages.proto
+++ b/voter-registry/src/main/proto/ProtobufsMessages.proto
@@ -10,9 +10,3 @@ message BasicMessage {
repeated Tag tag = 1;
optional bytes data = 2;
}
-
-message BulletinBoardMessage {
- repeated Tag tag = 1;
- required BasicMessage basicMessage = 2;
- optional bytes signatures = 3;
-}
\ No newline at end of file