/DataExtractionOSM/src/crosby/binary/Osmformat.java
Java | 1867 lines | 1672 code | 144 blank | 51 comment | 191 complexity | 54d56381d9c38b968647c996f570ad78 MD5 | raw file
Possible License(s): MIT
Large files files are truncated, but you can click here to view the full file
- // Generated by the protocol buffer compiler. DO NOT EDIT!
- // source: src/osmformat.proto
- package crosby.binary;
- public final class Osmformat {
- private Osmformat() {}
- public static void registerAllExtensions(
- com.google.protobuf.ExtensionRegistry registry) {
- }
- public static final class HeaderBlock extends
- com.google.protobuf.GeneratedMessage {
- // Use HeaderBlock.newBuilder() to construct.
- private HeaderBlock() {
- initFields();
- }
- private HeaderBlock(boolean noInit) {}
-
- private static final HeaderBlock defaultInstance;
- public static HeaderBlock getDefaultInstance() {
- return defaultInstance;
- }
-
- @Override
- public HeaderBlock getDefaultInstanceForType() {
- return defaultInstance;
- }
-
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return crosby.binary.Osmformat.internal_static_HeaderBlock_descriptor;
- }
-
- @Override
- protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return crosby.binary.Osmformat.internal_static_HeaderBlock_fieldAccessorTable;
- }
-
- // optional .HeaderBBox bbox = 1;
- public static final int BBOX_FIELD_NUMBER = 1;
- private boolean hasBbox;
- private crosby.binary.Osmformat.HeaderBBox bbox_;
- public boolean hasBbox() { return hasBbox; }
- public crosby.binary.Osmformat.HeaderBBox getBbox() { return bbox_; }
-
- // repeated string required_features = 4;
- public static final int REQUIRED_FEATURES_FIELD_NUMBER = 4;
- private java.util.List<java.lang.String> requiredFeatures_ =
- java.util.Collections.emptyList();
- public java.util.List<java.lang.String> getRequiredFeaturesList() {
- return requiredFeatures_;
- }
- public int getRequiredFeaturesCount() { return requiredFeatures_.size(); }
- public java.lang.String getRequiredFeatures(int index) {
- return requiredFeatures_.get(index);
- }
-
- // repeated string optional_features = 5;
- public static final int OPTIONAL_FEATURES_FIELD_NUMBER = 5;
- private java.util.List<java.lang.String> optionalFeatures_ =
- java.util.Collections.emptyList();
- public java.util.List<java.lang.String> getOptionalFeaturesList() {
- return optionalFeatures_;
- }
- public int getOptionalFeaturesCount() { return optionalFeatures_.size(); }
- public java.lang.String getOptionalFeatures(int index) {
- return optionalFeatures_.get(index);
- }
-
- // optional string writingprogram = 16;
- public static final int WRITINGPROGRAM_FIELD_NUMBER = 16;
- private boolean hasWritingprogram;
- private java.lang.String writingprogram_ = "";
- public boolean hasWritingprogram() { return hasWritingprogram; }
- public java.lang.String getWritingprogram() { return writingprogram_; }
-
- // optional string source = 17;
- public static final int SOURCE_FIELD_NUMBER = 17;
- private boolean hasSource;
- private java.lang.String source_ = "";
- public boolean hasSource() { return hasSource; }
- public java.lang.String getSource() { return source_; }
-
- private void initFields() {
- bbox_ = crosby.binary.Osmformat.HeaderBBox.getDefaultInstance();
- }
- @Override
- public final boolean isInitialized() {
- if (hasBbox()) {
- if (!getBbox().isInitialized()) return false;
- }
- return true;
- }
-
- @Override
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- getSerializedSize();
- if (hasBbox()) {
- output.writeMessage(1, getBbox());
- }
- for (java.lang.String element : getRequiredFeaturesList()) {
- output.writeString(4, element);
- }
- for (java.lang.String element : getOptionalFeaturesList()) {
- output.writeString(5, element);
- }
- if (hasWritingprogram()) {
- output.writeString(16, getWritingprogram());
- }
- if (hasSource()) {
- output.writeString(17, getSource());
- }
- getUnknownFields().writeTo(output);
- }
-
- private int memoizedSerializedSize = -1;
- @Override
- public int getSerializedSize() {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
-
- size = 0;
- if (hasBbox()) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(1, getBbox());
- }
- {
- int dataSize = 0;
- for (java.lang.String element : getRequiredFeaturesList()) {
- dataSize += com.google.protobuf.CodedOutputStream
- .computeStringSizeNoTag(element);
- }
- size += dataSize;
- size += 1 * getRequiredFeaturesList().size();
- }
- {
- int dataSize = 0;
- for (java.lang.String element : getOptionalFeaturesList()) {
- dataSize += com.google.protobuf.CodedOutputStream
- .computeStringSizeNoTag(element);
- }
- size += dataSize;
- size += 1 * getOptionalFeaturesList().size();
- }
- if (hasWritingprogram()) {
- size += com.google.protobuf.CodedOutputStream
- .computeStringSize(16, getWritingprogram());
- }
- if (hasSource()) {
- size += com.google.protobuf.CodedOutputStream
- .computeStringSize(17, getSource());
- }
- size += getUnknownFields().getSerializedSize();
- memoizedSerializedSize = size;
- return size;
- }
-
- public static crosby.binary.Osmformat.HeaderBlock parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data).buildParsed();
- }
- public static crosby.binary.Osmformat.HeaderBlock parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data, extensionRegistry)
- .buildParsed();
- }
- public static crosby.binary.Osmformat.HeaderBlock parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data).buildParsed();
- }
- public static crosby.binary.Osmformat.HeaderBlock parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data, extensionRegistry)
- .buildParsed();
- }
- public static crosby.binary.Osmformat.HeaderBlock parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input).buildParsed();
- }
- public static crosby.binary.Osmformat.HeaderBlock parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input, extensionRegistry)
- .buildParsed();
- }
- public static crosby.binary.Osmformat.HeaderBlock parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- Builder builder = newBuilder();
- if (builder.mergeDelimitedFrom(input)) {
- return builder.buildParsed();
- } else {
- return null;
- }
- }
- public static crosby.binary.Osmformat.HeaderBlock parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- Builder builder = newBuilder();
- if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
- return builder.buildParsed();
- } else {
- return null;
- }
- }
- public static crosby.binary.Osmformat.HeaderBlock parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input).buildParsed();
- }
- public static crosby.binary.Osmformat.HeaderBlock parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input, extensionRegistry)
- .buildParsed();
- }
-
- public static Builder newBuilder() { return Builder.create(); }
- @Override
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder(crosby.binary.Osmformat.HeaderBlock prototype) {
- return newBuilder().mergeFrom(prototype);
- }
- @Override
- public Builder toBuilder() { return newBuilder(this); }
-
- public static final class Builder extends
- com.google.protobuf.GeneratedMessage.Builder<Builder> {
- private crosby.binary.Osmformat.HeaderBlock result;
-
- // Construct using crosby.binary.Osmformat.HeaderBlock.newBuilder()
- private Builder() {}
-
- private static Builder create() {
- Builder builder = new Builder();
- builder.result = new crosby.binary.Osmformat.HeaderBlock();
- return builder;
- }
-
- @Override
- protected crosby.binary.Osmformat.HeaderBlock internalGetResult() {
- return result;
- }
-
- @Override
- public Builder clear() {
- if (result == null) {
- throw new IllegalStateException(
- "Cannot call clear() after build().");
- }
- result = new crosby.binary.Osmformat.HeaderBlock();
- return this;
- }
-
- @Override
- public Builder clone() {
- return create().mergeFrom(result);
- }
-
- @Override
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return crosby.binary.Osmformat.HeaderBlock.getDescriptor();
- }
-
- @Override
- public crosby.binary.Osmformat.HeaderBlock getDefaultInstanceForType() {
- return crosby.binary.Osmformat.HeaderBlock.getDefaultInstance();
- }
-
- @Override
- public boolean isInitialized() {
- return result.isInitialized();
- }
- @Override
- public crosby.binary.Osmformat.HeaderBlock build() {
- if (result != null && !isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return buildPartial();
- }
-
- private crosby.binary.Osmformat.HeaderBlock buildParsed()
- throws com.google.protobuf.InvalidProtocolBufferException {
- if (!isInitialized()) {
- throw newUninitializedMessageException(
- result).asInvalidProtocolBufferException();
- }
- return buildPartial();
- }
-
- @Override
- public crosby.binary.Osmformat.HeaderBlock buildPartial() {
- if (result == null) {
- throw new IllegalStateException(
- "build() has already been called on this Builder.");
- }
- if (result.requiredFeatures_ != java.util.Collections.EMPTY_LIST) {
- result.requiredFeatures_ =
- java.util.Collections.unmodifiableList(result.requiredFeatures_);
- }
- if (result.optionalFeatures_ != java.util.Collections.EMPTY_LIST) {
- result.optionalFeatures_ =
- java.util.Collections.unmodifiableList(result.optionalFeatures_);
- }
- crosby.binary.Osmformat.HeaderBlock returnMe = result;
- result = null;
- return returnMe;
- }
-
- @Override
- public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof crosby.binary.Osmformat.HeaderBlock) {
- return mergeFrom((crosby.binary.Osmformat.HeaderBlock)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(crosby.binary.Osmformat.HeaderBlock other) {
- if (other == crosby.binary.Osmformat.HeaderBlock.getDefaultInstance()) return this;
- if (other.hasBbox()) {
- mergeBbox(other.getBbox());
- }
- if (!other.requiredFeatures_.isEmpty()) {
- if (result.requiredFeatures_.isEmpty()) {
- result.requiredFeatures_ = new java.util.ArrayList<java.lang.String>();
- }
- result.requiredFeatures_.addAll(other.requiredFeatures_);
- }
- if (!other.optionalFeatures_.isEmpty()) {
- if (result.optionalFeatures_.isEmpty()) {
- result.optionalFeatures_ = new java.util.ArrayList<java.lang.String>();
- }
- result.optionalFeatures_.addAll(other.optionalFeatures_);
- }
- if (other.hasWritingprogram()) {
- setWritingprogram(other.getWritingprogram());
- }
- if (other.hasSource()) {
- setSource(other.getSource());
- }
- this.mergeUnknownFields(other.getUnknownFields());
- return this;
- }
-
- @Override
- public Builder mergeFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- com.google.protobuf.UnknownFieldSet.Builder unknownFields =
- com.google.protobuf.UnknownFieldSet.newBuilder(
- this.getUnknownFields());
- while (true) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- this.setUnknownFields(unknownFields.build());
- return this;
- default: {
- if (!parseUnknownField(input, unknownFields,
- extensionRegistry, tag)) {
- this.setUnknownFields(unknownFields.build());
- return this;
- }
- break;
- }
- case 10: {
- crosby.binary.Osmformat.HeaderBBox.Builder subBuilder = crosby.binary.Osmformat.HeaderBBox.newBuilder();
- if (hasBbox()) {
- subBuilder.mergeFrom(getBbox());
- }
- input.readMessage(subBuilder, extensionRegistry);
- setBbox(subBuilder.buildPartial());
- break;
- }
- case 34: {
- addRequiredFeatures(input.readString());
- break;
- }
- case 42: {
- addOptionalFeatures(input.readString());
- break;
- }
- case 130: {
- setWritingprogram(input.readString());
- break;
- }
- case 138: {
- setSource(input.readString());
- break;
- }
- }
- }
- }
-
-
- // optional .HeaderBBox bbox = 1;
- public boolean hasBbox() {
- return result.hasBbox();
- }
- public crosby.binary.Osmformat.HeaderBBox getBbox() {
- return result.getBbox();
- }
- public Builder setBbox(crosby.binary.Osmformat.HeaderBBox value) {
- if (value == null) {
- throw new NullPointerException();
- }
- result.hasBbox = true;
- result.bbox_ = value;
- return this;
- }
- public Builder setBbox(crosby.binary.Osmformat.HeaderBBox.Builder builderForValue) {
- result.hasBbox = true;
- result.bbox_ = builderForValue.build();
- return this;
- }
- public Builder mergeBbox(crosby.binary.Osmformat.HeaderBBox value) {
- if (result.hasBbox() &&
- result.bbox_ != crosby.binary.Osmformat.HeaderBBox.getDefaultInstance()) {
- result.bbox_ =
- crosby.binary.Osmformat.HeaderBBox.newBuilder(result.bbox_).mergeFrom(value).buildPartial();
- } else {
- result.bbox_ = value;
- }
- result.hasBbox = true;
- return this;
- }
- public Builder clearBbox() {
- result.hasBbox = false;
- result.bbox_ = crosby.binary.Osmformat.HeaderBBox.getDefaultInstance();
- return this;
- }
-
- // repeated string required_features = 4;
- public java.util.List<java.lang.String> getRequiredFeaturesList() {
- return java.util.Collections.unmodifiableList(result.requiredFeatures_);
- }
- public int getRequiredFeaturesCount() {
- return result.getRequiredFeaturesCount();
- }
- public java.lang.String getRequiredFeatures(int index) {
- return result.getRequiredFeatures(index);
- }
- public Builder setRequiredFeatures(int index, java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- result.requiredFeatures_.set(index, value);
- return this;
- }
- public Builder addRequiredFeatures(java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- if (result.requiredFeatures_.isEmpty()) {
- result.requiredFeatures_ = new java.util.ArrayList<java.lang.String>();
- }
- result.requiredFeatures_.add(value);
- return this;
- }
- public Builder addAllRequiredFeatures(
- java.lang.Iterable<? extends java.lang.String> values) {
- if (result.requiredFeatures_.isEmpty()) {
- result.requiredFeatures_ = new java.util.ArrayList<java.lang.String>();
- }
- super.addAll(values, result.requiredFeatures_);
- return this;
- }
- public Builder clearRequiredFeatures() {
- result.requiredFeatures_ = java.util.Collections.emptyList();
- return this;
- }
-
- // repeated string optional_features = 5;
- public java.util.List<java.lang.String> getOptionalFeaturesList() {
- return java.util.Collections.unmodifiableList(result.optionalFeatures_);
- }
- public int getOptionalFeaturesCount() {
- return result.getOptionalFeaturesCount();
- }
- public java.lang.String getOptionalFeatures(int index) {
- return result.getOptionalFeatures(index);
- }
- public Builder setOptionalFeatures(int index, java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- result.optionalFeatures_.set(index, value);
- return this;
- }
- public Builder addOptionalFeatures(java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- if (result.optionalFeatures_.isEmpty()) {
- result.optionalFeatures_ = new java.util.ArrayList<java.lang.String>();
- }
- result.optionalFeatures_.add(value);
- return this;
- }
- public Builder addAllOptionalFeatures(
- java.lang.Iterable<? extends java.lang.String> values) {
- if (result.optionalFeatures_.isEmpty()) {
- result.optionalFeatures_ = new java.util.ArrayList<java.lang.String>();
- }
- super.addAll(values, result.optionalFeatures_);
- return this;
- }
- public Builder clearOptionalFeatures() {
- result.optionalFeatures_ = java.util.Collections.emptyList();
- return this;
- }
-
- // optional string writingprogram = 16;
- public boolean hasWritingprogram() {
- return result.hasWritingprogram();
- }
- public java.lang.String getWritingprogram() {
- return result.getWritingprogram();
- }
- public Builder setWritingprogram(java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- result.hasWritingprogram = true;
- result.writingprogram_ = value;
- return this;
- }
- public Builder clearWritingprogram() {
- result.hasWritingprogram = false;
- result.writingprogram_ = getDefaultInstance().getWritingprogram();
- return this;
- }
-
- // optional string source = 17;
- public boolean hasSource() {
- return result.hasSource();
- }
- public java.lang.String getSource() {
- return result.getSource();
- }
- public Builder setSource(java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- result.hasSource = true;
- result.source_ = value;
- return this;
- }
- public Builder clearSource() {
- result.hasSource = false;
- result.source_ = getDefaultInstance().getSource();
- return this;
- }
-
- // @@protoc_insertion_point(builder_scope:HeaderBlock)
- }
-
- static {
- defaultInstance = new HeaderBlock(true);
- crosby.binary.Osmformat.internalForceInit();
- defaultInstance.initFields();
- }
-
- // @@protoc_insertion_point(class_scope:HeaderBlock)
- }
-
- public static final class HeaderBBox extends
- com.google.protobuf.GeneratedMessage {
- // Use HeaderBBox.newBuilder() to construct.
- private HeaderBBox() {
- initFields();
- }
- private HeaderBBox(boolean noInit) {}
-
- private static final HeaderBBox defaultInstance;
- public static HeaderBBox getDefaultInstance() {
- return defaultInstance;
- }
-
- @Override
- public HeaderBBox getDefaultInstanceForType() {
- return defaultInstance;
- }
-
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return crosby.binary.Osmformat.internal_static_HeaderBBox_descriptor;
- }
-
- @Override
- protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return crosby.binary.Osmformat.internal_static_HeaderBBox_fieldAccessorTable;
- }
-
- // required sint64 left = 1;
- public static final int LEFT_FIELD_NUMBER = 1;
- private boolean hasLeft;
- private long left_ = 0L;
- public boolean hasLeft() { return hasLeft; }
- public long getLeft() { return left_; }
-
- // required sint64 right = 2;
- public static final int RIGHT_FIELD_NUMBER = 2;
- private boolean hasRight;
- private long right_ = 0L;
- public boolean hasRight() { return hasRight; }
- public long getRight() { return right_; }
-
- // required sint64 top = 3;
- public static final int TOP_FIELD_NUMBER = 3;
- private boolean hasTop;
- private long top_ = 0L;
- public boolean hasTop() { return hasTop; }
- public long getTop() { return top_; }
-
- // required sint64 bottom = 4;
- public static final int BOTTOM_FIELD_NUMBER = 4;
- private boolean hasBottom;
- private long bottom_ = 0L;
- public boolean hasBottom() { return hasBottom; }
- public long getBottom() { return bottom_; }
-
- private void initFields() {
- }
- @Override
- public final boolean isInitialized() {
- if (!hasLeft) return false;
- if (!hasRight) return false;
- if (!hasTop) return false;
- if (!hasBottom) return false;
- return true;
- }
-
- @Override
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- getSerializedSize();
- if (hasLeft()) {
- output.writeSInt64(1, getLeft());
- }
- if (hasRight()) {
- output.writeSInt64(2, getRight());
- }
- if (hasTop()) {
- output.writeSInt64(3, getTop());
- }
- if (hasBottom()) {
- output.writeSInt64(4, getBottom());
- }
- getUnknownFields().writeTo(output);
- }
-
- private int memoizedSerializedSize = -1;
- @Override
- public int getSerializedSize() {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
-
- size = 0;
- if (hasLeft()) {
- size += com.google.protobuf.CodedOutputStream
- .computeSInt64Size(1, getLeft());
- }
- if (hasRight()) {
- size += com.google.protobuf.CodedOutputStream
- .computeSInt64Size(2, getRight());
- }
- if (hasTop()) {
- size += com.google.protobuf.CodedOutputStream
- .computeSInt64Size(3, getTop());
- }
- if (hasBottom()) {
- size += com.google.protobuf.CodedOutputStream
- .computeSInt64Size(4, getBottom());
- }
- size += getUnknownFields().getSerializedSize();
- memoizedSerializedSize = size;
- return size;
- }
-
- public static crosby.binary.Osmformat.HeaderBBox parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data).buildParsed();
- }
- public static crosby.binary.Osmformat.HeaderBBox parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data, extensionRegistry)
- .buildParsed();
- }
- public static crosby.binary.Osmformat.HeaderBBox parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data).buildParsed();
- }
- public static crosby.binary.Osmformat.HeaderBBox parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data, extensionRegistry)
- .buildParsed();
- }
- public static crosby.binary.Osmformat.HeaderBBox parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input).buildParsed();
- }
- public static crosby.binary.Osmformat.HeaderBBox parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input, extensionRegistry)
- .buildParsed();
- }
- public static crosby.binary.Osmformat.HeaderBBox parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- Builder builder = newBuilder();
- if (builder.mergeDelimitedFrom(input)) {
- return builder.buildParsed();
- } else {
- return null;
- }
- }
- public static crosby.binary.Osmformat.HeaderBBox parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- Builder builder = newBuilder();
- if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
- return builder.buildParsed();
- } else {
- return null;
- }
- }
- public static crosby.binary.Osmformat.HeaderBBox parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input).buildParsed();
- }
- public static crosby.binary.Osmformat.HeaderBBox parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input, extensionRegistry)
- .buildParsed();
- }
-
- public static Builder newBuilder() { return Builder.create(); }
- @Override
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder(crosby.binary.Osmformat.HeaderBBox prototype) {
- return newBuilder().mergeFrom(prototype);
- }
- @Override
- public Builder toBuilder() { return newBuilder(this); }
-
- public static final class Builder extends
- com.google.protobuf.GeneratedMessage.Builder<Builder> {
- private crosby.binary.Osmformat.HeaderBBox result;
-
- // Construct using crosby.binary.Osmformat.HeaderBBox.newBuilder()
- private Builder() {}
-
- private static Builder create() {
- Builder builder = new Builder();
- builder.result = new crosby.binary.Osmformat.HeaderBBox();
- return builder;
- }
-
- @Override
- protected crosby.binary.Osmformat.HeaderBBox internalGetResult() {
- return result;
- }
-
- @Override
- public Builder clear() {
- if (result == null) {
- throw new IllegalStateException(
- "Cannot call clear() after build().");
- }
- result = new crosby.binary.Osmformat.HeaderBBox();
- return this;
- }
-
- @Override
- public Builder clone() {
- return create().mergeFrom(result);
- }
-
- @Override
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return crosby.binary.Osmformat.HeaderBBox.getDescriptor();
- }
-
- @Override
- public crosby.binary.Osmformat.HeaderBBox getDefaultInstanceForType() {
- return crosby.binary.Osmformat.HeaderBBox.getDefaultInstance();
- }
-
- @Override
- public boolean isInitialized() {
- return result.isInitialized();
- }
- @Override
- public crosby.binary.Osmformat.HeaderBBox build() {
- if (result != null && !isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return buildPartial();
- }
-
- private crosby.binary.Osmformat.HeaderBBox buildParsed()
- throws com.google.protobuf.InvalidProtocolBufferException {
- if (!isInitialized()) {
- throw newUninitializedMessageException(
- result).asInvalidProtocolBufferException();
- }
- return buildPartial();
- }
-
- @Override
- public crosby.binary.Osmformat.HeaderBBox buildPartial() {
- if (result == null) {
- throw new IllegalStateException(
- "build() has already been called on this Builder.");
- }
- crosby.binary.Osmformat.HeaderBBox returnMe = result;
- result = null;
- return returnMe;
- }
-
- @Override
- public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof crosby.binary.Osmformat.HeaderBBox) {
- return mergeFrom((crosby.binary.Osmformat.HeaderBBox)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(crosby.binary.Osmformat.HeaderBBox other) {
- if (other == crosby.binary.Osmformat.HeaderBBox.getDefaultInstance()) return this;
- if (other.hasLeft()) {
- setLeft(other.getLeft());
- }
- if (other.hasRight()) {
- setRight(other.getRight());
- }
- if (other.hasTop()) {
- setTop(other.getTop());
- }
- if (other.hasBottom()) {
- setBottom(other.getBottom());
- }
- this.mergeUnknownFields(other.getUnknownFields());
- return this;
- }
-
- @Override
- public Builder mergeFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- com.google.protobuf.UnknownFieldSet.Builder unknownFields =
- com.google.protobuf.UnknownFieldSet.newBuilder(
- this.getUnknownFields());
- while (true) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- this.setUnknownFields(unknownFields.build());
- return this;
- default: {
- if (!parseUnknownField(input, unknownFields,
- extensionRegistry, tag)) {
- this.setUnknownFields(unknownFields.build());
- return this;
- }
- break;
- }
- case 8: {
- setLeft(input.readSInt64());
- break;
- }
- case 16: {
- setRight(input.readSInt64());
- break;
- }
- case 24: {
- setTop(input.readSInt64());
- break;
- }
- case 32: {
- setBottom(input.readSInt64());
- break;
- }
- }
- }
- }
-
-
- // required sint64 left = 1;
- public boolean hasLeft() {
- return result.hasLeft();
- }
- public long getLeft() {
- return result.getLeft();
- }
- public Builder setLeft(long value) {
- result.hasLeft = true;
- result.left_ = value;
- return this;
- }
- public Builder clearLeft() {
- result.hasLeft = false;
- result.left_ = 0L;
- return this;
- }
-
- // required sint64 right = 2;
- public boolean hasRight() {
- return result.hasRight();
- }
- public long getRight() {
- return result.getRight();
- }
- public Builder setRight(long value) {
- result.hasRight = true;
- result.right_ = value;
- return this;
- }
- public Builder clearRight() {
- result.hasRight = false;
- result.right_ = 0L;
- return this;
- }
-
- // required sint64 top = 3;
- public boolean hasTop() {
- return result.hasTop();
- }
- public long getTop() {
- return result.getTop();
- }
- public Builder setTop(long value) {
- result.hasTop = true;
- result.top_ = value;
- return this;
- }
- public Builder clearTop() {
- result.hasTop = false;
- result.top_ = 0L;
- return this;
- }
-
- // required sint64 bottom = 4;
- public boolean hasBottom() {
- return result.hasBottom();
- }
- public long getBottom() {
- return result.getBottom();
- }
- public Builder setBottom(long value) {
- result.hasBottom = true;
- result.bottom_ = value;
- return this;
- }
- public Builder clearBottom() {
- result.hasBottom = false;
- result.bottom_ = 0L;
- return this;
- }
-
- // @@protoc_insertion_point(builder_scope:HeaderBBox)
- }
-
- static {
- defaultInstance = new HeaderBBox(true);
- crosby.binary.Osmformat.internalForceInit();
- defaultInstance.initFields();
- }
-
- // @@protoc_insertion_point(class_scope:HeaderBBox)
- }
-
- public static final class PrimitiveBlock extends
- com.google.protobuf.GeneratedMessage {
- // Use PrimitiveBlock.newBuilder() to construct.
- private PrimitiveBlock() {
- initFields();
- }
- private PrimitiveBlock(boolean noInit) {}
-
- private static final PrimitiveBlock defaultInstance;
- public static PrimitiveBlock getDefaultInstance() {
- return defaultInstance;
- }
-
- @Override
- public PrimitiveBlock getDefaultInstanceForType() {
- return defaultInstance;
- }
-
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return crosby.binary.Osmformat.internal_static_PrimitiveBlock_descriptor;
- }
-
- @Override
- protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return crosby.binary.Osmformat.internal_static_PrimitiveBlock_fieldAccessorTable;
- }
-
- // required .StringTable stringtable = 1;
- public static final int STRINGTABLE_FIELD_NUMBER = 1;
- private boolean hasStringtable;
- private crosby.binary.Osmformat.StringTable stringtable_;
- public boolean hasStringtable() { return hasStringtable; }
- public crosby.binary.Osmformat.StringTable getStringtable() { return stringtable_; }
-
- // repeated .PrimitiveGroup primitivegroup = 2;
- public static final int PRIMITIVEGROUP_FIELD_NUMBER = 2;
- private java.util.List<crosby.binary.Osmformat.PrimitiveGroup> primitivegroup_ =
- java.util.Collections.emptyList();
- public java.util.List<crosby.binary.Osmformat.PrimitiveGroup> getPrimitivegroupList() {
- return primitivegroup_;
- }
- public int getPrimitivegroupCount() { return primitivegroup_.size(); }
- public crosby.binary.Osmformat.PrimitiveGroup getPrimitivegroup(int index) {
- return primitivegroup_.get(index);
- }
-
- // optional int32 granularity = 17 [default = 100];
- public static final int GRANULARITY_FIELD_NUMBER = 17;
- private boolean hasGranularity;
- private int granularity_ = 100;
- public boolean hasGranularity() { return hasGranularity; }
- public int getGranularity() { return granularity_; }
-
- // optional int64 lat_offset = 19 [default = 0];
- public static final int LAT_OFFSET_FIELD_NUMBER = 19;
- private boolean hasLatOffset;
- private long latOffset_ = 0L;
- public boolean hasLatOffset() { return hasLatOffset; }
- public long getLatOffset() { return latOffset_; }
-
- // optional int64 lon_offset = 20 [default = 0];
- public static final int LON_OFFSET_FIELD_NUMBER = 20;
- private boolean hasLonOffset;
- private long lonOffset_ = 0L;
- public boolean hasLonOffset() { return hasLonOffset; }
- public long getLonOffset() { return lonOffset_; }
-
- // optional int32 date_granularity = 18 [default = 1000];
- public static final int DATE_GRANULARITY_FIELD_NUMBER = 18;
- private boolean hasDateGranularity;
- private int dateGranularity_ = 1000;
- public boolean hasDateGranularity() { return hasDateGranularity; }
- public int getDateGranularity() { return dateGranularity_; }
-
- private void initFields() {
- stringtable_ = crosby.binary.Osmformat.StringTable.getDefaultInstance();
- }
- @Override
- public final boolean isInitialized() {
- if (!hasStringtable) return false;
- for (crosby.binary.Osmformat.PrimitiveGroup element : getPrimitivegroupList()) {
- if (!element.isInitialized()) return false;
- }
- return true;
- }
-
- @Override
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- getSerializedSize();
- if (hasStringtable()) {
- output.writeMessage(1, getStringtable());
- }
- for (crosby.binary.Osmformat.PrimitiveGroup element : getPrimitivegroupList()) {
- output.writeMessage(2, element);
- }
- if (hasGranularity()) {
- output.writeInt32(17, getGranularity());
- }
- if (hasDateGranularity()) {
- output.writeInt32(18, getDateGranularity());
- }
- if (hasLatOffset()) {
- output.writeInt64(19, getLatOffset());
- }
- if (hasLonOffset()) {
- output.writeInt64(20, getLonOffset());
- }
- getUnknownFields().writeTo(output);
- }
-
- private int memoizedSerializedSize = -1;
- @Override
- public int getSerializedSize() {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
-
- size = 0;
- if (hasStringtable()) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(1, getStringtable());
- }
- for (crosby.binary.Osmformat.PrimitiveGroup element : getPrimitivegroupList()) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(2, element);
- }
- if (hasGranularity()) {
- size += com.google.protobuf.CodedOutputStream
- .computeInt32Size(17, getGranularity());
- }
- if (hasDateGranularity()) {
- size += com.google.protobuf.CodedOutputStream
- .computeInt32Size(18, getDateGranularity());
- }
- if (hasLatOffset()) {
- size += com.google.protobuf.CodedOutputStream
- .computeInt64Size(19, getLatOffset());
- }
- if (hasLonOffset()) {
- size += com.google.protobuf.CodedOutputStream
- .computeInt64Size(20, getLonOffset());
- }
- size += getUnknownFields().getSerializedSize();
- memoizedSerializedSize = size;
- return size;
- }
-
- public static crosby.binary.Osmformat.PrimitiveBlock parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data).buildParsed();
- }
- public static crosby.binary.Osmformat.PrimitiveBlock parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data, extensionRegistry)
- .buildParsed();
- }
- public static crosby.binary.Osmformat.PrimitiveBlock parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data).buildParsed();
- }
- public static crosby.binary.Osmformat.PrimitiveBlock parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data, extensionRegistry)
- .buildParsed();
- }
- public static crosby.binary.Osmformat.PrimitiveBlock parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input).buildParsed();
- }
- public static crosby.binary.Osmformat.PrimitiveBlock parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input, extensionRegistry)
- .buildParsed();
- }
- public static crosby.binary.Osmformat.PrimitiveBlock parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- Builder builder = newBuilder();
- if (builder.mergeDelimitedFrom(input)) {
- return builder.buildParsed();
- } else {
- return null;
- }
- }
- public static crosby.binary.Osmformat.PrimitiveBlock parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- Builder builder = newBuilder();
- if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
- return builder.buildParsed();
- } else {
- return null;
- }
- }
- public static crosby.binary.Osmformat.PrimitiveBlock parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input).buildParsed();
- }
- public static crosby.binary.Osmformat.PrimitiveBlock parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input, extensionRegistry)
- .buildParsed();
- }
-
- public static Builder newBuilder() { return Builder.create(); }
- @Override
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder(crosby.binary.Osmformat.PrimitiveBlock prototype) {
- return newBuilder().mergeFrom(prototype);
- }
- @Override
- public Builder toBuilder() { return newBuilder(this); }
-
- public static final class Builder extends
- com.google.protobuf.GeneratedMessage.Builder<Builder> {
- private crosby.binary.Osmformat.PrimitiveBlock result;
-
- // Construct using crosby.binary.Osmformat.PrimitiveBlock.newBuilder()
- private Builder() {}
-
- private static Builder create() {
- Builder builder = new Builder();
- builder.result = new crosby.binary.Osmformat.PrimitiveBlock();
- return builder;
- }
-
- @Override
- protected crosby.binary.Osmformat.PrimitiveBlock internalGetResult() {
- return result;
- }
-
- @Override
- public Builder clear() {
- if (result == null) {
- throw new IllegalStateException(
- "Cannot call clear() after build().");
- }
- result = new crosby.binary.Osmformat.PrimitiveBlock();
- return this;
- }
-
- @Override
- public Builder clone() {
- return create().mergeFrom(result);
- }
-
- @Override
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return crosby.binary.Osmformat.PrimitiveBlock.getDescriptor();
- }
-
- @Override
- public crosby.binary.Osmformat.PrimitiveBlock getDefaultInstanceForType() {
- return crosby.binary.Osmformat.PrimitiveBlock.getDefaultInstance();
- }
-
- @Override
- public boolean isInitialized() {
- return result.isInitialized();
- }
- @Override
- public crosby.binary.Osmformat.PrimitiveBlock build() {
- if (result != null && !isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return buildPartial();
- }
-
- private crosby.binary.Osmformat.PrimitiveBlock buildParsed()
- throws com.google.protobuf.InvalidProtocolBufferException {
- if (!isInitialized()) {
- throw newUninitializedMessageException(
- result).asInvalidProtocolBufferException();
- }
- return buildPartial();
- }
-
- @Override
- public crosby.binary.Osmformat.PrimitiveBlock buildPartial() {
- if (result == null) {
- throw new IllegalStateException(
- "build() has already been called on this Builder.");
- }
- if (result.primitivegroup_ != java.util.Collections.EMPTY_LIST) {
- result.primitivegroup_ =
- java.util.Collections.unmodifiableList(result.primitivegroup_);
- }
- crosby.binary.Osmformat.PrimitiveBlock returnMe = result;
- result = null;
- return returnMe;
- }
-
- @Override
- public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof crosby.binary.Osmformat.PrimitiveBlock) {
- return mergeFrom((crosby.binary.Osmformat.PrimitiveBlock)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(crosby.binary.Osmformat.PrimitiveBlock other) {
- if (other == crosby.binary.Osmformat.PrimitiveBlock.getDefaultInstance()) return this;
- if (other.hasStringtable()) {
- mergeStringtable(other.getStringtable());
- }
- if (!other.primitivegroup_.isEmpty()) {
- if (result.primitivegroup_.isEmpty()) {
- result.primitivegroup_ = new java.util.ArrayList<crosby.binary.Osmformat.PrimitiveGroup>();
- }
- result.primitivegroup_.addAll(other.primitivegroup_);
- }
- if (other.hasGranularity()) {
- setGranularity(other.getGranularity());
- }
- if (other.hasLatOffset()) {
- setLatOffset(other.getLatOffset());
- }
- if (other.hasLonOffset()) {
- setLonOffset(other.getLonOffset());
- }
- if (other.hasDateGranularity()) {
- setDateGranularity(other.getDateGranularity());
- }
- this.mergeUnknownFields(other.getUnknownFields());
- return this;
- }
-
- @Override
- public Builder mergeFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- com.google.protobuf.UnknownFieldSet.Builder unknownFields =
- com.google.protobuf.UnknownFieldSet.newBuilder(
- this.getUnknownFields());
- while (true) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- this.setUnknownFields(unknownFields.build());
- return this;
- default: {
- if (!parseUnknownField(input, unknownFields,
- extensionRegistry, tag)) {
- this.setUnknownFields(unknownFields.build());
- return this;
- }
- break;
- }
- case 10: {
- crosby.binary.Osmformat.StringTable.Builder subBuilder = crosby.binary.Osmformat.StringTable.newBuilder();
- if (hasStringtable()) {
- subBuilder.mergeFrom(getStringtable());
- }
- input.readMessage(subBuilder, extensionRegistry);
- setStringtable(subBuilder.buildPartial());
- break;
- }
- case 18: {
- crosby.binary.Osmformat.PrimitiveGroup.Builder subBuilder = crosby.binary.Osmformat.PrimitiveGroup.newBuilder();
- input.readMessage(subBuilder, extensionRegistry);
- addPrimitivegroup(subBuilder.buildPartial());
- break;
- }
- case 136: {
- setGranularity(input.readInt32());
- break;
- }
- case 144: {
- setDateGranularity(input.readInt32());
- break;
- }
- case 152: {
- setLatOffset(input.readInt64());
- break;
- }
- case 160: {
- setLonOffset(input.readInt64());
- break;
- }
- }
- }
- }
-
-
- // required .StringTable stringtable = 1;
- public boolean hasStringtable() {
- return result.hasStringtable();
- }
- public crosby.binary.Osmformat.StringTable getStringtable() {
- return result.getStringtable();
- }
- public Builder setStringtable(crosby.binary.Osmformat.StringTable value) {
- if (value == null) {
- throw new NullPointerException();
- }
- result.hasStringtable = true;
- result.stringtable_ = value;
- return this;
- }
- public Builder setStringtable(crosby.binary.Osmformat.StringTable.Builder builderForValue) {
- result.hasStringtable = true;
- result.stringtable_ = builderForValue.build();
- return this;
- }
- public Builder mergeStringtable(crosby.binary.Osmformat.StringTable value) {
- if (result.hasStringtable() &&
- result.stringtable_ != crosby.binary.Osmformat.StringTable.getDefaultInstance()) {
- result.stringtable_ =
- crosby.binary.Osmformat.StringTable.newBuilder(result.stringtable_).mergeFrom(value).buildPartial();
- } else {
- result.stringtable_ = value;
- }
- result.hasStringtable = true;
- return this;
- }
- public Builder clearStringtable() {
- result.hasStringtable = false;
- result.stringtable_ = crosby.binary.Osmformat.StringTable.getDefaultInstance();
- return this;
- }
-
- // repeated .PrimitiveGroup primitivegroup = 2;
- public java.util.List<crosby.binary.Osmformat.Primi…
Large files files are truncated, but you can click here to view the full file