/OsmAnd-java/src/net/osmand/binary/OsmandIndex.java
Java | 5262 lines | 4712 code | 381 blank | 169 comment | 537 complexity | 012fd2c73b8a82c13f0dabce6d2e4d95 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: DataExtractionOSM/src/osmand_index.proto
- package net.osmand.binary;
- public final class OsmandIndex {
- private OsmandIndex() {}
- public static void registerAllExtensions(
- com.google.protobuf.ExtensionRegistryLite registry) {
- }
- public static final class OsmAndStoredIndex extends
- com.google.protobuf.GeneratedMessageLite {
- // Use OsmAndStoredIndex.newBuilder() to construct.
- private OsmAndStoredIndex() {
- initFields();
- }
- private OsmAndStoredIndex(boolean noInit) {}
-
- private static final OsmAndStoredIndex defaultInstance;
- public static OsmAndStoredIndex getDefaultInstance() {
- return defaultInstance;
- }
-
- @Override
- public OsmAndStoredIndex getDefaultInstanceForType() {
- return defaultInstance;
- }
-
- // required uint32 version = 1;
- public static final int VERSION_FIELD_NUMBER = 1;
- private boolean hasVersion;
- private int version_ = 0;
- public boolean hasVersion() { return hasVersion; }
- public int getVersion() { return version_; }
-
- // required int64 dateCreated = 18;
- public static final int DATECREATED_FIELD_NUMBER = 18;
- private boolean hasDateCreated;
- private long dateCreated_ = 0L;
- public boolean hasDateCreated() { return hasDateCreated; }
- public long getDateCreated() { return dateCreated_; }
-
- // repeated .FileIndex fileIndex = 7;
- public static final int FILEINDEX_FIELD_NUMBER = 7;
- private java.util.List<net.osmand.binary.OsmandIndex.FileIndex> fileIndex_ =
- java.util.Collections.emptyList();
- public java.util.List<net.osmand.binary.OsmandIndex.FileIndex> getFileIndexList() {
- return fileIndex_;
- }
- public int getFileIndexCount() { return fileIndex_.size(); }
- public net.osmand.binary.OsmandIndex.FileIndex getFileIndex(int index) {
- return fileIndex_.get(index);
- }
-
- private void initFields() {
- }
- @Override
- public final boolean isInitialized() {
- if (!hasVersion) return false;
- if (!hasDateCreated) return false;
- for (net.osmand.binary.OsmandIndex.FileIndex element : getFileIndexList()) {
- if (!element.isInitialized()) return false;
- }
- return true;
- }
-
- @Override
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- getSerializedSize();
- if (hasVersion()) {
- output.writeUInt32(1, getVersion());
- }
- for (net.osmand.binary.OsmandIndex.FileIndex element : getFileIndexList()) {
- output.writeMessage(7, element);
- }
- if (hasDateCreated()) {
- output.writeInt64(18, getDateCreated());
- }
- }
-
- private int memoizedSerializedSize = -1;
- @Override
- public int getSerializedSize() {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
-
- size = 0;
- if (hasVersion()) {
- size += com.google.protobuf.CodedOutputStream
- .computeUInt32Size(1, getVersion());
- }
- for (net.osmand.binary.OsmandIndex.FileIndex element : getFileIndexList()) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(7, element);
- }
- if (hasDateCreated()) {
- size += com.google.protobuf.CodedOutputStream
- .computeInt64Size(18, getDateCreated());
- }
- memoizedSerializedSize = size;
- return size;
- }
-
- public static net.osmand.binary.OsmandIndex.OsmAndStoredIndex parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data).buildParsed();
- }
- public static net.osmand.binary.OsmandIndex.OsmAndStoredIndex parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data, extensionRegistry)
- .buildParsed();
- }
- public static net.osmand.binary.OsmandIndex.OsmAndStoredIndex parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data).buildParsed();
- }
- public static net.osmand.binary.OsmandIndex.OsmAndStoredIndex parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data, extensionRegistry)
- .buildParsed();
- }
- public static net.osmand.binary.OsmandIndex.OsmAndStoredIndex parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input).buildParsed();
- }
- public static net.osmand.binary.OsmandIndex.OsmAndStoredIndex parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input, extensionRegistry)
- .buildParsed();
- }
- public static net.osmand.binary.OsmandIndex.OsmAndStoredIndex parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- Builder builder = newBuilder();
- if (builder.mergeDelimitedFrom(input)) {
- return builder.buildParsed();
- } else {
- return null;
- }
- }
- public static net.osmand.binary.OsmandIndex.OsmAndStoredIndex 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 net.osmand.binary.OsmandIndex.OsmAndStoredIndex parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input).buildParsed();
- }
- public static net.osmand.binary.OsmandIndex.OsmAndStoredIndex 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(net.osmand.binary.OsmandIndex.OsmAndStoredIndex prototype) {
- return newBuilder().mergeFrom(prototype);
- }
- @Override
- public Builder toBuilder() { return newBuilder(this); }
-
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageLite.Builder<
- net.osmand.binary.OsmandIndex.OsmAndStoredIndex, Builder> {
- private net.osmand.binary.OsmandIndex.OsmAndStoredIndex result;
-
- // Construct using net.osmand.binary.OsmandIndex.OsmAndStoredIndex.newBuilder()
- private Builder() {}
-
- private static Builder create() {
- Builder builder = new Builder();
- builder.result = new net.osmand.binary.OsmandIndex.OsmAndStoredIndex();
- return builder;
- }
-
- @Override
- protected net.osmand.binary.OsmandIndex.OsmAndStoredIndex internalGetResult() {
- return result;
- }
-
- @Override
- public Builder clear() {
- if (result == null) {
- throw new IllegalStateException(
- "Cannot call clear() after build().");
- }
- result = new net.osmand.binary.OsmandIndex.OsmAndStoredIndex();
- return this;
- }
-
- @Override
- public Builder clone() {
- return create().mergeFrom(result);
- }
-
- @Override
- public net.osmand.binary.OsmandIndex.OsmAndStoredIndex getDefaultInstanceForType() {
- return net.osmand.binary.OsmandIndex.OsmAndStoredIndex.getDefaultInstance();
- }
-
- @Override
- public boolean isInitialized() {
- return result.isInitialized();
- }
- @Override
- public net.osmand.binary.OsmandIndex.OsmAndStoredIndex build() {
- if (result != null && !isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return buildPartial();
- }
-
- private net.osmand.binary.OsmandIndex.OsmAndStoredIndex buildParsed()
- throws com.google.protobuf.InvalidProtocolBufferException {
- if (!isInitialized()) {
- throw newUninitializedMessageException(
- result).asInvalidProtocolBufferException();
- }
- return buildPartial();
- }
-
- @Override
- public net.osmand.binary.OsmandIndex.OsmAndStoredIndex buildPartial() {
- if (result == null) {
- throw new IllegalStateException(
- "build() has already been called on this Builder.");
- }
- if (result.fileIndex_ != java.util.Collections.EMPTY_LIST) {
- result.fileIndex_ =
- java.util.Collections.unmodifiableList(result.fileIndex_);
- }
- net.osmand.binary.OsmandIndex.OsmAndStoredIndex returnMe = result;
- result = null;
- return returnMe;
- }
-
- @Override
- public Builder mergeFrom(net.osmand.binary.OsmandIndex.OsmAndStoredIndex other) {
- if (other == net.osmand.binary.OsmandIndex.OsmAndStoredIndex.getDefaultInstance()) return this;
- if (other.hasVersion()) {
- setVersion(other.getVersion());
- }
- if (other.hasDateCreated()) {
- setDateCreated(other.getDateCreated());
- }
- if (!other.fileIndex_.isEmpty()) {
- if (result.fileIndex_.isEmpty()) {
- result.fileIndex_ = new java.util.ArrayList<net.osmand.binary.OsmandIndex.FileIndex>();
- }
- result.fileIndex_.addAll(other.fileIndex_);
- }
- return this;
- }
-
- @Override
- public Builder mergeFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- while (true) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- return this;
- default: {
- if (!parseUnknownField(input, extensionRegistry, tag)) {
- return this;
- }
- break;
- }
- case 8: {
- setVersion(input.readUInt32());
- break;
- }
- case 58: {
- net.osmand.binary.OsmandIndex.FileIndex.Builder subBuilder = net.osmand.binary.OsmandIndex.FileIndex.newBuilder();
- input.readMessage(subBuilder, extensionRegistry);
- addFileIndex(subBuilder.buildPartial());
- break;
- }
- case 144: {
- setDateCreated(input.readInt64());
- break;
- }
- }
- }
- }
-
-
- // required uint32 version = 1;
- public boolean hasVersion() {
- return result.hasVersion();
- }
- public int getVersion() {
- return result.getVersion();
- }
- public Builder setVersion(int value) {
- result.hasVersion = true;
- result.version_ = value;
- return this;
- }
- public Builder clearVersion() {
- result.hasVersion = false;
- result.version_ = 0;
- return this;
- }
-
- // required int64 dateCreated = 18;
- public boolean hasDateCreated() {
- return result.hasDateCreated();
- }
- public long getDateCreated() {
- return result.getDateCreated();
- }
- public Builder setDateCreated(long value) {
- result.hasDateCreated = true;
- result.dateCreated_ = value;
- return this;
- }
- public Builder clearDateCreated() {
- result.hasDateCreated = false;
- result.dateCreated_ = 0L;
- return this;
- }
-
- // repeated .FileIndex fileIndex = 7;
- public java.util.List<net.osmand.binary.OsmandIndex.FileIndex> getFileIndexList() {
- return java.util.Collections.unmodifiableList(result.fileIndex_);
- }
- public int getFileIndexCount() {
- return result.getFileIndexCount();
- }
- public net.osmand.binary.OsmandIndex.FileIndex getFileIndex(int index) {
- return result.getFileIndex(index);
- }
- public Builder setFileIndex(int index, net.osmand.binary.OsmandIndex.FileIndex value) {
- if (value == null) {
- throw new NullPointerException();
- }
- result.fileIndex_.set(index, value);
- return this;
- }
- public Builder setFileIndex(int index, net.osmand.binary.OsmandIndex.FileIndex.Builder builderForValue) {
- result.fileIndex_.set(index, builderForValue.build());
- return this;
- }
- public Builder addFileIndex(net.osmand.binary.OsmandIndex.FileIndex value) {
- if (value == null) {
- throw new NullPointerException();
- }
- if (result.fileIndex_.isEmpty()) {
- result.fileIndex_ = new java.util.ArrayList<net.osmand.binary.OsmandIndex.FileIndex>();
- }
- result.fileIndex_.add(value);
- return this;
- }
- public Builder addFileIndex(net.osmand.binary.OsmandIndex.FileIndex.Builder builderForValue) {
- if (result.fileIndex_.isEmpty()) {
- result.fileIndex_ = new java.util.ArrayList<net.osmand.binary.OsmandIndex.FileIndex>();
- }
- result.fileIndex_.add(builderForValue.build());
- return this;
- }
- public Builder addAllFileIndex(
- java.lang.Iterable<? extends net.osmand.binary.OsmandIndex.FileIndex> values) {
- if (result.fileIndex_.isEmpty()) {
- result.fileIndex_ = new java.util.ArrayList<net.osmand.binary.OsmandIndex.FileIndex>();
- }
- super.addAll(values, result.fileIndex_);
- return this;
- }
- public Builder clearFileIndex() {
- result.fileIndex_ = java.util.Collections.emptyList();
- return this;
- }
-
- // @@protoc_insertion_point(builder_scope:OsmAndStoredIndex)
- }
-
- static {
- defaultInstance = new OsmAndStoredIndex(true);
- net.osmand.binary.OsmandIndex.internalForceInit();
- defaultInstance.initFields();
- }
-
- // @@protoc_insertion_point(class_scope:OsmAndStoredIndex)
- }
-
- public static final class FileIndex extends
- com.google.protobuf.GeneratedMessageLite {
- // Use FileIndex.newBuilder() to construct.
- private FileIndex() {
- initFields();
- }
- private FileIndex(boolean noInit) {}
-
- private static final FileIndex defaultInstance;
- public static FileIndex getDefaultInstance() {
- return defaultInstance;
- }
-
- @Override
- public FileIndex getDefaultInstanceForType() {
- return defaultInstance;
- }
-
- // required int64 size = 1;
- public static final int SIZE_FIELD_NUMBER = 1;
- private boolean hasSize;
- private long size_ = 0L;
- public boolean hasSize() { return hasSize; }
- public long getSize() { return size_; }
-
- // required int64 dateModified = 2;
- public static final int DATEMODIFIED_FIELD_NUMBER = 2;
- private boolean hasDateModified;
- private long dateModified_ = 0L;
- public boolean hasDateModified() { return hasDateModified; }
- public long getDateModified() { return dateModified_; }
-
- // required string fileName = 3;
- public static final int FILENAME_FIELD_NUMBER = 3;
- private boolean hasFileName;
- private java.lang.String fileName_ = "";
- public boolean hasFileName() { return hasFileName; }
- public java.lang.String getFileName() { return fileName_; }
-
- // required int32 version = 4;
- public static final int VERSION_FIELD_NUMBER = 4;
- private boolean hasVersion;
- private int version_ = 0;
- public boolean hasVersion() { return hasVersion; }
- public int getVersion() { return version_; }
-
- // repeated .AddressPart addressIndex = 8;
- public static final int ADDRESSINDEX_FIELD_NUMBER = 8;
- private java.util.List<net.osmand.binary.OsmandIndex.AddressPart> addressIndex_ =
- java.util.Collections.emptyList();
- public java.util.List<net.osmand.binary.OsmandIndex.AddressPart> getAddressIndexList() {
- return addressIndex_;
- }
- public int getAddressIndexCount() { return addressIndex_.size(); }
- public net.osmand.binary.OsmandIndex.AddressPart getAddressIndex(int index) {
- return addressIndex_.get(index);
- }
-
- // repeated .TransportPart transportIndex = 9;
- public static final int TRANSPORTINDEX_FIELD_NUMBER = 9;
- private java.util.List<net.osmand.binary.OsmandIndex.TransportPart> transportIndex_ =
- java.util.Collections.emptyList();
- public java.util.List<net.osmand.binary.OsmandIndex.TransportPart> getTransportIndexList() {
- return transportIndex_;
- }
- public int getTransportIndexCount() { return transportIndex_.size(); }
- public net.osmand.binary.OsmandIndex.TransportPart getTransportIndex(int index) {
- return transportIndex_.get(index);
- }
-
- // repeated .PoiPart poiIndex = 10;
- public static final int POIINDEX_FIELD_NUMBER = 10;
- private java.util.List<net.osmand.binary.OsmandIndex.PoiPart> poiIndex_ =
- java.util.Collections.emptyList();
- public java.util.List<net.osmand.binary.OsmandIndex.PoiPart> getPoiIndexList() {
- return poiIndex_;
- }
- public int getPoiIndexCount() { return poiIndex_.size(); }
- public net.osmand.binary.OsmandIndex.PoiPart getPoiIndex(int index) {
- return poiIndex_.get(index);
- }
-
- // repeated .MapPart mapIndex = 11;
- public static final int MAPINDEX_FIELD_NUMBER = 11;
- private java.util.List<net.osmand.binary.OsmandIndex.MapPart> mapIndex_ =
- java.util.Collections.emptyList();
- public java.util.List<net.osmand.binary.OsmandIndex.MapPart> getMapIndexList() {
- return mapIndex_;
- }
- public int getMapIndexCount() { return mapIndex_.size(); }
- public net.osmand.binary.OsmandIndex.MapPart getMapIndex(int index) {
- return mapIndex_.get(index);
- }
-
- // repeated .RoutingPart routingIndex = 12;
- public static final int ROUTINGINDEX_FIELD_NUMBER = 12;
- private java.util.List<net.osmand.binary.OsmandIndex.RoutingPart> routingIndex_ =
- java.util.Collections.emptyList();
- public java.util.List<net.osmand.binary.OsmandIndex.RoutingPart> getRoutingIndexList() {
- return routingIndex_;
- }
- public int getRoutingIndexCount() { return routingIndex_.size(); }
- public net.osmand.binary.OsmandIndex.RoutingPart getRoutingIndex(int index) {
- return routingIndex_.get(index);
- }
-
- private void initFields() {
- }
- @Override
- public final boolean isInitialized() {
- if (!hasSize) return false;
- if (!hasDateModified) return false;
- if (!hasFileName) return false;
- if (!hasVersion) return false;
- for (net.osmand.binary.OsmandIndex.AddressPart element : getAddressIndexList()) {
- if (!element.isInitialized()) return false;
- }
- for (net.osmand.binary.OsmandIndex.TransportPart element : getTransportIndexList()) {
- if (!element.isInitialized()) return false;
- }
- for (net.osmand.binary.OsmandIndex.PoiPart element : getPoiIndexList()) {
- if (!element.isInitialized()) return false;
- }
- for (net.osmand.binary.OsmandIndex.MapPart element : getMapIndexList()) {
- if (!element.isInitialized()) return false;
- }
- for (net.osmand.binary.OsmandIndex.RoutingPart element : getRoutingIndexList()) {
- if (!element.isInitialized()) return false;
- }
- return true;
- }
-
- @Override
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- getSerializedSize();
- if (hasSize()) {
- output.writeInt64(1, getSize());
- }
- if (hasDateModified()) {
- output.writeInt64(2, getDateModified());
- }
- if (hasFileName()) {
- output.writeString(3, getFileName());
- }
- if (hasVersion()) {
- output.writeInt32(4, getVersion());
- }
- for (net.osmand.binary.OsmandIndex.AddressPart element : getAddressIndexList()) {
- output.writeMessage(8, element);
- }
- for (net.osmand.binary.OsmandIndex.TransportPart element : getTransportIndexList()) {
- output.writeMessage(9, element);
- }
- for (net.osmand.binary.OsmandIndex.PoiPart element : getPoiIndexList()) {
- output.writeMessage(10, element);
- }
- for (net.osmand.binary.OsmandIndex.MapPart element : getMapIndexList()) {
- output.writeMessage(11, element);
- }
- for (net.osmand.binary.OsmandIndex.RoutingPart element : getRoutingIndexList()) {
- output.writeMessage(12, element);
- }
- }
-
- private int memoizedSerializedSize = -1;
- @Override
- public int getSerializedSize() {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
-
- size = 0;
- if (hasSize()) {
- size += com.google.protobuf.CodedOutputStream
- .computeInt64Size(1, getSize());
- }
- if (hasDateModified()) {
- size += com.google.protobuf.CodedOutputStream
- .computeInt64Size(2, getDateModified());
- }
- if (hasFileName()) {
- size += com.google.protobuf.CodedOutputStream
- .computeStringSize(3, getFileName());
- }
- if (hasVersion()) {
- size += com.google.protobuf.CodedOutputStream
- .computeInt32Size(4, getVersion());
- }
- for (net.osmand.binary.OsmandIndex.AddressPart element : getAddressIndexList()) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(8, element);
- }
- for (net.osmand.binary.OsmandIndex.TransportPart element : getTransportIndexList()) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(9, element);
- }
- for (net.osmand.binary.OsmandIndex.PoiPart element : getPoiIndexList()) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(10, element);
- }
- for (net.osmand.binary.OsmandIndex.MapPart element : getMapIndexList()) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(11, element);
- }
- for (net.osmand.binary.OsmandIndex.RoutingPart element : getRoutingIndexList()) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(12, element);
- }
- memoizedSerializedSize = size;
- return size;
- }
-
- public static net.osmand.binary.OsmandIndex.FileIndex parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data).buildParsed();
- }
- public static net.osmand.binary.OsmandIndex.FileIndex parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data, extensionRegistry)
- .buildParsed();
- }
- public static net.osmand.binary.OsmandIndex.FileIndex parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data).buildParsed();
- }
- public static net.osmand.binary.OsmandIndex.FileIndex parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data, extensionRegistry)
- .buildParsed();
- }
- public static net.osmand.binary.OsmandIndex.FileIndex parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input).buildParsed();
- }
- public static net.osmand.binary.OsmandIndex.FileIndex parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input, extensionRegistry)
- .buildParsed();
- }
- public static net.osmand.binary.OsmandIndex.FileIndex parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- Builder builder = newBuilder();
- if (builder.mergeDelimitedFrom(input)) {
- return builder.buildParsed();
- } else {
- return null;
- }
- }
- public static net.osmand.binary.OsmandIndex.FileIndex 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 net.osmand.binary.OsmandIndex.FileIndex parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input).buildParsed();
- }
- public static net.osmand.binary.OsmandIndex.FileIndex 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(net.osmand.binary.OsmandIndex.FileIndex prototype) {
- return newBuilder().mergeFrom(prototype);
- }
- @Override
- public Builder toBuilder() { return newBuilder(this); }
-
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageLite.Builder<
- net.osmand.binary.OsmandIndex.FileIndex, Builder> {
- private net.osmand.binary.OsmandIndex.FileIndex result;
-
- // Construct using net.osmand.binary.OsmandIndex.FileIndex.newBuilder()
- private Builder() {}
-
- private static Builder create() {
- Builder builder = new Builder();
- builder.result = new net.osmand.binary.OsmandIndex.FileIndex();
- return builder;
- }
-
- @Override
- protected net.osmand.binary.OsmandIndex.FileIndex internalGetResult() {
- return result;
- }
-
- @Override
- public Builder clear() {
- if (result == null) {
- throw new IllegalStateException(
- "Cannot call clear() after build().");
- }
- result = new net.osmand.binary.OsmandIndex.FileIndex();
- return this;
- }
-
- @Override
- public Builder clone() {
- return create().mergeFrom(result);
- }
-
- @Override
- public net.osmand.binary.OsmandIndex.FileIndex getDefaultInstanceForType() {
- return net.osmand.binary.OsmandIndex.FileIndex.getDefaultInstance();
- }
-
- @Override
- public boolean isInitialized() {
- return result.isInitialized();
- }
- @Override
- public net.osmand.binary.OsmandIndex.FileIndex build() {
- if (result != null && !isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return buildPartial();
- }
-
- private net.osmand.binary.OsmandIndex.FileIndex buildParsed()
- throws com.google.protobuf.InvalidProtocolBufferException {
- if (!isInitialized()) {
- throw newUninitializedMessageException(
- result).asInvalidProtocolBufferException();
- }
- return buildPartial();
- }
-
- @Override
- public net.osmand.binary.OsmandIndex.FileIndex buildPartial() {
- if (result == null) {
- throw new IllegalStateException(
- "build() has already been called on this Builder.");
- }
- if (result.addressIndex_ != java.util.Collections.EMPTY_LIST) {
- result.addressIndex_ =
- java.util.Collections.unmodifiableList(result.addressIndex_);
- }
- if (result.transportIndex_ != java.util.Collections.EMPTY_LIST) {
- result.transportIndex_ =
- java.util.Collections.unmodifiableList(result.transportIndex_);
- }
- if (result.poiIndex_ != java.util.Collections.EMPTY_LIST) {
- result.poiIndex_ =
- java.util.Collections.unmodifiableList(result.poiIndex_);
- }
- if (result.mapIndex_ != java.util.Collections.EMPTY_LIST) {
- result.mapIndex_ =
- java.util.Collections.unmodifiableList(result.mapIndex_);
- }
- if (result.routingIndex_ != java.util.Collections.EMPTY_LIST) {
- result.routingIndex_ =
- java.util.Collections.unmodifiableList(result.routingIndex_);
- }
- net.osmand.binary.OsmandIndex.FileIndex returnMe = result;
- result = null;
- return returnMe;
- }
-
- @Override
- public Builder mergeFrom(net.osmand.binary.OsmandIndex.FileIndex other) {
- if (other == net.osmand.binary.OsmandIndex.FileIndex.getDefaultInstance()) return this;
- if (other.hasSize()) {
- setSize(other.getSize());
- }
- if (other.hasDateModified()) {
- setDateModified(other.getDateModified());
- }
- if (other.hasFileName()) {
- setFileName(other.getFileName());
- }
- if (other.hasVersion()) {
- setVersion(other.getVersion());
- }
- if (!other.addressIndex_.isEmpty()) {
- if (result.addressIndex_.isEmpty()) {
- result.addressIndex_ = new java.util.ArrayList<net.osmand.binary.OsmandIndex.AddressPart>();
- }
- result.addressIndex_.addAll(other.addressIndex_);
- }
- if (!other.transportIndex_.isEmpty()) {
- if (result.transportIndex_.isEmpty()) {
- result.transportIndex_ = new java.util.ArrayList<net.osmand.binary.OsmandIndex.TransportPart>();
- }
- result.transportIndex_.addAll(other.transportIndex_);
- }
- if (!other.poiIndex_.isEmpty()) {
- if (result.poiIndex_.isEmpty()) {
- result.poiIndex_ = new java.util.ArrayList<net.osmand.binary.OsmandIndex.PoiPart>();
- }
- result.poiIndex_.addAll(other.poiIndex_);
- }
- if (!other.mapIndex_.isEmpty()) {
- if (result.mapIndex_.isEmpty()) {
- result.mapIndex_ = new java.util.ArrayList<net.osmand.binary.OsmandIndex.MapPart>();
- }
- result.mapIndex_.addAll(other.mapIndex_);
- }
- if (!other.routingIndex_.isEmpty()) {
- if (result.routingIndex_.isEmpty()) {
- result.routingIndex_ = new java.util.ArrayList<net.osmand.binary.OsmandIndex.RoutingPart>();
- }
- result.routingIndex_.addAll(other.routingIndex_);
- }
- return this;
- }
-
- @Override
- public Builder mergeFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- while (true) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- return this;
- default: {
- if (!parseUnknownField(input, extensionRegistry, tag)) {
- return this;
- }
- break;
- }
- case 8: {
- setSize(input.readInt64());
- break;
- }
- case 16: {
- setDateModified(input.readInt64());
- break;
- }
- case 26: {
- setFileName(input.readString());
- break;
- }
- case 32: {
- setVersion(input.readInt32());
- break;
- }
- case 66: {
- net.osmand.binary.OsmandIndex.AddressPart.Builder subBuilder = net.osmand.binary.OsmandIndex.AddressPart.newBuilder();
- input.readMessage(subBuilder, extensionRegistry);
- addAddressIndex(subBuilder.buildPartial());
- break;
- }
- case 74: {
- net.osmand.binary.OsmandIndex.TransportPart.Builder subBuilder = net.osmand.binary.OsmandIndex.TransportPart.newBuilder();
- input.readMessage(subBuilder, extensionRegistry);
- addTransportIndex(subBuilder.buildPartial());
- break;
- }
- case 82: {
- net.osmand.binary.OsmandIndex.PoiPart.Builder subBuilder = net.osmand.binary.OsmandIndex.PoiPart.newBuilder();
- input.readMessage(subBuilder, extensionRegistry);
- addPoiIndex(subBuilder.buildPartial());
- break;
- }
- case 90: {
- net.osmand.binary.OsmandIndex.MapPart.Builder subBuilder = net.osmand.binary.OsmandIndex.MapPart.newBuilder();
- input.readMessage(subBuilder, extensionRegistry);
- addMapIndex(subBuilder.buildPartial());
- break;
- }
- case 98: {
- net.osmand.binary.OsmandIndex.RoutingPart.Builder subBuilder = net.osmand.binary.OsmandIndex.RoutingPart.newBuilder();
- input.readMessage(subBuilder, extensionRegistry);
- addRoutingIndex(subBuilder.buildPartial());
- break;
- }
- }
- }
- }
-
-
- // required int64 size = 1;
- public boolean hasSize() {
- return result.hasSize();
- }
- public long getSize() {
- return result.getSize();
- }
- public Builder setSize(long value) {
- result.hasSize = true;
- result.size_ = value;
- return this;
- }
- public Builder clearSize() {
- result.hasSize = false;
- result.size_ = 0L;
- return this;
- }
-
- // required int64 dateModified = 2;
- public boolean hasDateModified() {
- return result.hasDateModified();
- }
- public long getDateModified() {
- return result.getDateModified();
- }
- public Builder setDateModified(long value) {
- result.hasDateModified = true;
- result.dateModified_ = value;
- return this;
- }
- public Builder clearDateModified() {
- result.hasDateModified = false;
- result.dateModified_ = 0L;
- return this;
- }
-
- // required string fileName = 3;
- public boolean hasFileName() {
- return result.hasFileName();
- }
- public java.lang.String getFileName() {
- return result.getFileName();
- }
- public Builder setFileName(java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- result.hasFileName = true;
- result.fileName_ = value;
- return this;
- }
- public Builder clearFileName() {
- result.hasFileName = false;
- result.fileName_ = getDefaultInstance().getFileName();
- return this;
- }
-
- // required int32 version = 4;
- public boolean hasVersion() {
- return result.hasVersion();
- }
- public int getVersion() {
- return result.getVersion();
- }
- public Builder setVersion(int value) {
- result.hasVersion = true;
- result.version_ = value;
- return this;
- }
- public Builder clearVersion() {
- result.hasVersion = false;
- result.version_ = 0;
- return this;
- }
-
- // repeated .AddressPart addressIndex = 8;
- public java.util.List<net.osmand.binary.OsmandIndex.AddressPart> getAddressIndexList() {
- return java.util.Collections.unmodifiableList(result.addressIndex_);
- }
- public int getAddressIndexCount() {
- return result.getAddressIndexCount();
- }
- public net.osmand.binary.OsmandIndex.AddressPart getAddressIndex(int index) {
- return result.getAddressIndex(index);
- }
- public Builder setAddressIndex(int index, net.osmand.binary.OsmandIndex.AddressPart value) {
- if (value == null) {
- throw new NullPointerException();
- }
- result.addressIndex_.set(index, value);
- return this;
- }
- public Builder setAddressIndex(int index, net.osmand.binary.OsmandIndex.AddressPart.Builder builderForValue) {
- result.addressIndex_.set(index, builderForValue.build());
- return this;
- }
- public Builder addAddressIndex(net.osmand.binary.OsmandIndex.AddressPart value) {
- if (value == null) {
- throw new NullPointerException();
- }
- if (result.addressIndex_.isEmpty()) {
- result.addressIndex_ = new java.util.ArrayList<net.osmand.binary.OsmandIndex.AddressPart>();
- }
- result.addressIndex_.add(value);
- return this;
- }
- public Builder addAddressIndex(net.osmand.binary.OsmandIndex.AddressPart.Builder builderForValue) {
- if (result.addressIndex_.isEmpty()) {
- result.addressIndex_ = new java.util.ArrayList<net.osmand.binary.OsmandIndex.AddressPart>();
- }
- result.addressIndex_.add(builderForValue.build());
- return this;
- }
- public Builder addAllAddressIndex(
- java.lang.Iterable<? extends net.osmand.binary.OsmandIndex.AddressPart> values) {
- if (result.addressIndex_.isEmpty()) {
- result.addressIndex_ = new java.util.ArrayList<net.osmand.binary.OsmandIndex.AddressPart>();
- }
- super.addAll(values, result.addressIndex_);
- return this;
- }
- public Builder clearAddressIndex() {
- result.addressIndex_ = java.util.Collections.emptyList();
- return this;
- }
-
- // repeated .TransportPart transportIndex = 9;
- public java.util.List<net.osmand.binary.OsmandIndex.TransportPart> getTransportIndexList() {
- return java.util.Collections.unmodifiableList(result.transportIndex_);
- }
- public int getTransportIndexCount() {
- return result.getTransportIndexCount();
- }
- public net.osmand.binary.OsmandIndex.TransportPart getTransportIndex(int index) {
- return result.getTransportIndex(index);
- }
- public Builder setTransportIndex(int index, net.osmand.binary.OsmandIndex.TransportPart value) {
- if (value == null) {
- throw new NullPointerException();
- }
- result.transportIndex_.set(index, value);
- return this;
- }
- public Builder setTransportIndex(int index, net.osmand.binary.OsmandIndex.TransportPart.Builder builderForValue) {
- result.transportIndex_.set(index, builderForValue.build());
- return this;
- }
- public Builder addTransportIndex(net.osmand.binary.OsmandIndex.TransportPart value) {
- if (value == null) {
- throw new NullPointerException();
- }
- if (result.transportIndex_.isEmpty()) {
- result.transportIndex_ = new java.util.ArrayList<net.osmand.binary.OsmandIndex.TransportPart>();
- }
- result.transportIndex_.add(value);
- return this;
- }
- public Builder addTransportIndex(net.osmand.binary.OsmandIndex.TransportPart.Builder builderForValue) {
- if (result.transportIndex_.isEmpty()) {
- result.transportIndex_ = new java.util.ArrayList<net.osmand.binary.OsmandIndex.TransportPart>();
- }
- result.transportIndex_.add(builderForValue.build());
- return this;
- }
- public Builder addAllTransportIndex(
- java.lang.Iterable<? extends net.osmand.binary.OsmandIndex.TransportPart> values) {
- if (result.transportIndex_.isEmpty()) {
- result.transportIndex_ = new java.util.ArrayList<net.osmand.binary.OsmandIndex.TransportPart>();
- }
- super.addAll(values, result.transportIndex_);
- return this;
- }
- public Builder clearTransportIndex() {
- result.transportIndex_ = java.util.Collections.emptyList();
- return this;
- }
-
- // repeated .PoiPart poiIndex = 10;
- public java.util.List<net.osmand.binary.OsmandIndex.PoiPart> getPoiIndexList() {
- return java.util.Collections.unmodifiableList(result.poiIndex_);
- }
- public int getPoiIndexCount() {
- return result.getPoiIndexCount();
- }
- public net.osmand.binary.OsmandIndex.PoiPart getPoiIndex(int index) {
- return result.getPoiIndex(index);
- }
- public Builder setPoiIndex(int index, net.osmand.binary.OsmandIndex.PoiPart value) {
- if (value == null) {
- throw new NullPointerException();
- }
- result.poiIndex_.set(index, value);
- return this;
- }
- public Builder setPoiIndex(int index, net.osmand.binary.OsmandIndex.PoiPart.Builder builderForValue) {
- result.poiIndex_.set(index, builderForValue.build());
- return this;
- }
- public Builder addPoiIndex(net.osmand.binary.OsmandIndex.PoiPart value) {
- if (value == null) {
- throw new NullPointerException();
- }
- if (result.poiIndex_.isEmpty()) {
- result.poiIndex_ = new java.util.ArrayList<net.osmand.binary.OsmandIndex.PoiPart>();
- }
- result.poiIndex_.add(value);
- return this;
- }
- public Builder addPoiIndex(net.osmand.binary.OsmandIndex.PoiPart.Builder builderForValue) {
- if (result.poiIndex_.isEmpty()) {
- result.poiIndex_ = new java.util.ArrayList<net.osmand.binary.OsmandIndex.PoiPart>();
- }
- result.poiIndex_.add(builderForValue.build());
- return this;
- }
- public Builder addAllPoiIndex(
- java.lang.Iterable<? extends net.osmand.binary.OsmandIndex.PoiPart> values) {
- if (result.poiIndex_.isEmpty()) {
- result.poiIndex_ = new java.util.ArrayList<net.osmand.binary.OsmandIndex.PoiPart>();
- }
- super.addAll(values, result.poiIndex_);
- return this;
- }
- public Builder clearPoiIndex() {
- result.poiIndex_ = java.util.Collections.emptyList();
- return this;
- }
-
- // repeated .MapPart mapIndex = 11;
- public java.util.List<net.osmand.binary.OsmandIndex.MapPart> getMapIndexList() {
- return java.util.Collections.unmodifiableList(result.mapIndex_);
- }
- public int getMapIndexCount() {
- return result.getMapIndexCount();
- }
- public net.osmand.binary.OsmandIndex.MapPart getMapIndex(int index) {
- return result.getMapIndex(index);
- }
- public Builder setMapIndex(int index, net.osmand.binary.OsmandIndex.MapPart value) {
- if (value == null) {
- throw new NullPointerException();
- }
- result.mapIndex_.set(index, value);
- return this;
- }
- public Builder setMapIndex(int index, net.osmand.binary.OsmandIndex.MapPart.Builder builderForValue) {
- result.mapIndex_.set(index, builderForValue.build());
- return this;
- }
- public Builder addMapIndex(net.osmand.binary.OsmandIndex.MapPart value) {
- if (value == null) {
- throw new NullPointerException();
- }
- if (result.mapIndex_.isEmpty()) {
- result.mapIndex_ = new java.util.ArrayList<net.osmand.binary.OsmandIndex.MapPart>();
- }
- result.mapIndex_.add(value);
- return this;
- }
- public Builder addMapIndex(net.osmand.binary.OsmandIndex.MapPart.Builder builderForValue) {
- if (result.mapIndex_.isEmpty()) {
- result.mapIndex_ = new java.util.ArrayList<net.osmand.binary.OsmandIndex.MapPart>();
- }
- result.mapIndex_.add(builderForValue.build());
- return this;
- }
- public Builder addAllMapIndex(
- java.lang.Iterable<? extends net.osmand.binary.OsmandIndex.MapPart> values) {
- if (result.mapIndex_.isEmpty()) {
- result.mapIndex_ = new java.util.ArrayList<net.osmand.binary.OsmandIndex.MapPart>();
- }
- super.addAll(values, result.mapIndex_);
- return this;
- }
- public Builder clearMapIndex() {
- result.mapIndex_ = java.util.Collections.emptyList();
- return this;
- }
-
- // repeated .RoutingPart routingIndex = 12;
- public java.util.List<net.osmand.binary.OsmandIndex.RoutingPart> getRoutingIndexList() {
- return java.util.Collections.unmodifiableList(result.routingIndex_);
- }
- public int getRoutingIndexCount() {
- return result.getRoutingIndexCount();
- }
- public net.osmand.binary.OsmandIndex.RoutingPart getRoutingIndex(int index) {
- return result.getRoutingIndex(index);
- }
- public Builder setRoutingIndex(int index, net.osmand.binary.OsmandIndex.RoutingPart value) {
- if (value == null) {
- throw new NullPointerException();
- }
- result.routingIndex_.set(index, value);
- return this;
- }
- public Builder setRoutingIndex(int index, net.osmand.binary.OsmandIndex.RoutingPart.Builder builderForValue) {
- result.routingIndex_.set(index, builderForValue.build());
- return this;
- }
- public Builder addRoutingIndex(net.osmand.binary.OsmandIndex.RoutingPart value) {
- if (value == null) {
- throw new NullPointerException();
- }
- if (result.routingIndex_.isEmpty()) {
- result.routingIndex_ = new java.util.ArrayList<net.osmand.binary.OsmandIndex.RoutingPart>();
- }
- result.routingIndex_.add(value);
- return this;
- }
- public Builder addRoutingIndex(net.osmand.binary.OsmandIndex.RoutingPart.Builder builderForValue) {
- if (result.routingIndex_.isEmpty()) {
- result.routingIndex_ = new java.util.ArrayList<net.osmand.binary.OsmandIndex.RoutingPart>();
- }
- result.routingIndex_.add(builderForValue.build());
- return this;
- }
- public Builder addAllRoutingIndex(
- java.lang.Iterable<? extends net.osmand.binary.OsmandIndex.RoutingPart> values) {
- if (result.routingIndex_.isEmpty()) {
- result.routingIndex_ = new java.util.ArrayList<net.osmand.binary.OsmandIndex.RoutingPart>();
- }
- super.addAll(values, result.routingIndex_);
- return this;
- }
- public Builder clearRoutingIndex() {
- result.routingIndex_ = java.util.Collections.emptyList();
- return this;
- }
-
- // @@protoc_insertion_point(builder_scope:FileIndex)
- }
-
- static {
- defaultInstance = new FileIndex(true);
- net.osmand.binary.OsmandIndex.internalForceInit();
- defaultInstance.initFields();
- }
-
- // @@protoc_insertion_point(class_scope:FileIndex)
- }
-
- public static final class AddressPart extends
- com.google.protobuf.GeneratedMessageLite {
- // Use AddressPart.newBuilder() to construct.
- private AddressPart() {
- initFields();
- }
- private AddressPart(boolean noInit) {}
-
- private static final AddressPart defaultInstance;
- public static AddressPart getDefaultInstance() {
- return defaultInstance;
- }
-
- @Override
- public AddressPart getDefaultInstanceForType() {
- return defaultInstance;
- }
-
- // required int64 size = 1;
- public static final int SIZE_FIELD_NUMBER = 1;
- private boolean hasSize;
- private long size_ = 0L;
- public boolean hasSize() { return hasSize; }
- public long getSize() { return size_; }
-
- // required int64 offset = 2;
- public static final int OFFSET_FIELD_NUMBER = 2;
- private boolean hasOffset;
- private long offset_ = 0L;
- public boolean hasOffset() { return hasOffset; }
- public long getOffset() { return offset_; }
-
- // optional string name = 3;
- public static final int NAME_FIELD_NUMBER = 3;
- private boolean hasName;
- private java.lang.String name_ = "";
- public boolean hasName() { return hasName; }
- public java.lang.String getName() { return name_; }
-
- // optional string nameEn = 4;
- public static final int NAMEEN_FIELD_NUMBER = 4;
- private boolean hasNameEn;
- private java.lang.String nameEn_ = "";
- public boolean hasNameEn() { return hasNameEn; }
- public java.lang.String getNameEn() { return nameEn_; }
-
- // optional int32 indexNameOffset = 5;
- public static final int INDEXNAMEOFFSET_FIELD_NUMBER = 5;
- private boolean hasIndexNameOffset;
- private int indexNameOffset_ = 0;
- public boolean hasIndexNameOffset() { return hasIndexNameOffset; }
- public int getIndexNameOffset() { return indexNameOffset_; }
-
- // repeated .CityBlock cities = 8;
- public static final int CITIES_FIELD_NUMBER = 8;
- private java.util.List<net.osmand.binary.OsmandIndex.CityBlock> cities_ =
- java.util.Collections.emptyList();
- public java.util.List<net.osmand.binary.OsmandIndex.CityBlock> getCitiesList() {
- return cities_;
- }
- public int getCitiesCount() { return cities_.size(); }
- public net.osmand.binary.OsmandIndex.CityBlock getCities(int index) {
- return cities_.get(index);
- }
-
- private void initFields() {
- }
- @Override
- public final boolean isInitialized() {
- if (!hasSize) return false;
- if (!hasOffset) return false;
- for (net.osmand.binary.OsmandIndex.CityBlock element : getCitiesList()) {
- if (!element.isInitialized()) return false;
- }
- return true;
- }
-
- @Override
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- getSerializedSize();
- if (hasSize()) {
- output.writeInt64(1, getSize());
- }
- if (hasOffset()) {
- output.writeInt64(2, getOffset());
- }
- if (hasName()) {
- output.writeString(3, getName());
- }
- if (hasNameEn()) {
- outpu…
Large files files are truncated, but you can click here to view the full file