Codebase list osmosis / upstream/0.48.3+git20220402.1.8449740
Import upstream version 0.48.3+git20220402.1.8449740 Debian Janitor 2 years ago
46 changed file(s) with 80 addition(s) and 22114 deletion(s). Raw diff Collapse all Expand all
0 name: Continuous Integration
1 on: [push]
2 jobs:
3 Continous-Integration:
4 runs-on: ubuntu-latest
5 steps:
6 - name: Checkout
7 uses: actions/checkout@v2
8 - name: Build
9 run: ./docker.sh ./gradlew build
+0
-5
.travis.yml less more
0 services:
1 - docker
2
3 script:
4 - ./docker.sh ./gradlew build
00 # Osmosis
1 [![Build Status](https://travis-ci.org/openstreetmap/osmosis.svg?branch=master)](https://travis-ci.org/openstreetmap/osmosis)
1 ![Build Status](https://github.com/openstreetmap/osmosis/actions/workflows/continuous-integration.yml/badge.svg)
22
33 ## Overview
44
4646
4747 ## Issue Tracking
4848
49 See https://trac.openstreetmap.org/query?status=!closed&component=osmosis
49 See https://github.com/openstreetmap/osmosis/issues
0 # Enable the gradle build daemon. The daemon is a gradle process that
1 # remains running between builds. This significantly speeds up build
2 # times.
0 # Maximise Gradle performance by enabling various optional features that significantly speed up build times.
1 # See https://docs.gradle.org/current/userguide/build_environment.html for details.
32 org.gradle.daemon=true
3 org.gradle.caching = true
4 org.gradle.parallel = true
5 org.gradle.configureondemand = true
46
57 # 3rd Party Library Versions
68 dependencyVersionClassworlds=2.5.2
1618 dependencyVersionMySql=8.0.12
1719 # Need to migrate to Netty 4
1820 dependencyVersionNetty=3.10.6.Final
21 dependencyVersionOsmPbf=1.5.0
1922 dependencyVersionPostGis=2.2.1
2023 dependencyVersionPostgreSql=42.2.5
2124 dependencyVersionProtobuf=3.12.2
+0
-6
osmosis-osm-binary/.gitignore less more
0 .classpath
1 .project
2 .settings
3 /bin
4 /build
5
+0
-165
osmosis-osm-binary/COPYING.osmpbf less more
0 GNU LESSER GENERAL PUBLIC LICENSE
1 Version 3, 29 June 2007
2
3 Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
4 Everyone is permitted to copy and distribute verbatim copies
5 of this license document, but changing it is not allowed.
6
7
8 This version of the GNU Lesser General Public License incorporates
9 the terms and conditions of version 3 of the GNU General Public
10 License, supplemented by the additional permissions listed below.
11
12 0. Additional Definitions.
13
14 As used herein, "this License" refers to version 3 of the GNU Lesser
15 General Public License, and the "GNU GPL" refers to version 3 of the GNU
16 General Public License.
17
18 "The Library" refers to a covered work governed by this License,
19 other than an Application or a Combined Work as defined below.
20
21 An "Application" is any work that makes use of an interface provided
22 by the Library, but which is not otherwise based on the Library.
23 Defining a subclass of a class defined by the Library is deemed a mode
24 of using an interface provided by the Library.
25
26 A "Combined Work" is a work produced by combining or linking an
27 Application with the Library. The particular version of the Library
28 with which the Combined Work was made is also called the "Linked
29 Version".
30
31 The "Minimal Corresponding Source" for a Combined Work means the
32 Corresponding Source for the Combined Work, excluding any source code
33 for portions of the Combined Work that, considered in isolation, are
34 based on the Application, and not on the Linked Version.
35
36 The "Corresponding Application Code" for a Combined Work means the
37 object code and/or source code for the Application, including any data
38 and utility programs needed for reproducing the Combined Work from the
39 Application, but excluding the System Libraries of the Combined Work.
40
41 1. Exception to Section 3 of the GNU GPL.
42
43 You may convey a covered work under sections 3 and 4 of this License
44 without being bound by section 3 of the GNU GPL.
45
46 2. Conveying Modified Versions.
47
48 If you modify a copy of the Library, and, in your modifications, a
49 facility refers to a function or data to be supplied by an Application
50 that uses the facility (other than as an argument passed when the
51 facility is invoked), then you may convey a copy of the modified
52 version:
53
54 a) under this License, provided that you make a good faith effort to
55 ensure that, in the event an Application does not supply the
56 function or data, the facility still operates, and performs
57 whatever part of its purpose remains meaningful, or
58
59 b) under the GNU GPL, with none of the additional permissions of
60 this License applicable to that copy.
61
62 3. Object Code Incorporating Material from Library Header Files.
63
64 The object code form of an Application may incorporate material from
65 a header file that is part of the Library. You may convey such object
66 code under terms of your choice, provided that, if the incorporated
67 material is not limited to numerical parameters, data structure
68 layouts and accessors, or small macros, inline functions and templates
69 (ten or fewer lines in length), you do both of the following:
70
71 a) Give prominent notice with each copy of the object code that the
72 Library is used in it and that the Library and its use are
73 covered by this License.
74
75 b) Accompany the object code with a copy of the GNU GPL and this license
76 document.
77
78 4. Combined Works.
79
80 You may convey a Combined Work under terms of your choice that,
81 taken together, effectively do not restrict modification of the
82 portions of the Library contained in the Combined Work and reverse
83 engineering for debugging such modifications, if you also do each of
84 the following:
85
86 a) Give prominent notice with each copy of the Combined Work that
87 the Library is used in it and that the Library and its use are
88 covered by this License.
89
90 b) Accompany the Combined Work with a copy of the GNU GPL and this license
91 document.
92
93 c) For a Combined Work that displays copyright notices during
94 execution, include the copyright notice for the Library among
95 these notices, as well as a reference directing the user to the
96 copies of the GNU GPL and this license document.
97
98 d) Do one of the following:
99
100 0) Convey the Minimal Corresponding Source under the terms of this
101 License, and the Corresponding Application Code in a form
102 suitable for, and under terms that permit, the user to
103 recombine or relink the Application with a modified version of
104 the Linked Version to produce a modified Combined Work, in the
105 manner specified by section 6 of the GNU GPL for conveying
106 Corresponding Source.
107
108 1) Use a suitable shared library mechanism for linking with the
109 Library. A suitable mechanism is one that (a) uses at run time
110 a copy of the Library already present on the user's computer
111 system, and (b) will operate properly with a modified version
112 of the Library that is interface-compatible with the Linked
113 Version.
114
115 e) Provide Installation Information, but only if you would otherwise
116 be required to provide such information under section 6 of the
117 GNU GPL, and only to the extent that such information is
118 necessary to install and execute a modified version of the
119 Combined Work produced by recombining or relinking the
120 Application with a modified version of the Linked Version. (If
121 you use option 4d0, the Installation Information must accompany
122 the Minimal Corresponding Source and Corresponding Application
123 Code. If you use option 4d1, you must provide the Installation
124 Information in the manner specified by section 6 of the GNU GPL
125 for conveying Corresponding Source.)
126
127 5. Combined Libraries.
128
129 You may place library facilities that are a work based on the
130 Library side by side in a single library together with other library
131 facilities that are not Applications and are not covered by this
132 License, and convey such a combined library under terms of your
133 choice, if you do both of the following:
134
135 a) Accompany the combined library with a copy of the same work based
136 on the Library, uncombined with any other library facilities,
137 conveyed under the terms of this License.
138
139 b) Give prominent notice with the combined library that part of it
140 is a work based on the Library, and explaining where to find the
141 accompanying uncombined form of the same work.
142
143 6. Revised Versions of the GNU Lesser General Public License.
144
145 The Free Software Foundation may publish revised and/or new versions
146 of the GNU Lesser General Public License from time to time. Such new
147 versions will be similar in spirit to the present version, but may
148 differ in detail to address new problems or concerns.
149
150 Each version is given a distinguishing version number. If the
151 Library as you received it specifies that a certain numbered version
152 of the GNU Lesser General Public License "or any later version"
153 applies to it, you have the option of following the terms and
154 conditions either of that published version or of any later version
155 published by the Free Software Foundation. If the Library as you
156 received it does not specify a version number of the GNU Lesser
157 General Public License, you may choose any version of the GNU Lesser
158 General Public License ever published by the Free Software Foundation.
159
160 If the Library as you received it specifies that a proxy can decide
161 whether future versions of the GNU Lesser General Public License shall
162 apply, that proxy's public statement of acceptance of any version is
163 permanent authorization for you to choose that version for the
164 Library.
+0
-58
osmosis-osm-binary/ReleaseNotes.txt less more
0 ----------------------------------------
1 Release notes for 1.3.3 -- 2014-03-15
2 ----------------------------------------
3
4 Fixed ant build file.
5
6 ----------------------------------------
7 Release notes for 1.3.2 -- 2014-03-12
8 ----------------------------------------
9
10 Small bugfixes and build enhancements.
11 Improved Debian build in coordination with Debian maintainers.
12
13
14 ----------------------------------------
15 Release notes for 1.3.1 -- 2013-12-11
16 ----------------------------------------
17
18 Several building fixes and enhancements.
19
20
21 ----------------------------------------
22 Release notes for 1.3.0 -- 2012-12-04
23 ----------------------------------------
24
25 Add osmosis replication fields into the header.
26 -- Changes from Frederick Ramm <frederik@remote.org>
27
28
29 ----------------------------------------
30 Release notes for 1.2.1 -- 2011-10-29
31 ----------------------------------------
32
33 --------------------------------------
34 Release notes for 1.2.0 -- NOT RELEASED
35 --------------------------------------
36
37 * Bad tag, so not releasable.
38
39
40 * Switched to the lite (non-introspective) version of protocol buffers
41 for a smaller library.
42 * Includes support for "visible" flag on OSM objects. This allows PBF to
43 handle OSM history files.
44 * Namespace and include conventions changes for the C++ library. Everything
45 is in the OSMPBF namespace. You now do:
46 #include <osmpbf/osmpbf.h>
47 * Added stuff needed to build Debian/Ubuntu libosmpbf-dev package containing
48 the C++ library.
49 * Added osmpbf-outline tool that shows internals of a PBF file for debugging.
50 * Added magic file that can recognize OSM PBF files.
51
52 -- Changes from Jochen Topf <jochen@topf.org>
53 Peter <github@mazdermind.de>
54
55 * Added a pom.xml
56
57 -- Changes from Zsombor Welker <flaktack@welker.hu>
+0
-29
osmosis-osm-binary/build.gradle less more
0 dependencies {
1 compile group: 'com.google.protobuf', name: 'protobuf-java', version: dependencyVersionProtobuf
2 }
3
4 // Disable checkstyle because this is external code.
5 checkstyleMain.enabled = false
6
7 sourceSets {
8 main {
9 // Create a separate source directory to contain protobuf generated classes.
10 java.srcDirs 'gen-src/main/java'
11 }
12 }
13
14 // Configure the maven plugin to upload artefacts to the Sonatype repository.
15 uploadArchives {
16 repositories {
17 mavenDeployer {
18 pom.project {
19 licenses {
20 license {
21 name 'LGPL 3'
22 url 'http://www.gnu.org/licenses/lgpl-3.0.html'
23 }
24 }
25 }
26 }
27 }
28 }
+0
-1980
osmosis-osm-binary/gen-src/main/java/org/openstreetmap/osmosis/osmbinary/Fileformat.java less more
0 // Generated by the protocol buffer compiler. DO NOT EDIT!
1 // source: src/main/protobuf/fileformat.proto
2
3 package org.openstreetmap.osmosis.osmbinary;
4
5 public final class Fileformat {
6 private Fileformat() {}
7 public static void registerAllExtensions(
8 com.google.protobuf.ExtensionRegistryLite registry) {
9 }
10
11 public static void registerAllExtensions(
12 com.google.protobuf.ExtensionRegistry registry) {
13 registerAllExtensions(
14 (com.google.protobuf.ExtensionRegistryLite) registry);
15 }
16 public interface BlobOrBuilder extends
17 // @@protoc_insertion_point(interface_extends:OSMPBF.Blob)
18 com.google.protobuf.MessageOrBuilder {
19
20 /**
21 * <pre>
22 * No compression
23 * </pre>
24 *
25 * <code>optional bytes raw = 1;</code>
26 * @return Whether the raw field is set.
27 */
28 boolean hasRaw();
29 /**
30 * <pre>
31 * No compression
32 * </pre>
33 *
34 * <code>optional bytes raw = 1;</code>
35 * @return The raw.
36 */
37 com.google.protobuf.ByteString getRaw();
38
39 /**
40 * <pre>
41 * When compressed, the uncompressed size
42 * </pre>
43 *
44 * <code>optional int32 raw_size = 2;</code>
45 * @return Whether the rawSize field is set.
46 */
47 boolean hasRawSize();
48 /**
49 * <pre>
50 * When compressed, the uncompressed size
51 * </pre>
52 *
53 * <code>optional int32 raw_size = 2;</code>
54 * @return The rawSize.
55 */
56 int getRawSize();
57
58 /**
59 * <pre>
60 * Possible compressed versions of the data.
61 * </pre>
62 *
63 * <code>optional bytes zlib_data = 3;</code>
64 * @return Whether the zlibData field is set.
65 */
66 boolean hasZlibData();
67 /**
68 * <pre>
69 * Possible compressed versions of the data.
70 * </pre>
71 *
72 * <code>optional bytes zlib_data = 3;</code>
73 * @return The zlibData.
74 */
75 com.google.protobuf.ByteString getZlibData();
76
77 /**
78 * <pre>
79 * PROPOSED feature for LZMA compressed data. SUPPORT IS NOT REQUIRED.
80 * </pre>
81 *
82 * <code>optional bytes lzma_data = 4;</code>
83 * @return Whether the lzmaData field is set.
84 */
85 boolean hasLzmaData();
86 /**
87 * <pre>
88 * PROPOSED feature for LZMA compressed data. SUPPORT IS NOT REQUIRED.
89 * </pre>
90 *
91 * <code>optional bytes lzma_data = 4;</code>
92 * @return The lzmaData.
93 */
94 com.google.protobuf.ByteString getLzmaData();
95
96 /**
97 * <pre>
98 * Formerly used for bzip2 compressed data. Depreciated in 2010.
99 * </pre>
100 *
101 * <code>optional bytes OBSOLETE_bzip2_data = 5 [deprecated = true];</code>
102 * @return Whether the oBSOLETEBzip2Data field is set.
103 */
104 @java.lang.Deprecated boolean hasOBSOLETEBzip2Data();
105 /**
106 * <pre>
107 * Formerly used for bzip2 compressed data. Depreciated in 2010.
108 * </pre>
109 *
110 * <code>optional bytes OBSOLETE_bzip2_data = 5 [deprecated = true];</code>
111 * @return The oBSOLETEBzip2Data.
112 */
113 @java.lang.Deprecated com.google.protobuf.ByteString getOBSOLETEBzip2Data();
114 }
115 /**
116 * Protobuf type {@code OSMPBF.Blob}
117 */
118 public static final class Blob extends
119 com.google.protobuf.GeneratedMessageV3 implements
120 // @@protoc_insertion_point(message_implements:OSMPBF.Blob)
121 BlobOrBuilder {
122 private static final long serialVersionUID = 0L;
123 // Use Blob.newBuilder() to construct.
124 private Blob(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
125 super(builder);
126 }
127 private Blob() {
128 raw_ = com.google.protobuf.ByteString.EMPTY;
129 zlibData_ = com.google.protobuf.ByteString.EMPTY;
130 lzmaData_ = com.google.protobuf.ByteString.EMPTY;
131 oBSOLETEBzip2Data_ = com.google.protobuf.ByteString.EMPTY;
132 }
133
134 @java.lang.Override
135 @SuppressWarnings({"unused"})
136 protected java.lang.Object newInstance(
137 UnusedPrivateParameter unused) {
138 return new Blob();
139 }
140
141 @java.lang.Override
142 public final com.google.protobuf.UnknownFieldSet
143 getUnknownFields() {
144 return this.unknownFields;
145 }
146 private Blob(
147 com.google.protobuf.CodedInputStream input,
148 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
149 throws com.google.protobuf.InvalidProtocolBufferException {
150 this();
151 if (extensionRegistry == null) {
152 throw new java.lang.NullPointerException();
153 }
154 int mutable_bitField0_ = 0;
155 com.google.protobuf.UnknownFieldSet.Builder unknownFields =
156 com.google.protobuf.UnknownFieldSet.newBuilder();
157 try {
158 boolean done = false;
159 while (!done) {
160 int tag = input.readTag();
161 switch (tag) {
162 case 0:
163 done = true;
164 break;
165 case 10: {
166 bitField0_ |= 0x00000001;
167 raw_ = input.readBytes();
168 break;
169 }
170 case 16: {
171 bitField0_ |= 0x00000002;
172 rawSize_ = input.readInt32();
173 break;
174 }
175 case 26: {
176 bitField0_ |= 0x00000004;
177 zlibData_ = input.readBytes();
178 break;
179 }
180 case 34: {
181 bitField0_ |= 0x00000008;
182 lzmaData_ = input.readBytes();
183 break;
184 }
185 case 42: {
186 bitField0_ |= 0x00000010;
187 oBSOLETEBzip2Data_ = input.readBytes();
188 break;
189 }
190 default: {
191 if (!parseUnknownField(
192 input, unknownFields, extensionRegistry, tag)) {
193 done = true;
194 }
195 break;
196 }
197 }
198 }
199 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
200 throw e.setUnfinishedMessage(this);
201 } catch (java.io.IOException e) {
202 throw new com.google.protobuf.InvalidProtocolBufferException(
203 e).setUnfinishedMessage(this);
204 } finally {
205 this.unknownFields = unknownFields.build();
206 makeExtensionsImmutable();
207 }
208 }
209 public static final com.google.protobuf.Descriptors.Descriptor
210 getDescriptor() {
211 return org.openstreetmap.osmosis.osmbinary.Fileformat.internal_static_OSMPBF_Blob_descriptor;
212 }
213
214 @java.lang.Override
215 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
216 internalGetFieldAccessorTable() {
217 return org.openstreetmap.osmosis.osmbinary.Fileformat.internal_static_OSMPBF_Blob_fieldAccessorTable
218 .ensureFieldAccessorsInitialized(
219 org.openstreetmap.osmosis.osmbinary.Fileformat.Blob.class, org.openstreetmap.osmosis.osmbinary.Fileformat.Blob.Builder.class);
220 }
221
222 private int bitField0_;
223 public static final int RAW_FIELD_NUMBER = 1;
224 private com.google.protobuf.ByteString raw_;
225 /**
226 * <pre>
227 * No compression
228 * </pre>
229 *
230 * <code>optional bytes raw = 1;</code>
231 * @return Whether the raw field is set.
232 */
233 @java.lang.Override
234 public boolean hasRaw() {
235 return ((bitField0_ & 0x00000001) != 0);
236 }
237 /**
238 * <pre>
239 * No compression
240 * </pre>
241 *
242 * <code>optional bytes raw = 1;</code>
243 * @return The raw.
244 */
245 @java.lang.Override
246 public com.google.protobuf.ByteString getRaw() {
247 return raw_;
248 }
249
250 public static final int RAW_SIZE_FIELD_NUMBER = 2;
251 private int rawSize_;
252 /**
253 * <pre>
254 * When compressed, the uncompressed size
255 * </pre>
256 *
257 * <code>optional int32 raw_size = 2;</code>
258 * @return Whether the rawSize field is set.
259 */
260 @java.lang.Override
261 public boolean hasRawSize() {
262 return ((bitField0_ & 0x00000002) != 0);
263 }
264 /**
265 * <pre>
266 * When compressed, the uncompressed size
267 * </pre>
268 *
269 * <code>optional int32 raw_size = 2;</code>
270 * @return The rawSize.
271 */
272 @java.lang.Override
273 public int getRawSize() {
274 return rawSize_;
275 }
276
277 public static final int ZLIB_DATA_FIELD_NUMBER = 3;
278 private com.google.protobuf.ByteString zlibData_;
279 /**
280 * <pre>
281 * Possible compressed versions of the data.
282 * </pre>
283 *
284 * <code>optional bytes zlib_data = 3;</code>
285 * @return Whether the zlibData field is set.
286 */
287 @java.lang.Override
288 public boolean hasZlibData() {
289 return ((bitField0_ & 0x00000004) != 0);
290 }
291 /**
292 * <pre>
293 * Possible compressed versions of the data.
294 * </pre>
295 *
296 * <code>optional bytes zlib_data = 3;</code>
297 * @return The zlibData.
298 */
299 @java.lang.Override
300 public com.google.protobuf.ByteString getZlibData() {
301 return zlibData_;
302 }
303
304 public static final int LZMA_DATA_FIELD_NUMBER = 4;
305 private com.google.protobuf.ByteString lzmaData_;
306 /**
307 * <pre>
308 * PROPOSED feature for LZMA compressed data. SUPPORT IS NOT REQUIRED.
309 * </pre>
310 *
311 * <code>optional bytes lzma_data = 4;</code>
312 * @return Whether the lzmaData field is set.
313 */
314 @java.lang.Override
315 public boolean hasLzmaData() {
316 return ((bitField0_ & 0x00000008) != 0);
317 }
318 /**
319 * <pre>
320 * PROPOSED feature for LZMA compressed data. SUPPORT IS NOT REQUIRED.
321 * </pre>
322 *
323 * <code>optional bytes lzma_data = 4;</code>
324 * @return The lzmaData.
325 */
326 @java.lang.Override
327 public com.google.protobuf.ByteString getLzmaData() {
328 return lzmaData_;
329 }
330
331 public static final int OBSOLETE_BZIP2_DATA_FIELD_NUMBER = 5;
332 private com.google.protobuf.ByteString oBSOLETEBzip2Data_;
333 /**
334 * <pre>
335 * Formerly used for bzip2 compressed data. Depreciated in 2010.
336 * </pre>
337 *
338 * <code>optional bytes OBSOLETE_bzip2_data = 5 [deprecated = true];</code>
339 * @return Whether the oBSOLETEBzip2Data field is set.
340 */
341 @java.lang.Override
342 @java.lang.Deprecated public boolean hasOBSOLETEBzip2Data() {
343 return ((bitField0_ & 0x00000010) != 0);
344 }
345 /**
346 * <pre>
347 * Formerly used for bzip2 compressed data. Depreciated in 2010.
348 * </pre>
349 *
350 * <code>optional bytes OBSOLETE_bzip2_data = 5 [deprecated = true];</code>
351 * @return The oBSOLETEBzip2Data.
352 */
353 @java.lang.Override
354 @java.lang.Deprecated public com.google.protobuf.ByteString getOBSOLETEBzip2Data() {
355 return oBSOLETEBzip2Data_;
356 }
357
358 private byte memoizedIsInitialized = -1;
359 @java.lang.Override
360 public final boolean isInitialized() {
361 byte isInitialized = memoizedIsInitialized;
362 if (isInitialized == 1) return true;
363 if (isInitialized == 0) return false;
364
365 memoizedIsInitialized = 1;
366 return true;
367 }
368
369 @java.lang.Override
370 public void writeTo(com.google.protobuf.CodedOutputStream output)
371 throws java.io.IOException {
372 if (((bitField0_ & 0x00000001) != 0)) {
373 output.writeBytes(1, raw_);
374 }
375 if (((bitField0_ & 0x00000002) != 0)) {
376 output.writeInt32(2, rawSize_);
377 }
378 if (((bitField0_ & 0x00000004) != 0)) {
379 output.writeBytes(3, zlibData_);
380 }
381 if (((bitField0_ & 0x00000008) != 0)) {
382 output.writeBytes(4, lzmaData_);
383 }
384 if (((bitField0_ & 0x00000010) != 0)) {
385 output.writeBytes(5, oBSOLETEBzip2Data_);
386 }
387 unknownFields.writeTo(output);
388 }
389
390 @java.lang.Override
391 public int getSerializedSize() {
392 int size = memoizedSize;
393 if (size != -1) return size;
394
395 size = 0;
396 if (((bitField0_ & 0x00000001) != 0)) {
397 size += com.google.protobuf.CodedOutputStream
398 .computeBytesSize(1, raw_);
399 }
400 if (((bitField0_ & 0x00000002) != 0)) {
401 size += com.google.protobuf.CodedOutputStream
402 .computeInt32Size(2, rawSize_);
403 }
404 if (((bitField0_ & 0x00000004) != 0)) {
405 size += com.google.protobuf.CodedOutputStream
406 .computeBytesSize(3, zlibData_);
407 }
408 if (((bitField0_ & 0x00000008) != 0)) {
409 size += com.google.protobuf.CodedOutputStream
410 .computeBytesSize(4, lzmaData_);
411 }
412 if (((bitField0_ & 0x00000010) != 0)) {
413 size += com.google.protobuf.CodedOutputStream
414 .computeBytesSize(5, oBSOLETEBzip2Data_);
415 }
416 size += unknownFields.getSerializedSize();
417 memoizedSize = size;
418 return size;
419 }
420
421 @java.lang.Override
422 public boolean equals(final java.lang.Object obj) {
423 if (obj == this) {
424 return true;
425 }
426 if (!(obj instanceof org.openstreetmap.osmosis.osmbinary.Fileformat.Blob)) {
427 return super.equals(obj);
428 }
429 org.openstreetmap.osmosis.osmbinary.Fileformat.Blob other = (org.openstreetmap.osmosis.osmbinary.Fileformat.Blob) obj;
430
431 if (hasRaw() != other.hasRaw()) return false;
432 if (hasRaw()) {
433 if (!getRaw()
434 .equals(other.getRaw())) return false;
435 }
436 if (hasRawSize() != other.hasRawSize()) return false;
437 if (hasRawSize()) {
438 if (getRawSize()
439 != other.getRawSize()) return false;
440 }
441 if (hasZlibData() != other.hasZlibData()) return false;
442 if (hasZlibData()) {
443 if (!getZlibData()
444 .equals(other.getZlibData())) return false;
445 }
446 if (hasLzmaData() != other.hasLzmaData()) return false;
447 if (hasLzmaData()) {
448 if (!getLzmaData()
449 .equals(other.getLzmaData())) return false;
450 }
451 if (hasOBSOLETEBzip2Data() != other.hasOBSOLETEBzip2Data()) return false;
452 if (hasOBSOLETEBzip2Data()) {
453 if (!getOBSOLETEBzip2Data()
454 .equals(other.getOBSOLETEBzip2Data())) return false;
455 }
456 if (!unknownFields.equals(other.unknownFields)) return false;
457 return true;
458 }
459
460 @java.lang.Override
461 public int hashCode() {
462 if (memoizedHashCode != 0) {
463 return memoizedHashCode;
464 }
465 int hash = 41;
466 hash = (19 * hash) + getDescriptor().hashCode();
467 if (hasRaw()) {
468 hash = (37 * hash) + RAW_FIELD_NUMBER;
469 hash = (53 * hash) + getRaw().hashCode();
470 }
471 if (hasRawSize()) {
472 hash = (37 * hash) + RAW_SIZE_FIELD_NUMBER;
473 hash = (53 * hash) + getRawSize();
474 }
475 if (hasZlibData()) {
476 hash = (37 * hash) + ZLIB_DATA_FIELD_NUMBER;
477 hash = (53 * hash) + getZlibData().hashCode();
478 }
479 if (hasLzmaData()) {
480 hash = (37 * hash) + LZMA_DATA_FIELD_NUMBER;
481 hash = (53 * hash) + getLzmaData().hashCode();
482 }
483 if (hasOBSOLETEBzip2Data()) {
484 hash = (37 * hash) + OBSOLETE_BZIP2_DATA_FIELD_NUMBER;
485 hash = (53 * hash) + getOBSOLETEBzip2Data().hashCode();
486 }
487 hash = (29 * hash) + unknownFields.hashCode();
488 memoizedHashCode = hash;
489 return hash;
490 }
491
492 public static org.openstreetmap.osmosis.osmbinary.Fileformat.Blob parseFrom(
493 java.nio.ByteBuffer data)
494 throws com.google.protobuf.InvalidProtocolBufferException {
495 return PARSER.parseFrom(data);
496 }
497 public static org.openstreetmap.osmosis.osmbinary.Fileformat.Blob parseFrom(
498 java.nio.ByteBuffer data,
499 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
500 throws com.google.protobuf.InvalidProtocolBufferException {
501 return PARSER.parseFrom(data, extensionRegistry);
502 }
503 public static org.openstreetmap.osmosis.osmbinary.Fileformat.Blob parseFrom(
504 com.google.protobuf.ByteString data)
505 throws com.google.protobuf.InvalidProtocolBufferException {
506 return PARSER.parseFrom(data);
507 }
508 public static org.openstreetmap.osmosis.osmbinary.Fileformat.Blob parseFrom(
509 com.google.protobuf.ByteString data,
510 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
511 throws com.google.protobuf.InvalidProtocolBufferException {
512 return PARSER.parseFrom(data, extensionRegistry);
513 }
514 public static org.openstreetmap.osmosis.osmbinary.Fileformat.Blob parseFrom(byte[] data)
515 throws com.google.protobuf.InvalidProtocolBufferException {
516 return PARSER.parseFrom(data);
517 }
518 public static org.openstreetmap.osmosis.osmbinary.Fileformat.Blob parseFrom(
519 byte[] data,
520 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
521 throws com.google.protobuf.InvalidProtocolBufferException {
522 return PARSER.parseFrom(data, extensionRegistry);
523 }
524 public static org.openstreetmap.osmosis.osmbinary.Fileformat.Blob parseFrom(java.io.InputStream input)
525 throws java.io.IOException {
526 return com.google.protobuf.GeneratedMessageV3
527 .parseWithIOException(PARSER, input);
528 }
529 public static org.openstreetmap.osmosis.osmbinary.Fileformat.Blob parseFrom(
530 java.io.InputStream input,
531 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
532 throws java.io.IOException {
533 return com.google.protobuf.GeneratedMessageV3
534 .parseWithIOException(PARSER, input, extensionRegistry);
535 }
536 public static org.openstreetmap.osmosis.osmbinary.Fileformat.Blob parseDelimitedFrom(java.io.InputStream input)
537 throws java.io.IOException {
538 return com.google.protobuf.GeneratedMessageV3
539 .parseDelimitedWithIOException(PARSER, input);
540 }
541 public static org.openstreetmap.osmosis.osmbinary.Fileformat.Blob parseDelimitedFrom(
542 java.io.InputStream input,
543 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
544 throws java.io.IOException {
545 return com.google.protobuf.GeneratedMessageV3
546 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
547 }
548 public static org.openstreetmap.osmosis.osmbinary.Fileformat.Blob parseFrom(
549 com.google.protobuf.CodedInputStream input)
550 throws java.io.IOException {
551 return com.google.protobuf.GeneratedMessageV3
552 .parseWithIOException(PARSER, input);
553 }
554 public static org.openstreetmap.osmosis.osmbinary.Fileformat.Blob parseFrom(
555 com.google.protobuf.CodedInputStream input,
556 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
557 throws java.io.IOException {
558 return com.google.protobuf.GeneratedMessageV3
559 .parseWithIOException(PARSER, input, extensionRegistry);
560 }
561
562 @java.lang.Override
563 public Builder newBuilderForType() { return newBuilder(); }
564 public static Builder newBuilder() {
565 return DEFAULT_INSTANCE.toBuilder();
566 }
567 public static Builder newBuilder(org.openstreetmap.osmosis.osmbinary.Fileformat.Blob prototype) {
568 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
569 }
570 @java.lang.Override
571 public Builder toBuilder() {
572 return this == DEFAULT_INSTANCE
573 ? new Builder() : new Builder().mergeFrom(this);
574 }
575
576 @java.lang.Override
577 protected Builder newBuilderForType(
578 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
579 Builder builder = new Builder(parent);
580 return builder;
581 }
582 /**
583 * Protobuf type {@code OSMPBF.Blob}
584 */
585 public static final class Builder extends
586 com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
587 // @@protoc_insertion_point(builder_implements:OSMPBF.Blob)
588 org.openstreetmap.osmosis.osmbinary.Fileformat.BlobOrBuilder {
589 public static final com.google.protobuf.Descriptors.Descriptor
590 getDescriptor() {
591 return org.openstreetmap.osmosis.osmbinary.Fileformat.internal_static_OSMPBF_Blob_descriptor;
592 }
593
594 @java.lang.Override
595 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
596 internalGetFieldAccessorTable() {
597 return org.openstreetmap.osmosis.osmbinary.Fileformat.internal_static_OSMPBF_Blob_fieldAccessorTable
598 .ensureFieldAccessorsInitialized(
599 org.openstreetmap.osmosis.osmbinary.Fileformat.Blob.class, org.openstreetmap.osmosis.osmbinary.Fileformat.Blob.Builder.class);
600 }
601
602 // Construct using org.openstreetmap.osmosis.osmbinary.Fileformat.Blob.newBuilder()
603 private Builder() {
604 maybeForceBuilderInitialization();
605 }
606
607 private Builder(
608 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
609 super(parent);
610 maybeForceBuilderInitialization();
611 }
612 private void maybeForceBuilderInitialization() {
613 if (com.google.protobuf.GeneratedMessageV3
614 .alwaysUseFieldBuilders) {
615 }
616 }
617 @java.lang.Override
618 public Builder clear() {
619 super.clear();
620 raw_ = com.google.protobuf.ByteString.EMPTY;
621 bitField0_ = (bitField0_ & ~0x00000001);
622 rawSize_ = 0;
623 bitField0_ = (bitField0_ & ~0x00000002);
624 zlibData_ = com.google.protobuf.ByteString.EMPTY;
625 bitField0_ = (bitField0_ & ~0x00000004);
626 lzmaData_ = com.google.protobuf.ByteString.EMPTY;
627 bitField0_ = (bitField0_ & ~0x00000008);
628 oBSOLETEBzip2Data_ = com.google.protobuf.ByteString.EMPTY;
629 bitField0_ = (bitField0_ & ~0x00000010);
630 return this;
631 }
632
633 @java.lang.Override
634 public com.google.protobuf.Descriptors.Descriptor
635 getDescriptorForType() {
636 return org.openstreetmap.osmosis.osmbinary.Fileformat.internal_static_OSMPBF_Blob_descriptor;
637 }
638
639 @java.lang.Override
640 public org.openstreetmap.osmosis.osmbinary.Fileformat.Blob getDefaultInstanceForType() {
641 return org.openstreetmap.osmosis.osmbinary.Fileformat.Blob.getDefaultInstance();
642 }
643
644 @java.lang.Override
645 public org.openstreetmap.osmosis.osmbinary.Fileformat.Blob build() {
646 org.openstreetmap.osmosis.osmbinary.Fileformat.Blob result = buildPartial();
647 if (!result.isInitialized()) {
648 throw newUninitializedMessageException(result);
649 }
650 return result;
651 }
652
653 @java.lang.Override
654 public org.openstreetmap.osmosis.osmbinary.Fileformat.Blob buildPartial() {
655 org.openstreetmap.osmosis.osmbinary.Fileformat.Blob result = new org.openstreetmap.osmosis.osmbinary.Fileformat.Blob(this);
656 int from_bitField0_ = bitField0_;
657 int to_bitField0_ = 0;
658 if (((from_bitField0_ & 0x00000001) != 0)) {
659 to_bitField0_ |= 0x00000001;
660 }
661 result.raw_ = raw_;
662 if (((from_bitField0_ & 0x00000002) != 0)) {
663 result.rawSize_ = rawSize_;
664 to_bitField0_ |= 0x00000002;
665 }
666 if (((from_bitField0_ & 0x00000004) != 0)) {
667 to_bitField0_ |= 0x00000004;
668 }
669 result.zlibData_ = zlibData_;
670 if (((from_bitField0_ & 0x00000008) != 0)) {
671 to_bitField0_ |= 0x00000008;
672 }
673 result.lzmaData_ = lzmaData_;
674 if (((from_bitField0_ & 0x00000010) != 0)) {
675 to_bitField0_ |= 0x00000010;
676 }
677 result.oBSOLETEBzip2Data_ = oBSOLETEBzip2Data_;
678 result.bitField0_ = to_bitField0_;
679 onBuilt();
680 return result;
681 }
682
683 @java.lang.Override
684 public Builder clone() {
685 return super.clone();
686 }
687 @java.lang.Override
688 public Builder setField(
689 com.google.protobuf.Descriptors.FieldDescriptor field,
690 java.lang.Object value) {
691 return super.setField(field, value);
692 }
693 @java.lang.Override
694 public Builder clearField(
695 com.google.protobuf.Descriptors.FieldDescriptor field) {
696 return super.clearField(field);
697 }
698 @java.lang.Override
699 public Builder clearOneof(
700 com.google.protobuf.Descriptors.OneofDescriptor oneof) {
701 return super.clearOneof(oneof);
702 }
703 @java.lang.Override
704 public Builder setRepeatedField(
705 com.google.protobuf.Descriptors.FieldDescriptor field,
706 int index, java.lang.Object value) {
707 return super.setRepeatedField(field, index, value);
708 }
709 @java.lang.Override
710 public Builder addRepeatedField(
711 com.google.protobuf.Descriptors.FieldDescriptor field,
712 java.lang.Object value) {
713 return super.addRepeatedField(field, value);
714 }
715 @java.lang.Override
716 public Builder mergeFrom(com.google.protobuf.Message other) {
717 if (other instanceof org.openstreetmap.osmosis.osmbinary.Fileformat.Blob) {
718 return mergeFrom((org.openstreetmap.osmosis.osmbinary.Fileformat.Blob)other);
719 } else {
720 super.mergeFrom(other);
721 return this;
722 }
723 }
724
725 public Builder mergeFrom(org.openstreetmap.osmosis.osmbinary.Fileformat.Blob other) {
726 if (other == org.openstreetmap.osmosis.osmbinary.Fileformat.Blob.getDefaultInstance()) return this;
727 if (other.hasRaw()) {
728 setRaw(other.getRaw());
729 }
730 if (other.hasRawSize()) {
731 setRawSize(other.getRawSize());
732 }
733 if (other.hasZlibData()) {
734 setZlibData(other.getZlibData());
735 }
736 if (other.hasLzmaData()) {
737 setLzmaData(other.getLzmaData());
738 }
739 if (other.hasOBSOLETEBzip2Data()) {
740 setOBSOLETEBzip2Data(other.getOBSOLETEBzip2Data());
741 }
742 this.mergeUnknownFields(other.unknownFields);
743 onChanged();
744 return this;
745 }
746
747 @java.lang.Override
748 public final boolean isInitialized() {
749 return true;
750 }
751
752 @java.lang.Override
753 public Builder mergeFrom(
754 com.google.protobuf.CodedInputStream input,
755 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
756 throws java.io.IOException {
757 org.openstreetmap.osmosis.osmbinary.Fileformat.Blob parsedMessage = null;
758 try {
759 parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
760 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
761 parsedMessage = (org.openstreetmap.osmosis.osmbinary.Fileformat.Blob) e.getUnfinishedMessage();
762 throw e.unwrapIOException();
763 } finally {
764 if (parsedMessage != null) {
765 mergeFrom(parsedMessage);
766 }
767 }
768 return this;
769 }
770 private int bitField0_;
771
772 private com.google.protobuf.ByteString raw_ = com.google.protobuf.ByteString.EMPTY;
773 /**
774 * <pre>
775 * No compression
776 * </pre>
777 *
778 * <code>optional bytes raw = 1;</code>
779 * @return Whether the raw field is set.
780 */
781 @java.lang.Override
782 public boolean hasRaw() {
783 return ((bitField0_ & 0x00000001) != 0);
784 }
785 /**
786 * <pre>
787 * No compression
788 * </pre>
789 *
790 * <code>optional bytes raw = 1;</code>
791 * @return The raw.
792 */
793 @java.lang.Override
794 public com.google.protobuf.ByteString getRaw() {
795 return raw_;
796 }
797 /**
798 * <pre>
799 * No compression
800 * </pre>
801 *
802 * <code>optional bytes raw = 1;</code>
803 * @param value The raw to set.
804 * @return This builder for chaining.
805 */
806 public Builder setRaw(com.google.protobuf.ByteString value) {
807 if (value == null) {
808 throw new NullPointerException();
809 }
810 bitField0_ |= 0x00000001;
811 raw_ = value;
812 onChanged();
813 return this;
814 }
815 /**
816 * <pre>
817 * No compression
818 * </pre>
819 *
820 * <code>optional bytes raw = 1;</code>
821 * @return This builder for chaining.
822 */
823 public Builder clearRaw() {
824 bitField0_ = (bitField0_ & ~0x00000001);
825 raw_ = getDefaultInstance().getRaw();
826 onChanged();
827 return this;
828 }
829
830 private int rawSize_ ;
831 /**
832 * <pre>
833 * When compressed, the uncompressed size
834 * </pre>
835 *
836 * <code>optional int32 raw_size = 2;</code>
837 * @return Whether the rawSize field is set.
838 */
839 @java.lang.Override
840 public boolean hasRawSize() {
841 return ((bitField0_ & 0x00000002) != 0);
842 }
843 /**
844 * <pre>
845 * When compressed, the uncompressed size
846 * </pre>
847 *
848 * <code>optional int32 raw_size = 2;</code>
849 * @return The rawSize.
850 */
851 @java.lang.Override
852 public int getRawSize() {
853 return rawSize_;
854 }
855 /**
856 * <pre>
857 * When compressed, the uncompressed size
858 * </pre>
859 *
860 * <code>optional int32 raw_size = 2;</code>
861 * @param value The rawSize to set.
862 * @return This builder for chaining.
863 */
864 public Builder setRawSize(int value) {
865 bitField0_ |= 0x00000002;
866 rawSize_ = value;
867 onChanged();
868 return this;
869 }
870 /**
871 * <pre>
872 * When compressed, the uncompressed size
873 * </pre>
874 *
875 * <code>optional int32 raw_size = 2;</code>
876 * @return This builder for chaining.
877 */
878 public Builder clearRawSize() {
879 bitField0_ = (bitField0_ & ~0x00000002);
880 rawSize_ = 0;
881 onChanged();
882 return this;
883 }
884
885 private com.google.protobuf.ByteString zlibData_ = com.google.protobuf.ByteString.EMPTY;
886 /**
887 * <pre>
888 * Possible compressed versions of the data.
889 * </pre>
890 *
891 * <code>optional bytes zlib_data = 3;</code>
892 * @return Whether the zlibData field is set.
893 */
894 @java.lang.Override
895 public boolean hasZlibData() {
896 return ((bitField0_ & 0x00000004) != 0);
897 }
898 /**
899 * <pre>
900 * Possible compressed versions of the data.
901 * </pre>
902 *
903 * <code>optional bytes zlib_data = 3;</code>
904 * @return The zlibData.
905 */
906 @java.lang.Override
907 public com.google.protobuf.ByteString getZlibData() {
908 return zlibData_;
909 }
910 /**
911 * <pre>
912 * Possible compressed versions of the data.
913 * </pre>
914 *
915 * <code>optional bytes zlib_data = 3;</code>
916 * @param value The zlibData to set.
917 * @return This builder for chaining.
918 */
919 public Builder setZlibData(com.google.protobuf.ByteString value) {
920 if (value == null) {
921 throw new NullPointerException();
922 }
923 bitField0_ |= 0x00000004;
924 zlibData_ = value;
925 onChanged();
926 return this;
927 }
928 /**
929 * <pre>
930 * Possible compressed versions of the data.
931 * </pre>
932 *
933 * <code>optional bytes zlib_data = 3;</code>
934 * @return This builder for chaining.
935 */
936 public Builder clearZlibData() {
937 bitField0_ = (bitField0_ & ~0x00000004);
938 zlibData_ = getDefaultInstance().getZlibData();
939 onChanged();
940 return this;
941 }
942
943 private com.google.protobuf.ByteString lzmaData_ = com.google.protobuf.ByteString.EMPTY;
944 /**
945 * <pre>
946 * PROPOSED feature for LZMA compressed data. SUPPORT IS NOT REQUIRED.
947 * </pre>
948 *
949 * <code>optional bytes lzma_data = 4;</code>
950 * @return Whether the lzmaData field is set.
951 */
952 @java.lang.Override
953 public boolean hasLzmaData() {
954 return ((bitField0_ & 0x00000008) != 0);
955 }
956 /**
957 * <pre>
958 * PROPOSED feature for LZMA compressed data. SUPPORT IS NOT REQUIRED.
959 * </pre>
960 *
961 * <code>optional bytes lzma_data = 4;</code>
962 * @return The lzmaData.
963 */
964 @java.lang.Override
965 public com.google.protobuf.ByteString getLzmaData() {
966 return lzmaData_;
967 }
968 /**
969 * <pre>
970 * PROPOSED feature for LZMA compressed data. SUPPORT IS NOT REQUIRED.
971 * </pre>
972 *
973 * <code>optional bytes lzma_data = 4;</code>
974 * @param value The lzmaData to set.
975 * @return This builder for chaining.
976 */
977 public Builder setLzmaData(com.google.protobuf.ByteString value) {
978 if (value == null) {
979 throw new NullPointerException();
980 }
981 bitField0_ |= 0x00000008;
982 lzmaData_ = value;
983 onChanged();
984 return this;
985 }
986 /**
987 * <pre>
988 * PROPOSED feature for LZMA compressed data. SUPPORT IS NOT REQUIRED.
989 * </pre>
990 *
991 * <code>optional bytes lzma_data = 4;</code>
992 * @return This builder for chaining.
993 */
994 public Builder clearLzmaData() {
995 bitField0_ = (bitField0_ & ~0x00000008);
996 lzmaData_ = getDefaultInstance().getLzmaData();
997 onChanged();
998 return this;
999 }
1000
1001 private com.google.protobuf.ByteString oBSOLETEBzip2Data_ = com.google.protobuf.ByteString.EMPTY;
1002 /**
1003 * <pre>
1004 * Formerly used for bzip2 compressed data. Depreciated in 2010.
1005 * </pre>
1006 *
1007 * <code>optional bytes OBSOLETE_bzip2_data = 5 [deprecated = true];</code>
1008 * @return Whether the oBSOLETEBzip2Data field is set.
1009 */
1010 @java.lang.Override
1011 @java.lang.Deprecated public boolean hasOBSOLETEBzip2Data() {
1012 return ((bitField0_ & 0x00000010) != 0);
1013 }
1014 /**
1015 * <pre>
1016 * Formerly used for bzip2 compressed data. Depreciated in 2010.
1017 * </pre>
1018 *
1019 * <code>optional bytes OBSOLETE_bzip2_data = 5 [deprecated = true];</code>
1020 * @return The oBSOLETEBzip2Data.
1021 */
1022 @java.lang.Override
1023 @java.lang.Deprecated public com.google.protobuf.ByteString getOBSOLETEBzip2Data() {
1024 return oBSOLETEBzip2Data_;
1025 }
1026 /**
1027 * <pre>
1028 * Formerly used for bzip2 compressed data. Depreciated in 2010.
1029 * </pre>
1030 *
1031 * <code>optional bytes OBSOLETE_bzip2_data = 5 [deprecated = true];</code>
1032 * @param value The oBSOLETEBzip2Data to set.
1033 * @return This builder for chaining.
1034 */
1035 @java.lang.Deprecated public Builder setOBSOLETEBzip2Data(com.google.protobuf.ByteString value) {
1036 if (value == null) {
1037 throw new NullPointerException();
1038 }
1039 bitField0_ |= 0x00000010;
1040 oBSOLETEBzip2Data_ = value;
1041 onChanged();
1042 return this;
1043 }
1044 /**
1045 * <pre>
1046 * Formerly used for bzip2 compressed data. Depreciated in 2010.
1047 * </pre>
1048 *
1049 * <code>optional bytes OBSOLETE_bzip2_data = 5 [deprecated = true];</code>
1050 * @return This builder for chaining.
1051 */
1052 @java.lang.Deprecated public Builder clearOBSOLETEBzip2Data() {
1053 bitField0_ = (bitField0_ & ~0x00000010);
1054 oBSOLETEBzip2Data_ = getDefaultInstance().getOBSOLETEBzip2Data();
1055 onChanged();
1056 return this;
1057 }
1058 @java.lang.Override
1059 public final Builder setUnknownFields(
1060 final com.google.protobuf.UnknownFieldSet unknownFields) {
1061 return super.setUnknownFields(unknownFields);
1062 }
1063
1064 @java.lang.Override
1065 public final Builder mergeUnknownFields(
1066 final com.google.protobuf.UnknownFieldSet unknownFields) {
1067 return super.mergeUnknownFields(unknownFields);
1068 }
1069
1070
1071 // @@protoc_insertion_point(builder_scope:OSMPBF.Blob)
1072 }
1073
1074 // @@protoc_insertion_point(class_scope:OSMPBF.Blob)
1075 private static final org.openstreetmap.osmosis.osmbinary.Fileformat.Blob DEFAULT_INSTANCE;
1076 static {
1077 DEFAULT_INSTANCE = new org.openstreetmap.osmosis.osmbinary.Fileformat.Blob();
1078 }
1079
1080 public static org.openstreetmap.osmosis.osmbinary.Fileformat.Blob getDefaultInstance() {
1081 return DEFAULT_INSTANCE;
1082 }
1083
1084 @java.lang.Deprecated public static final com.google.protobuf.Parser<Blob>
1085 PARSER = new com.google.protobuf.AbstractParser<Blob>() {
1086 @java.lang.Override
1087 public Blob parsePartialFrom(
1088 com.google.protobuf.CodedInputStream input,
1089 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1090 throws com.google.protobuf.InvalidProtocolBufferException {
1091 return new Blob(input, extensionRegistry);
1092 }
1093 };
1094
1095 public static com.google.protobuf.Parser<Blob> parser() {
1096 return PARSER;
1097 }
1098
1099 @java.lang.Override
1100 public com.google.protobuf.Parser<Blob> getParserForType() {
1101 return PARSER;
1102 }
1103
1104 @java.lang.Override
1105 public org.openstreetmap.osmosis.osmbinary.Fileformat.Blob getDefaultInstanceForType() {
1106 return DEFAULT_INSTANCE;
1107 }
1108
1109 }
1110
1111 public interface BlobHeaderOrBuilder extends
1112 // @@protoc_insertion_point(interface_extends:OSMPBF.BlobHeader)
1113 com.google.protobuf.MessageOrBuilder {
1114
1115 /**
1116 * <code>required string type = 1;</code>
1117 * @return Whether the type field is set.
1118 */
1119 boolean hasType();
1120 /**
1121 * <code>required string type = 1;</code>
1122 * @return The type.
1123 */
1124 java.lang.String getType();
1125 /**
1126 * <code>required string type = 1;</code>
1127 * @return The bytes for type.
1128 */
1129 com.google.protobuf.ByteString
1130 getTypeBytes();
1131
1132 /**
1133 * <code>optional bytes indexdata = 2;</code>
1134 * @return Whether the indexdata field is set.
1135 */
1136 boolean hasIndexdata();
1137 /**
1138 * <code>optional bytes indexdata = 2;</code>
1139 * @return The indexdata.
1140 */
1141 com.google.protobuf.ByteString getIndexdata();
1142
1143 /**
1144 * <code>required int32 datasize = 3;</code>
1145 * @return Whether the datasize field is set.
1146 */
1147 boolean hasDatasize();
1148 /**
1149 * <code>required int32 datasize = 3;</code>
1150 * @return The datasize.
1151 */
1152 int getDatasize();
1153 }
1154 /**
1155 * Protobuf type {@code OSMPBF.BlobHeader}
1156 */
1157 public static final class BlobHeader extends
1158 com.google.protobuf.GeneratedMessageV3 implements
1159 // @@protoc_insertion_point(message_implements:OSMPBF.BlobHeader)
1160 BlobHeaderOrBuilder {
1161 private static final long serialVersionUID = 0L;
1162 // Use BlobHeader.newBuilder() to construct.
1163 private BlobHeader(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
1164 super(builder);
1165 }
1166 private BlobHeader() {
1167 type_ = "";
1168 indexdata_ = com.google.protobuf.ByteString.EMPTY;
1169 }
1170
1171 @java.lang.Override
1172 @SuppressWarnings({"unused"})
1173 protected java.lang.Object newInstance(
1174 UnusedPrivateParameter unused) {
1175 return new BlobHeader();
1176 }
1177
1178 @java.lang.Override
1179 public final com.google.protobuf.UnknownFieldSet
1180 getUnknownFields() {
1181 return this.unknownFields;
1182 }
1183 private BlobHeader(
1184 com.google.protobuf.CodedInputStream input,
1185 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1186 throws com.google.protobuf.InvalidProtocolBufferException {
1187 this();
1188 if (extensionRegistry == null) {
1189 throw new java.lang.NullPointerException();
1190 }
1191 int mutable_bitField0_ = 0;
1192 com.google.protobuf.UnknownFieldSet.Builder unknownFields =
1193 com.google.protobuf.UnknownFieldSet.newBuilder();
1194 try {
1195 boolean done = false;
1196 while (!done) {
1197 int tag = input.readTag();
1198 switch (tag) {
1199 case 0:
1200 done = true;
1201 break;
1202 case 10: {
1203 com.google.protobuf.ByteString bs = input.readBytes();
1204 bitField0_ |= 0x00000001;
1205 type_ = bs;
1206 break;
1207 }
1208 case 18: {
1209 bitField0_ |= 0x00000002;
1210 indexdata_ = input.readBytes();
1211 break;
1212 }
1213 case 24: {
1214 bitField0_ |= 0x00000004;
1215 datasize_ = input.readInt32();
1216 break;
1217 }
1218 default: {
1219 if (!parseUnknownField(
1220 input, unknownFields, extensionRegistry, tag)) {
1221 done = true;
1222 }
1223 break;
1224 }
1225 }
1226 }
1227 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1228 throw e.setUnfinishedMessage(this);
1229 } catch (java.io.IOException e) {
1230 throw new com.google.protobuf.InvalidProtocolBufferException(
1231 e).setUnfinishedMessage(this);
1232 } finally {
1233 this.unknownFields = unknownFields.build();
1234 makeExtensionsImmutable();
1235 }
1236 }
1237 public static final com.google.protobuf.Descriptors.Descriptor
1238 getDescriptor() {
1239 return org.openstreetmap.osmosis.osmbinary.Fileformat.internal_static_OSMPBF_BlobHeader_descriptor;
1240 }
1241
1242 @java.lang.Override
1243 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
1244 internalGetFieldAccessorTable() {
1245 return org.openstreetmap.osmosis.osmbinary.Fileformat.internal_static_OSMPBF_BlobHeader_fieldAccessorTable
1246 .ensureFieldAccessorsInitialized(
1247 org.openstreetmap.osmosis.osmbinary.Fileformat.BlobHeader.class, org.openstreetmap.osmosis.osmbinary.Fileformat.BlobHeader.Builder.class);
1248 }
1249
1250 private int bitField0_;
1251 public static final int TYPE_FIELD_NUMBER = 1;
1252 private volatile java.lang.Object type_;
1253 /**
1254 * <code>required string type = 1;</code>
1255 * @return Whether the type field is set.
1256 */
1257 @java.lang.Override
1258 public boolean hasType() {
1259 return ((bitField0_ & 0x00000001) != 0);
1260 }
1261 /**
1262 * <code>required string type = 1;</code>
1263 * @return The type.
1264 */
1265 @java.lang.Override
1266 public java.lang.String getType() {
1267 java.lang.Object ref = type_;
1268 if (ref instanceof java.lang.String) {
1269 return (java.lang.String) ref;
1270 } else {
1271 com.google.protobuf.ByteString bs =
1272 (com.google.protobuf.ByteString) ref;
1273 java.lang.String s = bs.toStringUtf8();
1274 if (bs.isValidUtf8()) {
1275 type_ = s;
1276 }
1277 return s;
1278 }
1279 }
1280 /**
1281 * <code>required string type = 1;</code>
1282 * @return The bytes for type.
1283 */
1284 @java.lang.Override
1285 public com.google.protobuf.ByteString
1286 getTypeBytes() {
1287 java.lang.Object ref = type_;
1288 if (ref instanceof java.lang.String) {
1289 com.google.protobuf.ByteString b =
1290 com.google.protobuf.ByteString.copyFromUtf8(
1291 (java.lang.String) ref);
1292 type_ = b;
1293 return b;
1294 } else {
1295 return (com.google.protobuf.ByteString) ref;
1296 }
1297 }
1298
1299 public static final int INDEXDATA_FIELD_NUMBER = 2;
1300 private com.google.protobuf.ByteString indexdata_;
1301 /**
1302 * <code>optional bytes indexdata = 2;</code>
1303 * @return Whether the indexdata field is set.
1304 */
1305 @java.lang.Override
1306 public boolean hasIndexdata() {
1307 return ((bitField0_ & 0x00000002) != 0);
1308 }
1309 /**
1310 * <code>optional bytes indexdata = 2;</code>
1311 * @return The indexdata.
1312 */
1313 @java.lang.Override
1314 public com.google.protobuf.ByteString getIndexdata() {
1315 return indexdata_;
1316 }
1317
1318 public static final int DATASIZE_FIELD_NUMBER = 3;
1319 private int datasize_;
1320 /**
1321 * <code>required int32 datasize = 3;</code>
1322 * @return Whether the datasize field is set.
1323 */
1324 @java.lang.Override
1325 public boolean hasDatasize() {
1326 return ((bitField0_ & 0x00000004) != 0);
1327 }
1328 /**
1329 * <code>required int32 datasize = 3;</code>
1330 * @return The datasize.
1331 */
1332 @java.lang.Override
1333 public int getDatasize() {
1334 return datasize_;
1335 }
1336
1337 private byte memoizedIsInitialized = -1;
1338 @java.lang.Override
1339 public final boolean isInitialized() {
1340 byte isInitialized = memoizedIsInitialized;
1341 if (isInitialized == 1) return true;
1342 if (isInitialized == 0) return false;
1343
1344 if (!hasType()) {
1345 memoizedIsInitialized = 0;
1346 return false;
1347 }
1348 if (!hasDatasize()) {
1349 memoizedIsInitialized = 0;
1350 return false;
1351 }
1352 memoizedIsInitialized = 1;
1353 return true;
1354 }
1355
1356 @java.lang.Override
1357 public void writeTo(com.google.protobuf.CodedOutputStream output)
1358 throws java.io.IOException {
1359 if (((bitField0_ & 0x00000001) != 0)) {
1360 com.google.protobuf.GeneratedMessageV3.writeString(output, 1, type_);
1361 }
1362 if (((bitField0_ & 0x00000002) != 0)) {
1363 output.writeBytes(2, indexdata_);
1364 }
1365 if (((bitField0_ & 0x00000004) != 0)) {
1366 output.writeInt32(3, datasize_);
1367 }
1368 unknownFields.writeTo(output);
1369 }
1370
1371 @java.lang.Override
1372 public int getSerializedSize() {
1373 int size = memoizedSize;
1374 if (size != -1) return size;
1375
1376 size = 0;
1377 if (((bitField0_ & 0x00000001) != 0)) {
1378 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, type_);
1379 }
1380 if (((bitField0_ & 0x00000002) != 0)) {
1381 size += com.google.protobuf.CodedOutputStream
1382 .computeBytesSize(2, indexdata_);
1383 }
1384 if (((bitField0_ & 0x00000004) != 0)) {
1385 size += com.google.protobuf.CodedOutputStream
1386 .computeInt32Size(3, datasize_);
1387 }
1388 size += unknownFields.getSerializedSize();
1389 memoizedSize = size;
1390 return size;
1391 }
1392
1393 @java.lang.Override
1394 public boolean equals(final java.lang.Object obj) {
1395 if (obj == this) {
1396 return true;
1397 }
1398 if (!(obj instanceof org.openstreetmap.osmosis.osmbinary.Fileformat.BlobHeader)) {
1399 return super.equals(obj);
1400 }
1401 org.openstreetmap.osmosis.osmbinary.Fileformat.BlobHeader other = (org.openstreetmap.osmosis.osmbinary.Fileformat.BlobHeader) obj;
1402
1403 if (hasType() != other.hasType()) return false;
1404 if (hasType()) {
1405 if (!getType()
1406 .equals(other.getType())) return false;
1407 }
1408 if (hasIndexdata() != other.hasIndexdata()) return false;
1409 if (hasIndexdata()) {
1410 if (!getIndexdata()
1411 .equals(other.getIndexdata())) return false;
1412 }
1413 if (hasDatasize() != other.hasDatasize()) return false;
1414 if (hasDatasize()) {
1415 if (getDatasize()
1416 != other.getDatasize()) return false;
1417 }
1418 if (!unknownFields.equals(other.unknownFields)) return false;
1419 return true;
1420 }
1421
1422 @java.lang.Override
1423 public int hashCode() {
1424 if (memoizedHashCode != 0) {
1425 return memoizedHashCode;
1426 }
1427 int hash = 41;
1428 hash = (19 * hash) + getDescriptor().hashCode();
1429 if (hasType()) {
1430 hash = (37 * hash) + TYPE_FIELD_NUMBER;
1431 hash = (53 * hash) + getType().hashCode();
1432 }
1433 if (hasIndexdata()) {
1434 hash = (37 * hash) + INDEXDATA_FIELD_NUMBER;
1435 hash = (53 * hash) + getIndexdata().hashCode();
1436 }
1437 if (hasDatasize()) {
1438 hash = (37 * hash) + DATASIZE_FIELD_NUMBER;
1439 hash = (53 * hash) + getDatasize();
1440 }
1441 hash = (29 * hash) + unknownFields.hashCode();
1442 memoizedHashCode = hash;
1443 return hash;
1444 }
1445
1446 public static org.openstreetmap.osmosis.osmbinary.Fileformat.BlobHeader parseFrom(
1447 java.nio.ByteBuffer data)
1448 throws com.google.protobuf.InvalidProtocolBufferException {
1449 return PARSER.parseFrom(data);
1450 }
1451 public static org.openstreetmap.osmosis.osmbinary.Fileformat.BlobHeader parseFrom(
1452 java.nio.ByteBuffer data,
1453 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1454 throws com.google.protobuf.InvalidProtocolBufferException {
1455 return PARSER.parseFrom(data, extensionRegistry);
1456 }
1457 public static org.openstreetmap.osmosis.osmbinary.Fileformat.BlobHeader parseFrom(
1458 com.google.protobuf.ByteString data)
1459 throws com.google.protobuf.InvalidProtocolBufferException {
1460 return PARSER.parseFrom(data);
1461 }
1462 public static org.openstreetmap.osmosis.osmbinary.Fileformat.BlobHeader parseFrom(
1463 com.google.protobuf.ByteString data,
1464 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1465 throws com.google.protobuf.InvalidProtocolBufferException {
1466 return PARSER.parseFrom(data, extensionRegistry);
1467 }
1468 public static org.openstreetmap.osmosis.osmbinary.Fileformat.BlobHeader parseFrom(byte[] data)
1469 throws com.google.protobuf.InvalidProtocolBufferException {
1470 return PARSER.parseFrom(data);
1471 }
1472 public static org.openstreetmap.osmosis.osmbinary.Fileformat.BlobHeader parseFrom(
1473 byte[] data,
1474 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1475 throws com.google.protobuf.InvalidProtocolBufferException {
1476 return PARSER.parseFrom(data, extensionRegistry);
1477 }
1478 public static org.openstreetmap.osmosis.osmbinary.Fileformat.BlobHeader parseFrom(java.io.InputStream input)
1479 throws java.io.IOException {
1480 return com.google.protobuf.GeneratedMessageV3
1481 .parseWithIOException(PARSER, input);
1482 }
1483 public static org.openstreetmap.osmosis.osmbinary.Fileformat.BlobHeader parseFrom(
1484 java.io.InputStream input,
1485 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1486 throws java.io.IOException {
1487 return com.google.protobuf.GeneratedMessageV3
1488 .parseWithIOException(PARSER, input, extensionRegistry);
1489 }
1490 public static org.openstreetmap.osmosis.osmbinary.Fileformat.BlobHeader parseDelimitedFrom(java.io.InputStream input)
1491 throws java.io.IOException {
1492 return com.google.protobuf.GeneratedMessageV3
1493 .parseDelimitedWithIOException(PARSER, input);
1494 }
1495 public static org.openstreetmap.osmosis.osmbinary.Fileformat.BlobHeader parseDelimitedFrom(
1496 java.io.InputStream input,
1497 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1498 throws java.io.IOException {
1499 return com.google.protobuf.GeneratedMessageV3
1500 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
1501 }
1502 public static org.openstreetmap.osmosis.osmbinary.Fileformat.BlobHeader parseFrom(
1503 com.google.protobuf.CodedInputStream input)
1504 throws java.io.IOException {
1505 return com.google.protobuf.GeneratedMessageV3
1506 .parseWithIOException(PARSER, input);
1507 }
1508 public static org.openstreetmap.osmosis.osmbinary.Fileformat.BlobHeader parseFrom(
1509 com.google.protobuf.CodedInputStream input,
1510 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1511 throws java.io.IOException {
1512 return com.google.protobuf.GeneratedMessageV3
1513 .parseWithIOException(PARSER, input, extensionRegistry);
1514 }
1515
1516 @java.lang.Override
1517 public Builder newBuilderForType() { return newBuilder(); }
1518 public static Builder newBuilder() {
1519 return DEFAULT_INSTANCE.toBuilder();
1520 }
1521 public static Builder newBuilder(org.openstreetmap.osmosis.osmbinary.Fileformat.BlobHeader prototype) {
1522 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
1523 }
1524 @java.lang.Override
1525 public Builder toBuilder() {
1526 return this == DEFAULT_INSTANCE
1527 ? new Builder() : new Builder().mergeFrom(this);
1528 }
1529
1530 @java.lang.Override
1531 protected Builder newBuilderForType(
1532 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
1533 Builder builder = new Builder(parent);
1534 return builder;
1535 }
1536 /**
1537 * Protobuf type {@code OSMPBF.BlobHeader}
1538 */
1539 public static final class Builder extends
1540 com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
1541 // @@protoc_insertion_point(builder_implements:OSMPBF.BlobHeader)
1542 org.openstreetmap.osmosis.osmbinary.Fileformat.BlobHeaderOrBuilder {
1543 public static final com.google.protobuf.Descriptors.Descriptor
1544 getDescriptor() {
1545 return org.openstreetmap.osmosis.osmbinary.Fileformat.internal_static_OSMPBF_BlobHeader_descriptor;
1546 }
1547
1548 @java.lang.Override
1549 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
1550 internalGetFieldAccessorTable() {
1551 return org.openstreetmap.osmosis.osmbinary.Fileformat.internal_static_OSMPBF_BlobHeader_fieldAccessorTable
1552 .ensureFieldAccessorsInitialized(
1553 org.openstreetmap.osmosis.osmbinary.Fileformat.BlobHeader.class, org.openstreetmap.osmosis.osmbinary.Fileformat.BlobHeader.Builder.class);
1554 }
1555
1556 // Construct using org.openstreetmap.osmosis.osmbinary.Fileformat.BlobHeader.newBuilder()
1557 private Builder() {
1558 maybeForceBuilderInitialization();
1559 }
1560
1561 private Builder(
1562 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
1563 super(parent);
1564 maybeForceBuilderInitialization();
1565 }
1566 private void maybeForceBuilderInitialization() {
1567 if (com.google.protobuf.GeneratedMessageV3
1568 .alwaysUseFieldBuilders) {
1569 }
1570 }
1571 @java.lang.Override
1572 public Builder clear() {
1573 super.clear();
1574 type_ = "";
1575 bitField0_ = (bitField0_ & ~0x00000001);
1576 indexdata_ = com.google.protobuf.ByteString.EMPTY;
1577 bitField0_ = (bitField0_ & ~0x00000002);
1578 datasize_ = 0;
1579 bitField0_ = (bitField0_ & ~0x00000004);
1580 return this;
1581 }
1582
1583 @java.lang.Override
1584 public com.google.protobuf.Descriptors.Descriptor
1585 getDescriptorForType() {
1586 return org.openstreetmap.osmosis.osmbinary.Fileformat.internal_static_OSMPBF_BlobHeader_descriptor;
1587 }
1588
1589 @java.lang.Override
1590 public org.openstreetmap.osmosis.osmbinary.Fileformat.BlobHeader getDefaultInstanceForType() {
1591 return org.openstreetmap.osmosis.osmbinary.Fileformat.BlobHeader.getDefaultInstance();
1592 }
1593
1594 @java.lang.Override
1595 public org.openstreetmap.osmosis.osmbinary.Fileformat.BlobHeader build() {
1596 org.openstreetmap.osmosis.osmbinary.Fileformat.BlobHeader result = buildPartial();
1597 if (!result.isInitialized()) {
1598 throw newUninitializedMessageException(result);
1599 }
1600 return result;
1601 }
1602
1603 @java.lang.Override
1604 public org.openstreetmap.osmosis.osmbinary.Fileformat.BlobHeader buildPartial() {
1605 org.openstreetmap.osmosis.osmbinary.Fileformat.BlobHeader result = new org.openstreetmap.osmosis.osmbinary.Fileformat.BlobHeader(this);
1606 int from_bitField0_ = bitField0_;
1607 int to_bitField0_ = 0;
1608 if (((from_bitField0_ & 0x00000001) != 0)) {
1609 to_bitField0_ |= 0x00000001;
1610 }
1611 result.type_ = type_;
1612 if (((from_bitField0_ & 0x00000002) != 0)) {
1613 to_bitField0_ |= 0x00000002;
1614 }
1615 result.indexdata_ = indexdata_;
1616 if (((from_bitField0_ & 0x00000004) != 0)) {
1617 result.datasize_ = datasize_;
1618 to_bitField0_ |= 0x00000004;
1619 }
1620 result.bitField0_ = to_bitField0_;
1621 onBuilt();
1622 return result;
1623 }
1624
1625 @java.lang.Override
1626 public Builder clone() {
1627 return super.clone();
1628 }
1629 @java.lang.Override
1630 public Builder setField(
1631 com.google.protobuf.Descriptors.FieldDescriptor field,
1632 java.lang.Object value) {
1633 return super.setField(field, value);
1634 }
1635 @java.lang.Override
1636 public Builder clearField(
1637 com.google.protobuf.Descriptors.FieldDescriptor field) {
1638 return super.clearField(field);
1639 }
1640 @java.lang.Override
1641 public Builder clearOneof(
1642 com.google.protobuf.Descriptors.OneofDescriptor oneof) {
1643 return super.clearOneof(oneof);
1644 }
1645 @java.lang.Override
1646 public Builder setRepeatedField(
1647 com.google.protobuf.Descriptors.FieldDescriptor field,
1648 int index, java.lang.Object value) {
1649 return super.setRepeatedField(field, index, value);
1650 }
1651 @java.lang.Override
1652 public Builder addRepeatedField(
1653 com.google.protobuf.Descriptors.FieldDescriptor field,
1654 java.lang.Object value) {
1655 return super.addRepeatedField(field, value);
1656 }
1657 @java.lang.Override
1658 public Builder mergeFrom(com.google.protobuf.Message other) {
1659 if (other instanceof org.openstreetmap.osmosis.osmbinary.Fileformat.BlobHeader) {
1660 return mergeFrom((org.openstreetmap.osmosis.osmbinary.Fileformat.BlobHeader)other);
1661 } else {
1662 super.mergeFrom(other);
1663 return this;
1664 }
1665 }
1666
1667 public Builder mergeFrom(org.openstreetmap.osmosis.osmbinary.Fileformat.BlobHeader other) {
1668 if (other == org.openstreetmap.osmosis.osmbinary.Fileformat.BlobHeader.getDefaultInstance()) return this;
1669 if (other.hasType()) {
1670 bitField0_ |= 0x00000001;
1671 type_ = other.type_;
1672 onChanged();
1673 }
1674 if (other.hasIndexdata()) {
1675 setIndexdata(other.getIndexdata());
1676 }
1677 if (other.hasDatasize()) {
1678 setDatasize(other.getDatasize());
1679 }
1680 this.mergeUnknownFields(other.unknownFields);
1681 onChanged();
1682 return this;
1683 }
1684
1685 @java.lang.Override
1686 public final boolean isInitialized() {
1687 if (!hasType()) {
1688 return false;
1689 }
1690 if (!hasDatasize()) {
1691 return false;
1692 }
1693 return true;
1694 }
1695
1696 @java.lang.Override
1697 public Builder mergeFrom(
1698 com.google.protobuf.CodedInputStream input,
1699 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1700 throws java.io.IOException {
1701 org.openstreetmap.osmosis.osmbinary.Fileformat.BlobHeader parsedMessage = null;
1702 try {
1703 parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
1704 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1705 parsedMessage = (org.openstreetmap.osmosis.osmbinary.Fileformat.BlobHeader) e.getUnfinishedMessage();
1706 throw e.unwrapIOException();
1707 } finally {
1708 if (parsedMessage != null) {
1709 mergeFrom(parsedMessage);
1710 }
1711 }
1712 return this;
1713 }
1714 private int bitField0_;
1715
1716 private java.lang.Object type_ = "";
1717 /**
1718 * <code>required string type = 1;</code>
1719 * @return Whether the type field is set.
1720 */
1721 public boolean hasType() {
1722 return ((bitField0_ & 0x00000001) != 0);
1723 }
1724 /**
1725 * <code>required string type = 1;</code>
1726 * @return The type.
1727 */
1728 public java.lang.String getType() {
1729 java.lang.Object ref = type_;
1730 if (!(ref instanceof java.lang.String)) {
1731 com.google.protobuf.ByteString bs =
1732 (com.google.protobuf.ByteString) ref;
1733 java.lang.String s = bs.toStringUtf8();
1734 if (bs.isValidUtf8()) {
1735 type_ = s;
1736 }
1737 return s;
1738 } else {
1739 return (java.lang.String) ref;
1740 }
1741 }
1742 /**
1743 * <code>required string type = 1;</code>
1744 * @return The bytes for type.
1745 */
1746 public com.google.protobuf.ByteString
1747 getTypeBytes() {
1748 java.lang.Object ref = type_;
1749 if (ref instanceof String) {
1750 com.google.protobuf.ByteString b =
1751 com.google.protobuf.ByteString.copyFromUtf8(
1752 (java.lang.String) ref);
1753 type_ = b;
1754 return b;
1755 } else {
1756 return (com.google.protobuf.ByteString) ref;
1757 }
1758 }
1759 /**
1760 * <code>required string type = 1;</code>
1761 * @param value The type to set.
1762 * @return This builder for chaining.
1763 */
1764 public Builder setType(
1765 java.lang.String value) {
1766 if (value == null) {
1767 throw new NullPointerException();
1768 }
1769 bitField0_ |= 0x00000001;
1770 type_ = value;
1771 onChanged();
1772 return this;
1773 }
1774 /**
1775 * <code>required string type = 1;</code>
1776 * @return This builder for chaining.
1777 */
1778 public Builder clearType() {
1779 bitField0_ = (bitField0_ & ~0x00000001);
1780 type_ = getDefaultInstance().getType();
1781 onChanged();
1782 return this;
1783 }
1784 /**
1785 * <code>required string type = 1;</code>
1786 * @param value The bytes for type to set.
1787 * @return This builder for chaining.
1788 */
1789 public Builder setTypeBytes(
1790 com.google.protobuf.ByteString value) {
1791 if (value == null) {
1792 throw new NullPointerException();
1793 }
1794 bitField0_ |= 0x00000001;
1795 type_ = value;
1796 onChanged();
1797 return this;
1798 }
1799
1800 private com.google.protobuf.ByteString indexdata_ = com.google.protobuf.ByteString.EMPTY;
1801 /**
1802 * <code>optional bytes indexdata = 2;</code>
1803 * @return Whether the indexdata field is set.
1804 */
1805 @java.lang.Override
1806 public boolean hasIndexdata() {
1807 return ((bitField0_ & 0x00000002) != 0);
1808 }
1809 /**
1810 * <code>optional bytes indexdata = 2;</code>
1811 * @return The indexdata.
1812 */
1813 @java.lang.Override
1814 public com.google.protobuf.ByteString getIndexdata() {
1815 return indexdata_;
1816 }
1817 /**
1818 * <code>optional bytes indexdata = 2;</code>
1819 * @param value The indexdata to set.
1820 * @return This builder for chaining.
1821 */
1822 public Builder setIndexdata(com.google.protobuf.ByteString value) {
1823 if (value == null) {
1824 throw new NullPointerException();
1825 }
1826 bitField0_ |= 0x00000002;
1827 indexdata_ = value;
1828 onChanged();
1829 return this;
1830 }
1831 /**
1832 * <code>optional bytes indexdata = 2;</code>
1833 * @return This builder for chaining.
1834 */
1835 public Builder clearIndexdata() {
1836 bitField0_ = (bitField0_ & ~0x00000002);
1837 indexdata_ = getDefaultInstance().getIndexdata();
1838 onChanged();
1839 return this;
1840 }
1841
1842 private int datasize_ ;
1843 /**
1844 * <code>required int32 datasize = 3;</code>
1845 * @return Whether the datasize field is set.
1846 */
1847 @java.lang.Override
1848 public boolean hasDatasize() {
1849 return ((bitField0_ & 0x00000004) != 0);
1850 }
1851 /**
1852 * <code>required int32 datasize = 3;</code>
1853 * @return The datasize.
1854 */
1855 @java.lang.Override
1856 public int getDatasize() {
1857 return datasize_;
1858 }
1859 /**
1860 * <code>required int32 datasize = 3;</code>
1861 * @param value The datasize to set.
1862 * @return This builder for chaining.
1863 */
1864 public Builder setDatasize(int value) {
1865 bitField0_ |= 0x00000004;
1866 datasize_ = value;
1867 onChanged();
1868 return this;
1869 }
1870 /**
1871 * <code>required int32 datasize = 3;</code>
1872 * @return This builder for chaining.
1873 */
1874 public Builder clearDatasize() {
1875 bitField0_ = (bitField0_ & ~0x00000004);
1876 datasize_ = 0;
1877 onChanged();
1878 return this;
1879 }
1880 @java.lang.Override
1881 public final Builder setUnknownFields(
1882 final com.google.protobuf.UnknownFieldSet unknownFields) {
1883 return super.setUnknownFields(unknownFields);
1884 }
1885
1886 @java.lang.Override
1887 public final Builder mergeUnknownFields(
1888 final com.google.protobuf.UnknownFieldSet unknownFields) {
1889 return super.mergeUnknownFields(unknownFields);
1890 }
1891
1892
1893 // @@protoc_insertion_point(builder_scope:OSMPBF.BlobHeader)
1894 }
1895
1896 // @@protoc_insertion_point(class_scope:OSMPBF.BlobHeader)
1897 private static final org.openstreetmap.osmosis.osmbinary.Fileformat.BlobHeader DEFAULT_INSTANCE;
1898 static {
1899 DEFAULT_INSTANCE = new org.openstreetmap.osmosis.osmbinary.Fileformat.BlobHeader();
1900 }
1901
1902 public static org.openstreetmap.osmosis.osmbinary.Fileformat.BlobHeader getDefaultInstance() {
1903 return DEFAULT_INSTANCE;
1904 }
1905
1906 @java.lang.Deprecated public static final com.google.protobuf.Parser<BlobHeader>
1907 PARSER = new com.google.protobuf.AbstractParser<BlobHeader>() {
1908 @java.lang.Override
1909 public BlobHeader parsePartialFrom(
1910 com.google.protobuf.CodedInputStream input,
1911 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1912 throws com.google.protobuf.InvalidProtocolBufferException {
1913 return new BlobHeader(input, extensionRegistry);
1914 }
1915 };
1916
1917 public static com.google.protobuf.Parser<BlobHeader> parser() {
1918 return PARSER;
1919 }
1920
1921 @java.lang.Override
1922 public com.google.protobuf.Parser<BlobHeader> getParserForType() {
1923 return PARSER;
1924 }
1925
1926 @java.lang.Override
1927 public org.openstreetmap.osmosis.osmbinary.Fileformat.BlobHeader getDefaultInstanceForType() {
1928 return DEFAULT_INSTANCE;
1929 }
1930
1931 }
1932
1933 private static final com.google.protobuf.Descriptors.Descriptor
1934 internal_static_OSMPBF_Blob_descriptor;
1935 private static final
1936 com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
1937 internal_static_OSMPBF_Blob_fieldAccessorTable;
1938 private static final com.google.protobuf.Descriptors.Descriptor
1939 internal_static_OSMPBF_BlobHeader_descriptor;
1940 private static final
1941 com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
1942 internal_static_OSMPBF_BlobHeader_fieldAccessorTable;
1943
1944 public static com.google.protobuf.Descriptors.FileDescriptor
1945 getDescriptor() {
1946 return descriptor;
1947 }
1948 private static com.google.protobuf.Descriptors.FileDescriptor
1949 descriptor;
1950 static {
1951 java.lang.String[] descriptorData = {
1952 "\n\"src/main/protobuf/fileformat.proto\022\006OS" +
1953 "MPBF\"l\n\004Blob\022\013\n\003raw\030\001 \001(\014\022\020\n\010raw_size\030\002 " +
1954 "\001(\005\022\021\n\tzlib_data\030\003 \001(\014\022\021\n\tlzma_data\030\004 \001(" +
1955 "\014\022\037\n\023OBSOLETE_bzip2_data\030\005 \001(\014B\002\030\001\"?\n\nBl" +
1956 "obHeader\022\014\n\004type\030\001 \002(\t\022\021\n\tindexdata\030\002 \001(" +
1957 "\014\022\020\n\010datasize\030\003 \002(\005B%\n#org.openstreetmap" +
1958 ".osmosis.osmbinary"
1959 };
1960 descriptor = com.google.protobuf.Descriptors.FileDescriptor
1961 .internalBuildGeneratedFileFrom(descriptorData,
1962 new com.google.protobuf.Descriptors.FileDescriptor[] {
1963 });
1964 internal_static_OSMPBF_Blob_descriptor =
1965 getDescriptor().getMessageTypes().get(0);
1966 internal_static_OSMPBF_Blob_fieldAccessorTable = new
1967 com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
1968 internal_static_OSMPBF_Blob_descriptor,
1969 new java.lang.String[] { "Raw", "RawSize", "ZlibData", "LzmaData", "OBSOLETEBzip2Data", });
1970 internal_static_OSMPBF_BlobHeader_descriptor =
1971 getDescriptor().getMessageTypes().get(1);
1972 internal_static_OSMPBF_BlobHeader_fieldAccessorTable = new
1973 com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
1974 internal_static_OSMPBF_BlobHeader_descriptor,
1975 new java.lang.String[] { "Type", "Indexdata", "Datasize", });
1976 }
1977
1978 // @@protoc_insertion_point(outer_class_scope)
1979 }
+0
-18099
osmosis-osm-binary/gen-src/main/java/org/openstreetmap/osmosis/osmbinary/Osmformat.java less more
0 // Generated by the protocol buffer compiler. DO NOT EDIT!
1 // source: src/main/protobuf/osmformat.proto
2
3 package org.openstreetmap.osmosis.osmbinary;
4
5 public final class Osmformat {
6 private Osmformat() {}
7 public static void registerAllExtensions(
8 com.google.protobuf.ExtensionRegistryLite registry) {
9 }
10
11 public static void registerAllExtensions(
12 com.google.protobuf.ExtensionRegistry registry) {
13 registerAllExtensions(
14 (com.google.protobuf.ExtensionRegistryLite) registry);
15 }
16 public interface HeaderBlockOrBuilder extends
17 // @@protoc_insertion_point(interface_extends:OSMPBF.HeaderBlock)
18 com.google.protobuf.MessageOrBuilder {
19
20 /**
21 * <code>optional .OSMPBF.HeaderBBox bbox = 1;</code>
22 * @return Whether the bbox field is set.
23 */
24 boolean hasBbox();
25 /**
26 * <code>optional .OSMPBF.HeaderBBox bbox = 1;</code>
27 * @return The bbox.
28 */
29 org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox getBbox();
30 /**
31 * <code>optional .OSMPBF.HeaderBBox bbox = 1;</code>
32 */
33 org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBoxOrBuilder getBboxOrBuilder();
34
35 /**
36 * <pre>
37 * Additional tags to aid in parsing this dataset
38 * </pre>
39 *
40 * <code>repeated string required_features = 4;</code>
41 * @return A list containing the requiredFeatures.
42 */
43 java.util.List<java.lang.String>
44 getRequiredFeaturesList();
45 /**
46 * <pre>
47 * Additional tags to aid in parsing this dataset
48 * </pre>
49 *
50 * <code>repeated string required_features = 4;</code>
51 * @return The count of requiredFeatures.
52 */
53 int getRequiredFeaturesCount();
54 /**
55 * <pre>
56 * Additional tags to aid in parsing this dataset
57 * </pre>
58 *
59 * <code>repeated string required_features = 4;</code>
60 * @param index The index of the element to return.
61 * @return The requiredFeatures at the given index.
62 */
63 java.lang.String getRequiredFeatures(int index);
64 /**
65 * <pre>
66 * Additional tags to aid in parsing this dataset
67 * </pre>
68 *
69 * <code>repeated string required_features = 4;</code>
70 * @param index The index of the value to return.
71 * @return The bytes of the requiredFeatures at the given index.
72 */
73 com.google.protobuf.ByteString
74 getRequiredFeaturesBytes(int index);
75
76 /**
77 * <code>repeated string optional_features = 5;</code>
78 * @return A list containing the optionalFeatures.
79 */
80 java.util.List<java.lang.String>
81 getOptionalFeaturesList();
82 /**
83 * <code>repeated string optional_features = 5;</code>
84 * @return The count of optionalFeatures.
85 */
86 int getOptionalFeaturesCount();
87 /**
88 * <code>repeated string optional_features = 5;</code>
89 * @param index The index of the element to return.
90 * @return The optionalFeatures at the given index.
91 */
92 java.lang.String getOptionalFeatures(int index);
93 /**
94 * <code>repeated string optional_features = 5;</code>
95 * @param index The index of the value to return.
96 * @return The bytes of the optionalFeatures at the given index.
97 */
98 com.google.protobuf.ByteString
99 getOptionalFeaturesBytes(int index);
100
101 /**
102 * <code>optional string writingprogram = 16;</code>
103 * @return Whether the writingprogram field is set.
104 */
105 boolean hasWritingprogram();
106 /**
107 * <code>optional string writingprogram = 16;</code>
108 * @return The writingprogram.
109 */
110 java.lang.String getWritingprogram();
111 /**
112 * <code>optional string writingprogram = 16;</code>
113 * @return The bytes for writingprogram.
114 */
115 com.google.protobuf.ByteString
116 getWritingprogramBytes();
117
118 /**
119 * <pre>
120 * From the bbox field.
121 * </pre>
122 *
123 * <code>optional string source = 17;</code>
124 * @return Whether the source field is set.
125 */
126 boolean hasSource();
127 /**
128 * <pre>
129 * From the bbox field.
130 * </pre>
131 *
132 * <code>optional string source = 17;</code>
133 * @return The source.
134 */
135 java.lang.String getSource();
136 /**
137 * <pre>
138 * From the bbox field.
139 * </pre>
140 *
141 * <code>optional string source = 17;</code>
142 * @return The bytes for source.
143 */
144 com.google.protobuf.ByteString
145 getSourceBytes();
146
147 /**
148 * <pre>
149 * replication timestamp, expressed in seconds since the epoch,
150 * otherwise the same value as in the "timestamp=..." field
151 * in the state.txt file used by Osmosis
152 * </pre>
153 *
154 * <code>optional int64 osmosis_replication_timestamp = 32;</code>
155 * @return Whether the osmosisReplicationTimestamp field is set.
156 */
157 boolean hasOsmosisReplicationTimestamp();
158 /**
159 * <pre>
160 * replication timestamp, expressed in seconds since the epoch,
161 * otherwise the same value as in the "timestamp=..." field
162 * in the state.txt file used by Osmosis
163 * </pre>
164 *
165 * <code>optional int64 osmosis_replication_timestamp = 32;</code>
166 * @return The osmosisReplicationTimestamp.
167 */
168 long getOsmosisReplicationTimestamp();
169
170 /**
171 * <pre>
172 * replication sequence number (sequenceNumber in state.txt)
173 * </pre>
174 *
175 * <code>optional int64 osmosis_replication_sequence_number = 33;</code>
176 * @return Whether the osmosisReplicationSequenceNumber field is set.
177 */
178 boolean hasOsmosisReplicationSequenceNumber();
179 /**
180 * <pre>
181 * replication sequence number (sequenceNumber in state.txt)
182 * </pre>
183 *
184 * <code>optional int64 osmosis_replication_sequence_number = 33;</code>
185 * @return The osmosisReplicationSequenceNumber.
186 */
187 long getOsmosisReplicationSequenceNumber();
188
189 /**
190 * <pre>
191 * replication base URL (from Osmosis' configuration.txt file)
192 * </pre>
193 *
194 * <code>optional string osmosis_replication_base_url = 34;</code>
195 * @return Whether the osmosisReplicationBaseUrl field is set.
196 */
197 boolean hasOsmosisReplicationBaseUrl();
198 /**
199 * <pre>
200 * replication base URL (from Osmosis' configuration.txt file)
201 * </pre>
202 *
203 * <code>optional string osmosis_replication_base_url = 34;</code>
204 * @return The osmosisReplicationBaseUrl.
205 */
206 java.lang.String getOsmosisReplicationBaseUrl();
207 /**
208 * <pre>
209 * replication base URL (from Osmosis' configuration.txt file)
210 * </pre>
211 *
212 * <code>optional string osmosis_replication_base_url = 34;</code>
213 * @return The bytes for osmosisReplicationBaseUrl.
214 */
215 com.google.protobuf.ByteString
216 getOsmosisReplicationBaseUrlBytes();
217 }
218 /**
219 * Protobuf type {@code OSMPBF.HeaderBlock}
220 */
221 public static final class HeaderBlock extends
222 com.google.protobuf.GeneratedMessageV3 implements
223 // @@protoc_insertion_point(message_implements:OSMPBF.HeaderBlock)
224 HeaderBlockOrBuilder {
225 private static final long serialVersionUID = 0L;
226 // Use HeaderBlock.newBuilder() to construct.
227 private HeaderBlock(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
228 super(builder);
229 }
230 private HeaderBlock() {
231 requiredFeatures_ = com.google.protobuf.LazyStringArrayList.EMPTY;
232 optionalFeatures_ = com.google.protobuf.LazyStringArrayList.EMPTY;
233 writingprogram_ = "";
234 source_ = "";
235 osmosisReplicationBaseUrl_ = "";
236 }
237
238 @java.lang.Override
239 @SuppressWarnings({"unused"})
240 protected java.lang.Object newInstance(
241 UnusedPrivateParameter unused) {
242 return new HeaderBlock();
243 }
244
245 @java.lang.Override
246 public final com.google.protobuf.UnknownFieldSet
247 getUnknownFields() {
248 return this.unknownFields;
249 }
250 private HeaderBlock(
251 com.google.protobuf.CodedInputStream input,
252 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
253 throws com.google.protobuf.InvalidProtocolBufferException {
254 this();
255 if (extensionRegistry == null) {
256 throw new java.lang.NullPointerException();
257 }
258 int mutable_bitField0_ = 0;
259 com.google.protobuf.UnknownFieldSet.Builder unknownFields =
260 com.google.protobuf.UnknownFieldSet.newBuilder();
261 try {
262 boolean done = false;
263 while (!done) {
264 int tag = input.readTag();
265 switch (tag) {
266 case 0:
267 done = true;
268 break;
269 case 10: {
270 org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox.Builder subBuilder = null;
271 if (((bitField0_ & 0x00000001) != 0)) {
272 subBuilder = bbox_.toBuilder();
273 }
274 bbox_ = input.readMessage(org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox.PARSER, extensionRegistry);
275 if (subBuilder != null) {
276 subBuilder.mergeFrom(bbox_);
277 bbox_ = subBuilder.buildPartial();
278 }
279 bitField0_ |= 0x00000001;
280 break;
281 }
282 case 34: {
283 com.google.protobuf.ByteString bs = input.readBytes();
284 if (!((mutable_bitField0_ & 0x00000002) != 0)) {
285 requiredFeatures_ = new com.google.protobuf.LazyStringArrayList();
286 mutable_bitField0_ |= 0x00000002;
287 }
288 requiredFeatures_.add(bs);
289 break;
290 }
291 case 42: {
292 com.google.protobuf.ByteString bs = input.readBytes();
293 if (!((mutable_bitField0_ & 0x00000004) != 0)) {
294 optionalFeatures_ = new com.google.protobuf.LazyStringArrayList();
295 mutable_bitField0_ |= 0x00000004;
296 }
297 optionalFeatures_.add(bs);
298 break;
299 }
300 case 130: {
301 com.google.protobuf.ByteString bs = input.readBytes();
302 bitField0_ |= 0x00000002;
303 writingprogram_ = bs;
304 break;
305 }
306 case 138: {
307 com.google.protobuf.ByteString bs = input.readBytes();
308 bitField0_ |= 0x00000004;
309 source_ = bs;
310 break;
311 }
312 case 256: {
313 bitField0_ |= 0x00000008;
314 osmosisReplicationTimestamp_ = input.readInt64();
315 break;
316 }
317 case 264: {
318 bitField0_ |= 0x00000010;
319 osmosisReplicationSequenceNumber_ = input.readInt64();
320 break;
321 }
322 case 274: {
323 com.google.protobuf.ByteString bs = input.readBytes();
324 bitField0_ |= 0x00000020;
325 osmosisReplicationBaseUrl_ = bs;
326 break;
327 }
328 default: {
329 if (!parseUnknownField(
330 input, unknownFields, extensionRegistry, tag)) {
331 done = true;
332 }
333 break;
334 }
335 }
336 }
337 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
338 throw e.setUnfinishedMessage(this);
339 } catch (java.io.IOException e) {
340 throw new com.google.protobuf.InvalidProtocolBufferException(
341 e).setUnfinishedMessage(this);
342 } finally {
343 if (((mutable_bitField0_ & 0x00000002) != 0)) {
344 requiredFeatures_ = requiredFeatures_.getUnmodifiableView();
345 }
346 if (((mutable_bitField0_ & 0x00000004) != 0)) {
347 optionalFeatures_ = optionalFeatures_.getUnmodifiableView();
348 }
349 this.unknownFields = unknownFields.build();
350 makeExtensionsImmutable();
351 }
352 }
353 public static final com.google.protobuf.Descriptors.Descriptor
354 getDescriptor() {
355 return org.openstreetmap.osmosis.osmbinary.Osmformat.internal_static_OSMPBF_HeaderBlock_descriptor;
356 }
357
358 @java.lang.Override
359 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
360 internalGetFieldAccessorTable() {
361 return org.openstreetmap.osmosis.osmbinary.Osmformat.internal_static_OSMPBF_HeaderBlock_fieldAccessorTable
362 .ensureFieldAccessorsInitialized(
363 org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBlock.class, org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBlock.Builder.class);
364 }
365
366 private int bitField0_;
367 public static final int BBOX_FIELD_NUMBER = 1;
368 private org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox bbox_;
369 /**
370 * <code>optional .OSMPBF.HeaderBBox bbox = 1;</code>
371 * @return Whether the bbox field is set.
372 */
373 @java.lang.Override
374 public boolean hasBbox() {
375 return ((bitField0_ & 0x00000001) != 0);
376 }
377 /**
378 * <code>optional .OSMPBF.HeaderBBox bbox = 1;</code>
379 * @return The bbox.
380 */
381 @java.lang.Override
382 public org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox getBbox() {
383 return bbox_ == null ? org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox.getDefaultInstance() : bbox_;
384 }
385 /**
386 * <code>optional .OSMPBF.HeaderBBox bbox = 1;</code>
387 */
388 @java.lang.Override
389 public org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBoxOrBuilder getBboxOrBuilder() {
390 return bbox_ == null ? org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox.getDefaultInstance() : bbox_;
391 }
392
393 public static final int REQUIRED_FEATURES_FIELD_NUMBER = 4;
394 private com.google.protobuf.LazyStringList requiredFeatures_;
395 /**
396 * <pre>
397 * Additional tags to aid in parsing this dataset
398 * </pre>
399 *
400 * <code>repeated string required_features = 4;</code>
401 * @return A list containing the requiredFeatures.
402 */
403 public com.google.protobuf.ProtocolStringList
404 getRequiredFeaturesList() {
405 return requiredFeatures_;
406 }
407 /**
408 * <pre>
409 * Additional tags to aid in parsing this dataset
410 * </pre>
411 *
412 * <code>repeated string required_features = 4;</code>
413 * @return The count of requiredFeatures.
414 */
415 public int getRequiredFeaturesCount() {
416 return requiredFeatures_.size();
417 }
418 /**
419 * <pre>
420 * Additional tags to aid in parsing this dataset
421 * </pre>
422 *
423 * <code>repeated string required_features = 4;</code>
424 * @param index The index of the element to return.
425 * @return The requiredFeatures at the given index.
426 */
427 public java.lang.String getRequiredFeatures(int index) {
428 return requiredFeatures_.get(index);
429 }
430 /**
431 * <pre>
432 * Additional tags to aid in parsing this dataset
433 * </pre>
434 *
435 * <code>repeated string required_features = 4;</code>
436 * @param index The index of the value to return.
437 * @return The bytes of the requiredFeatures at the given index.
438 */
439 public com.google.protobuf.ByteString
440 getRequiredFeaturesBytes(int index) {
441 return requiredFeatures_.getByteString(index);
442 }
443
444 public static final int OPTIONAL_FEATURES_FIELD_NUMBER = 5;
445 private com.google.protobuf.LazyStringList optionalFeatures_;
446 /**
447 * <code>repeated string optional_features = 5;</code>
448 * @return A list containing the optionalFeatures.
449 */
450 public com.google.protobuf.ProtocolStringList
451 getOptionalFeaturesList() {
452 return optionalFeatures_;
453 }
454 /**
455 * <code>repeated string optional_features = 5;</code>
456 * @return The count of optionalFeatures.
457 */
458 public int getOptionalFeaturesCount() {
459 return optionalFeatures_.size();
460 }
461 /**
462 * <code>repeated string optional_features = 5;</code>
463 * @param index The index of the element to return.
464 * @return The optionalFeatures at the given index.
465 */
466 public java.lang.String getOptionalFeatures(int index) {
467 return optionalFeatures_.get(index);
468 }
469 /**
470 * <code>repeated string optional_features = 5;</code>
471 * @param index The index of the value to return.
472 * @return The bytes of the optionalFeatures at the given index.
473 */
474 public com.google.protobuf.ByteString
475 getOptionalFeaturesBytes(int index) {
476 return optionalFeatures_.getByteString(index);
477 }
478
479 public static final int WRITINGPROGRAM_FIELD_NUMBER = 16;
480 private volatile java.lang.Object writingprogram_;
481 /**
482 * <code>optional string writingprogram = 16;</code>
483 * @return Whether the writingprogram field is set.
484 */
485 @java.lang.Override
486 public boolean hasWritingprogram() {
487 return ((bitField0_ & 0x00000002) != 0);
488 }
489 /**
490 * <code>optional string writingprogram = 16;</code>
491 * @return The writingprogram.
492 */
493 @java.lang.Override
494 public java.lang.String getWritingprogram() {
495 java.lang.Object ref = writingprogram_;
496 if (ref instanceof java.lang.String) {
497 return (java.lang.String) ref;
498 } else {
499 com.google.protobuf.ByteString bs =
500 (com.google.protobuf.ByteString) ref;
501 java.lang.String s = bs.toStringUtf8();
502 if (bs.isValidUtf8()) {
503 writingprogram_ = s;
504 }
505 return s;
506 }
507 }
508 /**
509 * <code>optional string writingprogram = 16;</code>
510 * @return The bytes for writingprogram.
511 */
512 @java.lang.Override
513 public com.google.protobuf.ByteString
514 getWritingprogramBytes() {
515 java.lang.Object ref = writingprogram_;
516 if (ref instanceof java.lang.String) {
517 com.google.protobuf.ByteString b =
518 com.google.protobuf.ByteString.copyFromUtf8(
519 (java.lang.String) ref);
520 writingprogram_ = b;
521 return b;
522 } else {
523 return (com.google.protobuf.ByteString) ref;
524 }
525 }
526
527 public static final int SOURCE_FIELD_NUMBER = 17;
528 private volatile java.lang.Object source_;
529 /**
530 * <pre>
531 * From the bbox field.
532 * </pre>
533 *
534 * <code>optional string source = 17;</code>
535 * @return Whether the source field is set.
536 */
537 @java.lang.Override
538 public boolean hasSource() {
539 return ((bitField0_ & 0x00000004) != 0);
540 }
541 /**
542 * <pre>
543 * From the bbox field.
544 * </pre>
545 *
546 * <code>optional string source = 17;</code>
547 * @return The source.
548 */
549 @java.lang.Override
550 public java.lang.String getSource() {
551 java.lang.Object ref = source_;
552 if (ref instanceof java.lang.String) {
553 return (java.lang.String) ref;
554 } else {
555 com.google.protobuf.ByteString bs =
556 (com.google.protobuf.ByteString) ref;
557 java.lang.String s = bs.toStringUtf8();
558 if (bs.isValidUtf8()) {
559 source_ = s;
560 }
561 return s;
562 }
563 }
564 /**
565 * <pre>
566 * From the bbox field.
567 * </pre>
568 *
569 * <code>optional string source = 17;</code>
570 * @return The bytes for source.
571 */
572 @java.lang.Override
573 public com.google.protobuf.ByteString
574 getSourceBytes() {
575 java.lang.Object ref = source_;
576 if (ref instanceof java.lang.String) {
577 com.google.protobuf.ByteString b =
578 com.google.protobuf.ByteString.copyFromUtf8(
579 (java.lang.String) ref);
580 source_ = b;
581 return b;
582 } else {
583 return (com.google.protobuf.ByteString) ref;
584 }
585 }
586
587 public static final int OSMOSIS_REPLICATION_TIMESTAMP_FIELD_NUMBER = 32;
588 private long osmosisReplicationTimestamp_;
589 /**
590 * <pre>
591 * replication timestamp, expressed in seconds since the epoch,
592 * otherwise the same value as in the "timestamp=..." field
593 * in the state.txt file used by Osmosis
594 * </pre>
595 *
596 * <code>optional int64 osmosis_replication_timestamp = 32;</code>
597 * @return Whether the osmosisReplicationTimestamp field is set.
598 */
599 @java.lang.Override
600 public boolean hasOsmosisReplicationTimestamp() {
601 return ((bitField0_ & 0x00000008) != 0);
602 }
603 /**
604 * <pre>
605 * replication timestamp, expressed in seconds since the epoch,
606 * otherwise the same value as in the "timestamp=..." field
607 * in the state.txt file used by Osmosis
608 * </pre>
609 *
610 * <code>optional int64 osmosis_replication_timestamp = 32;</code>
611 * @return The osmosisReplicationTimestamp.
612 */
613 @java.lang.Override
614 public long getOsmosisReplicationTimestamp() {
615 return osmosisReplicationTimestamp_;
616 }
617
618 public static final int OSMOSIS_REPLICATION_SEQUENCE_NUMBER_FIELD_NUMBER = 33;
619 private long osmosisReplicationSequenceNumber_;
620 /**
621 * <pre>
622 * replication sequence number (sequenceNumber in state.txt)
623 * </pre>
624 *
625 * <code>optional int64 osmosis_replication_sequence_number = 33;</code>
626 * @return Whether the osmosisReplicationSequenceNumber field is set.
627 */
628 @java.lang.Override
629 public boolean hasOsmosisReplicationSequenceNumber() {
630 return ((bitField0_ & 0x00000010) != 0);
631 }
632 /**
633 * <pre>
634 * replication sequence number (sequenceNumber in state.txt)
635 * </pre>
636 *
637 * <code>optional int64 osmosis_replication_sequence_number = 33;</code>
638 * @return The osmosisReplicationSequenceNumber.
639 */
640 @java.lang.Override
641 public long getOsmosisReplicationSequenceNumber() {
642 return osmosisReplicationSequenceNumber_;
643 }
644
645 public static final int OSMOSIS_REPLICATION_BASE_URL_FIELD_NUMBER = 34;
646 private volatile java.lang.Object osmosisReplicationBaseUrl_;
647 /**
648 * <pre>
649 * replication base URL (from Osmosis' configuration.txt file)
650 * </pre>
651 *
652 * <code>optional string osmosis_replication_base_url = 34;</code>
653 * @return Whether the osmosisReplicationBaseUrl field is set.
654 */
655 @java.lang.Override
656 public boolean hasOsmosisReplicationBaseUrl() {
657 return ((bitField0_ & 0x00000020) != 0);
658 }
659 /**
660 * <pre>
661 * replication base URL (from Osmosis' configuration.txt file)
662 * </pre>
663 *
664 * <code>optional string osmosis_replication_base_url = 34;</code>
665 * @return The osmosisReplicationBaseUrl.
666 */
667 @java.lang.Override
668 public java.lang.String getOsmosisReplicationBaseUrl() {
669 java.lang.Object ref = osmosisReplicationBaseUrl_;
670 if (ref instanceof java.lang.String) {
671 return (java.lang.String) ref;
672 } else {
673 com.google.protobuf.ByteString bs =
674 (com.google.protobuf.ByteString) ref;
675 java.lang.String s = bs.toStringUtf8();
676 if (bs.isValidUtf8()) {
677 osmosisReplicationBaseUrl_ = s;
678 }
679 return s;
680 }
681 }
682 /**
683 * <pre>
684 * replication base URL (from Osmosis' configuration.txt file)
685 * </pre>
686 *
687 * <code>optional string osmosis_replication_base_url = 34;</code>
688 * @return The bytes for osmosisReplicationBaseUrl.
689 */
690 @java.lang.Override
691 public com.google.protobuf.ByteString
692 getOsmosisReplicationBaseUrlBytes() {
693 java.lang.Object ref = osmosisReplicationBaseUrl_;
694 if (ref instanceof java.lang.String) {
695 com.google.protobuf.ByteString b =
696 com.google.protobuf.ByteString.copyFromUtf8(
697 (java.lang.String) ref);
698 osmosisReplicationBaseUrl_ = b;
699 return b;
700 } else {
701 return (com.google.protobuf.ByteString) ref;
702 }
703 }
704
705 private byte memoizedIsInitialized = -1;
706 @java.lang.Override
707 public final boolean isInitialized() {
708 byte isInitialized = memoizedIsInitialized;
709 if (isInitialized == 1) return true;
710 if (isInitialized == 0) return false;
711
712 if (hasBbox()) {
713 if (!getBbox().isInitialized()) {
714 memoizedIsInitialized = 0;
715 return false;
716 }
717 }
718 memoizedIsInitialized = 1;
719 return true;
720 }
721
722 @java.lang.Override
723 public void writeTo(com.google.protobuf.CodedOutputStream output)
724 throws java.io.IOException {
725 if (((bitField0_ & 0x00000001) != 0)) {
726 output.writeMessage(1, getBbox());
727 }
728 for (int i = 0; i < requiredFeatures_.size(); i++) {
729 com.google.protobuf.GeneratedMessageV3.writeString(output, 4, requiredFeatures_.getRaw(i));
730 }
731 for (int i = 0; i < optionalFeatures_.size(); i++) {
732 com.google.protobuf.GeneratedMessageV3.writeString(output, 5, optionalFeatures_.getRaw(i));
733 }
734 if (((bitField0_ & 0x00000002) != 0)) {
735 com.google.protobuf.GeneratedMessageV3.writeString(output, 16, writingprogram_);
736 }
737 if (((bitField0_ & 0x00000004) != 0)) {
738 com.google.protobuf.GeneratedMessageV3.writeString(output, 17, source_);
739 }
740 if (((bitField0_ & 0x00000008) != 0)) {
741 output.writeInt64(32, osmosisReplicationTimestamp_);
742 }
743 if (((bitField0_ & 0x00000010) != 0)) {
744 output.writeInt64(33, osmosisReplicationSequenceNumber_);
745 }
746 if (((bitField0_ & 0x00000020) != 0)) {
747 com.google.protobuf.GeneratedMessageV3.writeString(output, 34, osmosisReplicationBaseUrl_);
748 }
749 unknownFields.writeTo(output);
750 }
751
752 @java.lang.Override
753 public int getSerializedSize() {
754 int size = memoizedSize;
755 if (size != -1) return size;
756
757 size = 0;
758 if (((bitField0_ & 0x00000001) != 0)) {
759 size += com.google.protobuf.CodedOutputStream
760 .computeMessageSize(1, getBbox());
761 }
762 {
763 int dataSize = 0;
764 for (int i = 0; i < requiredFeatures_.size(); i++) {
765 dataSize += computeStringSizeNoTag(requiredFeatures_.getRaw(i));
766 }
767 size += dataSize;
768 size += 1 * getRequiredFeaturesList().size();
769 }
770 {
771 int dataSize = 0;
772 for (int i = 0; i < optionalFeatures_.size(); i++) {
773 dataSize += computeStringSizeNoTag(optionalFeatures_.getRaw(i));
774 }
775 size += dataSize;
776 size += 1 * getOptionalFeaturesList().size();
777 }
778 if (((bitField0_ & 0x00000002) != 0)) {
779 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(16, writingprogram_);
780 }
781 if (((bitField0_ & 0x00000004) != 0)) {
782 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(17, source_);
783 }
784 if (((bitField0_ & 0x00000008) != 0)) {
785 size += com.google.protobuf.CodedOutputStream
786 .computeInt64Size(32, osmosisReplicationTimestamp_);
787 }
788 if (((bitField0_ & 0x00000010) != 0)) {
789 size += com.google.protobuf.CodedOutputStream
790 .computeInt64Size(33, osmosisReplicationSequenceNumber_);
791 }
792 if (((bitField0_ & 0x00000020) != 0)) {
793 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(34, osmosisReplicationBaseUrl_);
794 }
795 size += unknownFields.getSerializedSize();
796 memoizedSize = size;
797 return size;
798 }
799
800 @java.lang.Override
801 public boolean equals(final java.lang.Object obj) {
802 if (obj == this) {
803 return true;
804 }
805 if (!(obj instanceof org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBlock)) {
806 return super.equals(obj);
807 }
808 org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBlock other = (org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBlock) obj;
809
810 if (hasBbox() != other.hasBbox()) return false;
811 if (hasBbox()) {
812 if (!getBbox()
813 .equals(other.getBbox())) return false;
814 }
815 if (!getRequiredFeaturesList()
816 .equals(other.getRequiredFeaturesList())) return false;
817 if (!getOptionalFeaturesList()
818 .equals(other.getOptionalFeaturesList())) return false;
819 if (hasWritingprogram() != other.hasWritingprogram()) return false;
820 if (hasWritingprogram()) {
821 if (!getWritingprogram()
822 .equals(other.getWritingprogram())) return false;
823 }
824 if (hasSource() != other.hasSource()) return false;
825 if (hasSource()) {
826 if (!getSource()
827 .equals(other.getSource())) return false;
828 }
829 if (hasOsmosisReplicationTimestamp() != other.hasOsmosisReplicationTimestamp()) return false;
830 if (hasOsmosisReplicationTimestamp()) {
831 if (getOsmosisReplicationTimestamp()
832 != other.getOsmosisReplicationTimestamp()) return false;
833 }
834 if (hasOsmosisReplicationSequenceNumber() != other.hasOsmosisReplicationSequenceNumber()) return false;
835 if (hasOsmosisReplicationSequenceNumber()) {
836 if (getOsmosisReplicationSequenceNumber()
837 != other.getOsmosisReplicationSequenceNumber()) return false;
838 }
839 if (hasOsmosisReplicationBaseUrl() != other.hasOsmosisReplicationBaseUrl()) return false;
840 if (hasOsmosisReplicationBaseUrl()) {
841 if (!getOsmosisReplicationBaseUrl()
842 .equals(other.getOsmosisReplicationBaseUrl())) return false;
843 }
844 if (!unknownFields.equals(other.unknownFields)) return false;
845 return true;
846 }
847
848 @java.lang.Override
849 public int hashCode() {
850 if (memoizedHashCode != 0) {
851 return memoizedHashCode;
852 }
853 int hash = 41;
854 hash = (19 * hash) + getDescriptor().hashCode();
855 if (hasBbox()) {
856 hash = (37 * hash) + BBOX_FIELD_NUMBER;
857 hash = (53 * hash) + getBbox().hashCode();
858 }
859 if (getRequiredFeaturesCount() > 0) {
860 hash = (37 * hash) + REQUIRED_FEATURES_FIELD_NUMBER;
861 hash = (53 * hash) + getRequiredFeaturesList().hashCode();
862 }
863 if (getOptionalFeaturesCount() > 0) {
864 hash = (37 * hash) + OPTIONAL_FEATURES_FIELD_NUMBER;
865 hash = (53 * hash) + getOptionalFeaturesList().hashCode();
866 }
867 if (hasWritingprogram()) {
868 hash = (37 * hash) + WRITINGPROGRAM_FIELD_NUMBER;
869 hash = (53 * hash) + getWritingprogram().hashCode();
870 }
871 if (hasSource()) {
872 hash = (37 * hash) + SOURCE_FIELD_NUMBER;
873 hash = (53 * hash) + getSource().hashCode();
874 }
875 if (hasOsmosisReplicationTimestamp()) {
876 hash = (37 * hash) + OSMOSIS_REPLICATION_TIMESTAMP_FIELD_NUMBER;
877 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
878 getOsmosisReplicationTimestamp());
879 }
880 if (hasOsmosisReplicationSequenceNumber()) {
881 hash = (37 * hash) + OSMOSIS_REPLICATION_SEQUENCE_NUMBER_FIELD_NUMBER;
882 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
883 getOsmosisReplicationSequenceNumber());
884 }
885 if (hasOsmosisReplicationBaseUrl()) {
886 hash = (37 * hash) + OSMOSIS_REPLICATION_BASE_URL_FIELD_NUMBER;
887 hash = (53 * hash) + getOsmosisReplicationBaseUrl().hashCode();
888 }
889 hash = (29 * hash) + unknownFields.hashCode();
890 memoizedHashCode = hash;
891 return hash;
892 }
893
894 public static org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBlock parseFrom(
895 java.nio.ByteBuffer data)
896 throws com.google.protobuf.InvalidProtocolBufferException {
897 return PARSER.parseFrom(data);
898 }
899 public static org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBlock parseFrom(
900 java.nio.ByteBuffer data,
901 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
902 throws com.google.protobuf.InvalidProtocolBufferException {
903 return PARSER.parseFrom(data, extensionRegistry);
904 }
905 public static org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBlock parseFrom(
906 com.google.protobuf.ByteString data)
907 throws com.google.protobuf.InvalidProtocolBufferException {
908 return PARSER.parseFrom(data);
909 }
910 public static org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBlock parseFrom(
911 com.google.protobuf.ByteString data,
912 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
913 throws com.google.protobuf.InvalidProtocolBufferException {
914 return PARSER.parseFrom(data, extensionRegistry);
915 }
916 public static org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBlock parseFrom(byte[] data)
917 throws com.google.protobuf.InvalidProtocolBufferException {
918 return PARSER.parseFrom(data);
919 }
920 public static org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBlock parseFrom(
921 byte[] data,
922 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
923 throws com.google.protobuf.InvalidProtocolBufferException {
924 return PARSER.parseFrom(data, extensionRegistry);
925 }
926 public static org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBlock parseFrom(java.io.InputStream input)
927 throws java.io.IOException {
928 return com.google.protobuf.GeneratedMessageV3
929 .parseWithIOException(PARSER, input);
930 }
931 public static org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBlock parseFrom(
932 java.io.InputStream input,
933 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
934 throws java.io.IOException {
935 return com.google.protobuf.GeneratedMessageV3
936 .parseWithIOException(PARSER, input, extensionRegistry);
937 }
938 public static org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBlock parseDelimitedFrom(java.io.InputStream input)
939 throws java.io.IOException {
940 return com.google.protobuf.GeneratedMessageV3
941 .parseDelimitedWithIOException(PARSER, input);
942 }
943 public static org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBlock parseDelimitedFrom(
944 java.io.InputStream input,
945 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
946 throws java.io.IOException {
947 return com.google.protobuf.GeneratedMessageV3
948 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
949 }
950 public static org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBlock parseFrom(
951 com.google.protobuf.CodedInputStream input)
952 throws java.io.IOException {
953 return com.google.protobuf.GeneratedMessageV3
954 .parseWithIOException(PARSER, input);
955 }
956 public static org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBlock parseFrom(
957 com.google.protobuf.CodedInputStream input,
958 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
959 throws java.io.IOException {
960 return com.google.protobuf.GeneratedMessageV3
961 .parseWithIOException(PARSER, input, extensionRegistry);
962 }
963
964 @java.lang.Override
965 public Builder newBuilderForType() { return newBuilder(); }
966 public static Builder newBuilder() {
967 return DEFAULT_INSTANCE.toBuilder();
968 }
969 public static Builder newBuilder(org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBlock prototype) {
970 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
971 }
972 @java.lang.Override
973 public Builder toBuilder() {
974 return this == DEFAULT_INSTANCE
975 ? new Builder() : new Builder().mergeFrom(this);
976 }
977
978 @java.lang.Override
979 protected Builder newBuilderForType(
980 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
981 Builder builder = new Builder(parent);
982 return builder;
983 }
984 /**
985 * Protobuf type {@code OSMPBF.HeaderBlock}
986 */
987 public static final class Builder extends
988 com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
989 // @@protoc_insertion_point(builder_implements:OSMPBF.HeaderBlock)
990 org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBlockOrBuilder {
991 public static final com.google.protobuf.Descriptors.Descriptor
992 getDescriptor() {
993 return org.openstreetmap.osmosis.osmbinary.Osmformat.internal_static_OSMPBF_HeaderBlock_descriptor;
994 }
995
996 @java.lang.Override
997 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
998 internalGetFieldAccessorTable() {
999 return org.openstreetmap.osmosis.osmbinary.Osmformat.internal_static_OSMPBF_HeaderBlock_fieldAccessorTable
1000 .ensureFieldAccessorsInitialized(
1001 org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBlock.class, org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBlock.Builder.class);
1002 }
1003
1004 // Construct using org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBlock.newBuilder()
1005 private Builder() {
1006 maybeForceBuilderInitialization();
1007 }
1008
1009 private Builder(
1010 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
1011 super(parent);
1012 maybeForceBuilderInitialization();
1013 }
1014 private void maybeForceBuilderInitialization() {
1015 if (com.google.protobuf.GeneratedMessageV3
1016 .alwaysUseFieldBuilders) {
1017 getBboxFieldBuilder();
1018 }
1019 }
1020 @java.lang.Override
1021 public Builder clear() {
1022 super.clear();
1023 if (bboxBuilder_ == null) {
1024 bbox_ = null;
1025 } else {
1026 bboxBuilder_.clear();
1027 }
1028 bitField0_ = (bitField0_ & ~0x00000001);
1029 requiredFeatures_ = com.google.protobuf.LazyStringArrayList.EMPTY;
1030 bitField0_ = (bitField0_ & ~0x00000002);
1031 optionalFeatures_ = com.google.protobuf.LazyStringArrayList.EMPTY;
1032 bitField0_ = (bitField0_ & ~0x00000004);
1033 writingprogram_ = "";
1034 bitField0_ = (bitField0_ & ~0x00000008);
1035 source_ = "";
1036 bitField0_ = (bitField0_ & ~0x00000010);
1037 osmosisReplicationTimestamp_ = 0L;
1038 bitField0_ = (bitField0_ & ~0x00000020);
1039 osmosisReplicationSequenceNumber_ = 0L;
1040 bitField0_ = (bitField0_ & ~0x00000040);
1041 osmosisReplicationBaseUrl_ = "";
1042 bitField0_ = (bitField0_ & ~0x00000080);
1043 return this;
1044 }
1045
1046 @java.lang.Override
1047 public com.google.protobuf.Descriptors.Descriptor
1048 getDescriptorForType() {
1049 return org.openstreetmap.osmosis.osmbinary.Osmformat.internal_static_OSMPBF_HeaderBlock_descriptor;
1050 }
1051
1052 @java.lang.Override
1053 public org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBlock getDefaultInstanceForType() {
1054 return org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBlock.getDefaultInstance();
1055 }
1056
1057 @java.lang.Override
1058 public org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBlock build() {
1059 org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBlock result = buildPartial();
1060 if (!result.isInitialized()) {
1061 throw newUninitializedMessageException(result);
1062 }
1063 return result;
1064 }
1065
1066 @java.lang.Override
1067 public org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBlock buildPartial() {
1068 org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBlock result = new org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBlock(this);
1069 int from_bitField0_ = bitField0_;
1070 int to_bitField0_ = 0;
1071 if (((from_bitField0_ & 0x00000001) != 0)) {
1072 if (bboxBuilder_ == null) {
1073 result.bbox_ = bbox_;
1074 } else {
1075 result.bbox_ = bboxBuilder_.build();
1076 }
1077 to_bitField0_ |= 0x00000001;
1078 }
1079 if (((bitField0_ & 0x00000002) != 0)) {
1080 requiredFeatures_ = requiredFeatures_.getUnmodifiableView();
1081 bitField0_ = (bitField0_ & ~0x00000002);
1082 }
1083 result.requiredFeatures_ = requiredFeatures_;
1084 if (((bitField0_ & 0x00000004) != 0)) {
1085 optionalFeatures_ = optionalFeatures_.getUnmodifiableView();
1086 bitField0_ = (bitField0_ & ~0x00000004);
1087 }
1088 result.optionalFeatures_ = optionalFeatures_;
1089 if (((from_bitField0_ & 0x00000008) != 0)) {
1090 to_bitField0_ |= 0x00000002;
1091 }
1092 result.writingprogram_ = writingprogram_;
1093 if (((from_bitField0_ & 0x00000010) != 0)) {
1094 to_bitField0_ |= 0x00000004;
1095 }
1096 result.source_ = source_;
1097 if (((from_bitField0_ & 0x00000020) != 0)) {
1098 result.osmosisReplicationTimestamp_ = osmosisReplicationTimestamp_;
1099 to_bitField0_ |= 0x00000008;
1100 }
1101 if (((from_bitField0_ & 0x00000040) != 0)) {
1102 result.osmosisReplicationSequenceNumber_ = osmosisReplicationSequenceNumber_;
1103 to_bitField0_ |= 0x00000010;
1104 }
1105 if (((from_bitField0_ & 0x00000080) != 0)) {
1106 to_bitField0_ |= 0x00000020;
1107 }
1108 result.osmosisReplicationBaseUrl_ = osmosisReplicationBaseUrl_;
1109 result.bitField0_ = to_bitField0_;
1110 onBuilt();
1111 return result;
1112 }
1113
1114 @java.lang.Override
1115 public Builder clone() {
1116 return super.clone();
1117 }
1118 @java.lang.Override
1119 public Builder setField(
1120 com.google.protobuf.Descriptors.FieldDescriptor field,
1121 java.lang.Object value) {
1122 return super.setField(field, value);
1123 }
1124 @java.lang.Override
1125 public Builder clearField(
1126 com.google.protobuf.Descriptors.FieldDescriptor field) {
1127 return super.clearField(field);
1128 }
1129 @java.lang.Override
1130 public Builder clearOneof(
1131 com.google.protobuf.Descriptors.OneofDescriptor oneof) {
1132 return super.clearOneof(oneof);
1133 }
1134 @java.lang.Override
1135 public Builder setRepeatedField(
1136 com.google.protobuf.Descriptors.FieldDescriptor field,
1137 int index, java.lang.Object value) {
1138 return super.setRepeatedField(field, index, value);
1139 }
1140 @java.lang.Override
1141 public Builder addRepeatedField(
1142 com.google.protobuf.Descriptors.FieldDescriptor field,
1143 java.lang.Object value) {
1144 return super.addRepeatedField(field, value);
1145 }
1146 @java.lang.Override
1147 public Builder mergeFrom(com.google.protobuf.Message other) {
1148 if (other instanceof org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBlock) {
1149 return mergeFrom((org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBlock)other);
1150 } else {
1151 super.mergeFrom(other);
1152 return this;
1153 }
1154 }
1155
1156 public Builder mergeFrom(org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBlock other) {
1157 if (other == org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBlock.getDefaultInstance()) return this;
1158 if (other.hasBbox()) {
1159 mergeBbox(other.getBbox());
1160 }
1161 if (!other.requiredFeatures_.isEmpty()) {
1162 if (requiredFeatures_.isEmpty()) {
1163 requiredFeatures_ = other.requiredFeatures_;
1164 bitField0_ = (bitField0_ & ~0x00000002);
1165 } else {
1166 ensureRequiredFeaturesIsMutable();
1167 requiredFeatures_.addAll(other.requiredFeatures_);
1168 }
1169 onChanged();
1170 }
1171 if (!other.optionalFeatures_.isEmpty()) {
1172 if (optionalFeatures_.isEmpty()) {
1173 optionalFeatures_ = other.optionalFeatures_;
1174 bitField0_ = (bitField0_ & ~0x00000004);
1175 } else {
1176 ensureOptionalFeaturesIsMutable();
1177 optionalFeatures_.addAll(other.optionalFeatures_);
1178 }
1179 onChanged();
1180 }
1181 if (other.hasWritingprogram()) {
1182 bitField0_ |= 0x00000008;
1183 writingprogram_ = other.writingprogram_;
1184 onChanged();
1185 }
1186 if (other.hasSource()) {
1187 bitField0_ |= 0x00000010;
1188 source_ = other.source_;
1189 onChanged();
1190 }
1191 if (other.hasOsmosisReplicationTimestamp()) {
1192 setOsmosisReplicationTimestamp(other.getOsmosisReplicationTimestamp());
1193 }
1194 if (other.hasOsmosisReplicationSequenceNumber()) {
1195 setOsmosisReplicationSequenceNumber(other.getOsmosisReplicationSequenceNumber());
1196 }
1197 if (other.hasOsmosisReplicationBaseUrl()) {
1198 bitField0_ |= 0x00000080;
1199 osmosisReplicationBaseUrl_ = other.osmosisReplicationBaseUrl_;
1200 onChanged();
1201 }
1202 this.mergeUnknownFields(other.unknownFields);
1203 onChanged();
1204 return this;
1205 }
1206
1207 @java.lang.Override
1208 public final boolean isInitialized() {
1209 if (hasBbox()) {
1210 if (!getBbox().isInitialized()) {
1211 return false;
1212 }
1213 }
1214 return true;
1215 }
1216
1217 @java.lang.Override
1218 public Builder mergeFrom(
1219 com.google.protobuf.CodedInputStream input,
1220 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1221 throws java.io.IOException {
1222 org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBlock parsedMessage = null;
1223 try {
1224 parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
1225 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1226 parsedMessage = (org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBlock) e.getUnfinishedMessage();
1227 throw e.unwrapIOException();
1228 } finally {
1229 if (parsedMessage != null) {
1230 mergeFrom(parsedMessage);
1231 }
1232 }
1233 return this;
1234 }
1235 private int bitField0_;
1236
1237 private org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox bbox_;
1238 private com.google.protobuf.SingleFieldBuilderV3<
1239 org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox, org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox.Builder, org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBoxOrBuilder> bboxBuilder_;
1240 /**
1241 * <code>optional .OSMPBF.HeaderBBox bbox = 1;</code>
1242 * @return Whether the bbox field is set.
1243 */
1244 public boolean hasBbox() {
1245 return ((bitField0_ & 0x00000001) != 0);
1246 }
1247 /**
1248 * <code>optional .OSMPBF.HeaderBBox bbox = 1;</code>
1249 * @return The bbox.
1250 */
1251 public org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox getBbox() {
1252 if (bboxBuilder_ == null) {
1253 return bbox_ == null ? org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox.getDefaultInstance() : bbox_;
1254 } else {
1255 return bboxBuilder_.getMessage();
1256 }
1257 }
1258 /**
1259 * <code>optional .OSMPBF.HeaderBBox bbox = 1;</code>
1260 */
1261 public Builder setBbox(org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox value) {
1262 if (bboxBuilder_ == null) {
1263 if (value == null) {
1264 throw new NullPointerException();
1265 }
1266 bbox_ = value;
1267 onChanged();
1268 } else {
1269 bboxBuilder_.setMessage(value);
1270 }
1271 bitField0_ |= 0x00000001;
1272 return this;
1273 }
1274 /**
1275 * <code>optional .OSMPBF.HeaderBBox bbox = 1;</code>
1276 */
1277 public Builder setBbox(
1278 org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox.Builder builderForValue) {
1279 if (bboxBuilder_ == null) {
1280 bbox_ = builderForValue.build();
1281 onChanged();
1282 } else {
1283 bboxBuilder_.setMessage(builderForValue.build());
1284 }
1285 bitField0_ |= 0x00000001;
1286 return this;
1287 }
1288 /**
1289 * <code>optional .OSMPBF.HeaderBBox bbox = 1;</code>
1290 */
1291 public Builder mergeBbox(org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox value) {
1292 if (bboxBuilder_ == null) {
1293 if (((bitField0_ & 0x00000001) != 0) &&
1294 bbox_ != null &&
1295 bbox_ != org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox.getDefaultInstance()) {
1296 bbox_ =
1297 org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox.newBuilder(bbox_).mergeFrom(value).buildPartial();
1298 } else {
1299 bbox_ = value;
1300 }
1301 onChanged();
1302 } else {
1303 bboxBuilder_.mergeFrom(value);
1304 }
1305 bitField0_ |= 0x00000001;
1306 return this;
1307 }
1308 /**
1309 * <code>optional .OSMPBF.HeaderBBox bbox = 1;</code>
1310 */
1311 public Builder clearBbox() {
1312 if (bboxBuilder_ == null) {
1313 bbox_ = null;
1314 onChanged();
1315 } else {
1316 bboxBuilder_.clear();
1317 }
1318 bitField0_ = (bitField0_ & ~0x00000001);
1319 return this;
1320 }
1321 /**
1322 * <code>optional .OSMPBF.HeaderBBox bbox = 1;</code>
1323 */
1324 public org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox.Builder getBboxBuilder() {
1325 bitField0_ |= 0x00000001;
1326 onChanged();
1327 return getBboxFieldBuilder().getBuilder();
1328 }
1329 /**
1330 * <code>optional .OSMPBF.HeaderBBox bbox = 1;</code>
1331 */
1332 public org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBoxOrBuilder getBboxOrBuilder() {
1333 if (bboxBuilder_ != null) {
1334 return bboxBuilder_.getMessageOrBuilder();
1335 } else {
1336 return bbox_ == null ?
1337 org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox.getDefaultInstance() : bbox_;
1338 }
1339 }
1340 /**
1341 * <code>optional .OSMPBF.HeaderBBox bbox = 1;</code>
1342 */
1343 private com.google.protobuf.SingleFieldBuilderV3<
1344 org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox, org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox.Builder, org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBoxOrBuilder>
1345 getBboxFieldBuilder() {
1346 if (bboxBuilder_ == null) {
1347 bboxBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
1348 org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox, org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox.Builder, org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBoxOrBuilder>(
1349 getBbox(),
1350 getParentForChildren(),
1351 isClean());
1352 bbox_ = null;
1353 }
1354 return bboxBuilder_;
1355 }
1356
1357 private com.google.protobuf.LazyStringList requiredFeatures_ = com.google.protobuf.LazyStringArrayList.EMPTY;
1358 private void ensureRequiredFeaturesIsMutable() {
1359 if (!((bitField0_ & 0x00000002) != 0)) {
1360 requiredFeatures_ = new com.google.protobuf.LazyStringArrayList(requiredFeatures_);
1361 bitField0_ |= 0x00000002;
1362 }
1363 }
1364 /**
1365 * <pre>
1366 * Additional tags to aid in parsing this dataset
1367 * </pre>
1368 *
1369 * <code>repeated string required_features = 4;</code>
1370 * @return A list containing the requiredFeatures.
1371 */
1372 public com.google.protobuf.ProtocolStringList
1373 getRequiredFeaturesList() {
1374 return requiredFeatures_.getUnmodifiableView();
1375 }
1376 /**
1377 * <pre>
1378 * Additional tags to aid in parsing this dataset
1379 * </pre>
1380 *
1381 * <code>repeated string required_features = 4;</code>
1382 * @return The count of requiredFeatures.
1383 */
1384 public int getRequiredFeaturesCount() {
1385 return requiredFeatures_.size();
1386 }
1387 /**
1388 * <pre>
1389 * Additional tags to aid in parsing this dataset
1390 * </pre>
1391 *
1392 * <code>repeated string required_features = 4;</code>
1393 * @param index The index of the element to return.
1394 * @return The requiredFeatures at the given index.
1395 */
1396 public java.lang.String getRequiredFeatures(int index) {
1397 return requiredFeatures_.get(index);
1398 }
1399 /**
1400 * <pre>
1401 * Additional tags to aid in parsing this dataset
1402 * </pre>
1403 *
1404 * <code>repeated string required_features = 4;</code>
1405 * @param index The index of the value to return.
1406 * @return The bytes of the requiredFeatures at the given index.
1407 */
1408 public com.google.protobuf.ByteString
1409 getRequiredFeaturesBytes(int index) {
1410 return requiredFeatures_.getByteString(index);
1411 }
1412 /**
1413 * <pre>
1414 * Additional tags to aid in parsing this dataset
1415 * </pre>
1416 *
1417 * <code>repeated string required_features = 4;</code>
1418 * @param index The index to set the value at.
1419 * @param value The requiredFeatures to set.
1420 * @return This builder for chaining.
1421 */
1422 public Builder setRequiredFeatures(
1423 int index, java.lang.String value) {
1424 if (value == null) {
1425 throw new NullPointerException();
1426 }
1427 ensureRequiredFeaturesIsMutable();
1428 requiredFeatures_.set(index, value);
1429 onChanged();
1430 return this;
1431 }
1432 /**
1433 * <pre>
1434 * Additional tags to aid in parsing this dataset
1435 * </pre>
1436 *
1437 * <code>repeated string required_features = 4;</code>
1438 * @param value The requiredFeatures to add.
1439 * @return This builder for chaining.
1440 */
1441 public Builder addRequiredFeatures(
1442 java.lang.String value) {
1443 if (value == null) {
1444 throw new NullPointerException();
1445 }
1446 ensureRequiredFeaturesIsMutable();
1447 requiredFeatures_.add(value);
1448 onChanged();
1449 return this;
1450 }
1451 /**
1452 * <pre>
1453 * Additional tags to aid in parsing this dataset
1454 * </pre>
1455 *
1456 * <code>repeated string required_features = 4;</code>
1457 * @param values The requiredFeatures to add.
1458 * @return This builder for chaining.
1459 */
1460 public Builder addAllRequiredFeatures(
1461 java.lang.Iterable<java.lang.String> values) {
1462 ensureRequiredFeaturesIsMutable();
1463 com.google.protobuf.AbstractMessageLite.Builder.addAll(
1464 values, requiredFeatures_);
1465 onChanged();
1466 return this;
1467 }
1468 /**
1469 * <pre>
1470 * Additional tags to aid in parsing this dataset
1471 * </pre>
1472 *
1473 * <code>repeated string required_features = 4;</code>
1474 * @return This builder for chaining.
1475 */
1476 public Builder clearRequiredFeatures() {
1477 requiredFeatures_ = com.google.protobuf.LazyStringArrayList.EMPTY;
1478 bitField0_ = (bitField0_ & ~0x00000002);
1479 onChanged();
1480 return this;
1481 }
1482 /**
1483 * <pre>
1484 * Additional tags to aid in parsing this dataset
1485 * </pre>
1486 *
1487 * <code>repeated string required_features = 4;</code>
1488 * @param value The bytes of the requiredFeatures to add.
1489 * @return This builder for chaining.
1490 */
1491 public Builder addRequiredFeaturesBytes(
1492 com.google.protobuf.ByteString value) {
1493 if (value == null) {
1494 throw new NullPointerException();
1495 }
1496 ensureRequiredFeaturesIsMutable();
1497 requiredFeatures_.add(value);
1498 onChanged();
1499 return this;
1500 }
1501
1502 private com.google.protobuf.LazyStringList optionalFeatures_ = com.google.protobuf.LazyStringArrayList.EMPTY;
1503 private void ensureOptionalFeaturesIsMutable() {
1504 if (!((bitField0_ & 0x00000004) != 0)) {
1505 optionalFeatures_ = new com.google.protobuf.LazyStringArrayList(optionalFeatures_);
1506 bitField0_ |= 0x00000004;
1507 }
1508 }
1509 /**
1510 * <code>repeated string optional_features = 5;</code>
1511 * @return A list containing the optionalFeatures.
1512 */
1513 public com.google.protobuf.ProtocolStringList
1514 getOptionalFeaturesList() {
1515 return optionalFeatures_.getUnmodifiableView();
1516 }
1517 /**
1518 * <code>repeated string optional_features = 5;</code>
1519 * @return The count of optionalFeatures.
1520 */
1521 public int getOptionalFeaturesCount() {
1522 return optionalFeatures_.size();
1523 }
1524 /**
1525 * <code>repeated string optional_features = 5;</code>
1526 * @param index The index of the element to return.
1527 * @return The optionalFeatures at the given index.
1528 */
1529 public java.lang.String getOptionalFeatures(int index) {
1530 return optionalFeatures_.get(index);
1531 }
1532 /**
1533 * <code>repeated string optional_features = 5;</code>
1534 * @param index The index of the value to return.
1535 * @return The bytes of the optionalFeatures at the given index.
1536 */
1537 public com.google.protobuf.ByteString
1538 getOptionalFeaturesBytes(int index) {
1539 return optionalFeatures_.getByteString(index);
1540 }
1541 /**
1542 * <code>repeated string optional_features = 5;</code>
1543 * @param index The index to set the value at.
1544 * @param value The optionalFeatures to set.
1545 * @return This builder for chaining.
1546 */
1547 public Builder setOptionalFeatures(
1548 int index, java.lang.String value) {
1549 if (value == null) {
1550 throw new NullPointerException();
1551 }
1552 ensureOptionalFeaturesIsMutable();
1553 optionalFeatures_.set(index, value);
1554 onChanged();
1555 return this;
1556 }
1557 /**
1558 * <code>repeated string optional_features = 5;</code>
1559 * @param value The optionalFeatures to add.
1560 * @return This builder for chaining.
1561 */
1562 public Builder addOptionalFeatures(
1563 java.lang.String value) {
1564 if (value == null) {
1565 throw new NullPointerException();
1566 }
1567 ensureOptionalFeaturesIsMutable();
1568 optionalFeatures_.add(value);
1569 onChanged();
1570 return this;
1571 }
1572 /**
1573 * <code>repeated string optional_features = 5;</code>
1574 * @param values The optionalFeatures to add.
1575 * @return This builder for chaining.
1576 */
1577 public Builder addAllOptionalFeatures(
1578 java.lang.Iterable<java.lang.String> values) {
1579 ensureOptionalFeaturesIsMutable();
1580 com.google.protobuf.AbstractMessageLite.Builder.addAll(
1581 values, optionalFeatures_);
1582 onChanged();
1583 return this;
1584 }
1585 /**
1586 * <code>repeated string optional_features = 5;</code>
1587 * @return This builder for chaining.
1588 */
1589 public Builder clearOptionalFeatures() {
1590 optionalFeatures_ = com.google.protobuf.LazyStringArrayList.EMPTY;
1591 bitField0_ = (bitField0_ & ~0x00000004);
1592 onChanged();
1593 return this;
1594 }
1595 /**
1596 * <code>repeated string optional_features = 5;</code>
1597 * @param value The bytes of the optionalFeatures to add.
1598 * @return This builder for chaining.
1599 */
1600 public Builder addOptionalFeaturesBytes(
1601 com.google.protobuf.ByteString value) {
1602 if (value == null) {
1603 throw new NullPointerException();
1604 }
1605 ensureOptionalFeaturesIsMutable();
1606 optionalFeatures_.add(value);
1607 onChanged();
1608 return this;
1609 }
1610
1611 private java.lang.Object writingprogram_ = "";
1612 /**
1613 * <code>optional string writingprogram = 16;</code>
1614 * @return Whether the writingprogram field is set.
1615 */
1616 public boolean hasWritingprogram() {
1617 return ((bitField0_ & 0x00000008) != 0);
1618 }
1619 /**
1620 * <code>optional string writingprogram = 16;</code>
1621 * @return The writingprogram.
1622 */
1623 public java.lang.String getWritingprogram() {
1624 java.lang.Object ref = writingprogram_;
1625 if (!(ref instanceof java.lang.String)) {
1626 com.google.protobuf.ByteString bs =
1627 (com.google.protobuf.ByteString) ref;
1628 java.lang.String s = bs.toStringUtf8();
1629 if (bs.isValidUtf8()) {
1630 writingprogram_ = s;
1631 }
1632 return s;
1633 } else {
1634 return (java.lang.String) ref;
1635 }
1636 }
1637 /**
1638 * <code>optional string writingprogram = 16;</code>
1639 * @return The bytes for writingprogram.
1640 */
1641 public com.google.protobuf.ByteString
1642 getWritingprogramBytes() {
1643 java.lang.Object ref = writingprogram_;
1644 if (ref instanceof String) {
1645 com.google.protobuf.ByteString b =
1646 com.google.protobuf.ByteString.copyFromUtf8(
1647 (java.lang.String) ref);
1648 writingprogram_ = b;
1649 return b;
1650 } else {
1651 return (com.google.protobuf.ByteString) ref;
1652 }
1653 }
1654 /**
1655 * <code>optional string writingprogram = 16;</code>
1656 * @param value The writingprogram to set.
1657 * @return This builder for chaining.
1658 */
1659 public Builder setWritingprogram(
1660 java.lang.String value) {
1661 if (value == null) {
1662 throw new NullPointerException();
1663 }
1664 bitField0_ |= 0x00000008;
1665 writingprogram_ = value;
1666 onChanged();
1667 return this;
1668 }
1669 /**
1670 * <code>optional string writingprogram = 16;</code>
1671 * @return This builder for chaining.
1672 */
1673 public Builder clearWritingprogram() {
1674 bitField0_ = (bitField0_ & ~0x00000008);
1675 writingprogram_ = getDefaultInstance().getWritingprogram();
1676 onChanged();
1677 return this;
1678 }
1679 /**
1680 * <code>optional string writingprogram = 16;</code>
1681 * @param value The bytes for writingprogram to set.
1682 * @return This builder for chaining.
1683 */
1684 public Builder setWritingprogramBytes(
1685 com.google.protobuf.ByteString value) {
1686 if (value == null) {
1687 throw new NullPointerException();
1688 }
1689 bitField0_ |= 0x00000008;
1690 writingprogram_ = value;
1691 onChanged();
1692 return this;
1693 }
1694
1695 private java.lang.Object source_ = "";
1696 /**
1697 * <pre>
1698 * From the bbox field.
1699 * </pre>
1700 *
1701 * <code>optional string source = 17;</code>
1702 * @return Whether the source field is set.
1703 */
1704 public boolean hasSource() {
1705 return ((bitField0_ & 0x00000010) != 0);
1706 }
1707 /**
1708 * <pre>
1709 * From the bbox field.
1710 * </pre>
1711 *
1712 * <code>optional string source = 17;</code>
1713 * @return The source.
1714 */
1715 public java.lang.String getSource() {
1716 java.lang.Object ref = source_;
1717 if (!(ref instanceof java.lang.String)) {
1718 com.google.protobuf.ByteString bs =
1719 (com.google.protobuf.ByteString) ref;
1720 java.lang.String s = bs.toStringUtf8();
1721 if (bs.isValidUtf8()) {
1722 source_ = s;
1723 }
1724 return s;
1725 } else {
1726 return (java.lang.String) ref;
1727 }
1728 }
1729 /**
1730 * <pre>
1731 * From the bbox field.
1732 * </pre>
1733 *
1734 * <code>optional string source = 17;</code>
1735 * @return The bytes for source.
1736 */
1737 public com.google.protobuf.ByteString
1738 getSourceBytes() {
1739 java.lang.Object ref = source_;
1740 if (ref instanceof String) {
1741 com.google.protobuf.ByteString b =
1742 com.google.protobuf.ByteString.copyFromUtf8(
1743 (java.lang.String) ref);
1744 source_ = b;
1745 return b;
1746 } else {
1747 return (com.google.protobuf.ByteString) ref;
1748 }
1749 }
1750 /**
1751 * <pre>
1752 * From the bbox field.
1753 * </pre>
1754 *
1755 * <code>optional string source = 17;</code>
1756 * @param value The source to set.
1757 * @return This builder for chaining.
1758 */
1759 public Builder setSource(
1760 java.lang.String value) {
1761 if (value == null) {
1762 throw new NullPointerException();
1763 }
1764 bitField0_ |= 0x00000010;
1765 source_ = value;
1766 onChanged();
1767 return this;
1768 }
1769 /**
1770 * <pre>
1771 * From the bbox field.
1772 * </pre>
1773 *
1774 * <code>optional string source = 17;</code>
1775 * @return This builder for chaining.
1776 */
1777 public Builder clearSource() {
1778 bitField0_ = (bitField0_ & ~0x00000010);
1779 source_ = getDefaultInstance().getSource();
1780 onChanged();
1781 return this;
1782 }
1783 /**
1784 * <pre>
1785 * From the bbox field.
1786 * </pre>
1787 *
1788 * <code>optional string source = 17;</code>
1789 * @param value The bytes for source to set.
1790 * @return This builder for chaining.
1791 */
1792 public Builder setSourceBytes(
1793 com.google.protobuf.ByteString value) {
1794 if (value == null) {
1795 throw new NullPointerException();
1796 }
1797 bitField0_ |= 0x00000010;
1798 source_ = value;
1799 onChanged();
1800 return this;
1801 }
1802
1803 private long osmosisReplicationTimestamp_ ;
1804 /**
1805 * <pre>
1806 * replication timestamp, expressed in seconds since the epoch,
1807 * otherwise the same value as in the "timestamp=..." field
1808 * in the state.txt file used by Osmosis
1809 * </pre>
1810 *
1811 * <code>optional int64 osmosis_replication_timestamp = 32;</code>
1812 * @return Whether the osmosisReplicationTimestamp field is set.
1813 */
1814 @java.lang.Override
1815 public boolean hasOsmosisReplicationTimestamp() {
1816 return ((bitField0_ & 0x00000020) != 0);
1817 }
1818 /**
1819 * <pre>
1820 * replication timestamp, expressed in seconds since the epoch,
1821 * otherwise the same value as in the "timestamp=..." field
1822 * in the state.txt file used by Osmosis
1823 * </pre>
1824 *
1825 * <code>optional int64 osmosis_replication_timestamp = 32;</code>
1826 * @return The osmosisReplicationTimestamp.
1827 */
1828 @java.lang.Override
1829 public long getOsmosisReplicationTimestamp() {
1830 return osmosisReplicationTimestamp_;
1831 }
1832 /**
1833 * <pre>
1834 * replication timestamp, expressed in seconds since the epoch,
1835 * otherwise the same value as in the "timestamp=..." field
1836 * in the state.txt file used by Osmosis
1837 * </pre>
1838 *
1839 * <code>optional int64 osmosis_replication_timestamp = 32;</code>
1840 * @param value The osmosisReplicationTimestamp to set.
1841 * @return This builder for chaining.
1842 */
1843 public Builder setOsmosisReplicationTimestamp(long value) {
1844 bitField0_ |= 0x00000020;
1845 osmosisReplicationTimestamp_ = value;
1846 onChanged();
1847 return this;
1848 }
1849 /**
1850 * <pre>
1851 * replication timestamp, expressed in seconds since the epoch,
1852 * otherwise the same value as in the "timestamp=..." field
1853 * in the state.txt file used by Osmosis
1854 * </pre>
1855 *
1856 * <code>optional int64 osmosis_replication_timestamp = 32;</code>
1857 * @return This builder for chaining.
1858 */
1859 public Builder clearOsmosisReplicationTimestamp() {
1860 bitField0_ = (bitField0_ & ~0x00000020);
1861 osmosisReplicationTimestamp_ = 0L;
1862 onChanged();
1863 return this;
1864 }
1865
1866 private long osmosisReplicationSequenceNumber_ ;
1867 /**
1868 * <pre>
1869 * replication sequence number (sequenceNumber in state.txt)
1870 * </pre>
1871 *
1872 * <code>optional int64 osmosis_replication_sequence_number = 33;</code>
1873 * @return Whether the osmosisReplicationSequenceNumber field is set.
1874 */
1875 @java.lang.Override
1876 public boolean hasOsmosisReplicationSequenceNumber() {
1877 return ((bitField0_ & 0x00000040) != 0);
1878 }
1879 /**
1880 * <pre>
1881 * replication sequence number (sequenceNumber in state.txt)
1882 * </pre>
1883 *
1884 * <code>optional int64 osmosis_replication_sequence_number = 33;</code>
1885 * @return The osmosisReplicationSequenceNumber.
1886 */
1887 @java.lang.Override
1888 public long getOsmosisReplicationSequenceNumber() {
1889 return osmosisReplicationSequenceNumber_;
1890 }
1891 /**
1892 * <pre>
1893 * replication sequence number (sequenceNumber in state.txt)
1894 * </pre>
1895 *
1896 * <code>optional int64 osmosis_replication_sequence_number = 33;</code>
1897 * @param value The osmosisReplicationSequenceNumber to set.
1898 * @return This builder for chaining.
1899 */
1900 public Builder setOsmosisReplicationSequenceNumber(long value) {
1901 bitField0_ |= 0x00000040;
1902 osmosisReplicationSequenceNumber_ = value;
1903 onChanged();
1904 return this;
1905 }
1906 /**
1907 * <pre>
1908 * replication sequence number (sequenceNumber in state.txt)
1909 * </pre>
1910 *
1911 * <code>optional int64 osmosis_replication_sequence_number = 33;</code>
1912 * @return This builder for chaining.
1913 */
1914 public Builder clearOsmosisReplicationSequenceNumber() {
1915 bitField0_ = (bitField0_ & ~0x00000040);
1916 osmosisReplicationSequenceNumber_ = 0L;
1917 onChanged();
1918 return this;
1919 }
1920
1921 private java.lang.Object osmosisReplicationBaseUrl_ = "";
1922 /**
1923 * <pre>
1924 * replication base URL (from Osmosis' configuration.txt file)
1925 * </pre>
1926 *
1927 * <code>optional string osmosis_replication_base_url = 34;</code>
1928 * @return Whether the osmosisReplicationBaseUrl field is set.
1929 */
1930 public boolean hasOsmosisReplicationBaseUrl() {
1931 return ((bitField0_ & 0x00000080) != 0);
1932 }
1933 /**
1934 * <pre>
1935 * replication base URL (from Osmosis' configuration.txt file)
1936 * </pre>
1937 *
1938 * <code>optional string osmosis_replication_base_url = 34;</code>
1939 * @return The osmosisReplicationBaseUrl.
1940 */
1941 public java.lang.String getOsmosisReplicationBaseUrl() {
1942 java.lang.Object ref = osmosisReplicationBaseUrl_;
1943 if (!(ref instanceof java.lang.String)) {
1944 com.google.protobuf.ByteString bs =
1945 (com.google.protobuf.ByteString) ref;
1946 java.lang.String s = bs.toStringUtf8();
1947 if (bs.isValidUtf8()) {
1948 osmosisReplicationBaseUrl_ = s;
1949 }
1950 return s;
1951 } else {
1952 return (java.lang.String) ref;
1953 }
1954 }
1955 /**
1956 * <pre>
1957 * replication base URL (from Osmosis' configuration.txt file)
1958 * </pre>
1959 *
1960 * <code>optional string osmosis_replication_base_url = 34;</code>
1961 * @return The bytes for osmosisReplicationBaseUrl.
1962 */
1963 public com.google.protobuf.ByteString
1964 getOsmosisReplicationBaseUrlBytes() {
1965 java.lang.Object ref = osmosisReplicationBaseUrl_;
1966 if (ref instanceof String) {
1967 com.google.protobuf.ByteString b =
1968 com.google.protobuf.ByteString.copyFromUtf8(
1969 (java.lang.String) ref);
1970 osmosisReplicationBaseUrl_ = b;
1971 return b;
1972 } else {
1973 return (com.google.protobuf.ByteString) ref;
1974 }
1975 }
1976 /**
1977 * <pre>
1978 * replication base URL (from Osmosis' configuration.txt file)
1979 * </pre>
1980 *
1981 * <code>optional string osmosis_replication_base_url = 34;</code>
1982 * @param value The osmosisReplicationBaseUrl to set.
1983 * @return This builder for chaining.
1984 */
1985 public Builder setOsmosisReplicationBaseUrl(
1986 java.lang.String value) {
1987 if (value == null) {
1988 throw new NullPointerException();
1989 }
1990 bitField0_ |= 0x00000080;
1991 osmosisReplicationBaseUrl_ = value;
1992 onChanged();
1993 return this;
1994 }
1995 /**
1996 * <pre>
1997 * replication base URL (from Osmosis' configuration.txt file)
1998 * </pre>
1999 *
2000 * <code>optional string osmosis_replication_base_url = 34;</code>
2001 * @return This builder for chaining.
2002 */
2003 public Builder clearOsmosisReplicationBaseUrl() {
2004 bitField0_ = (bitField0_ & ~0x00000080);
2005 osmosisReplicationBaseUrl_ = getDefaultInstance().getOsmosisReplicationBaseUrl();
2006 onChanged();
2007 return this;
2008 }
2009 /**
2010 * <pre>
2011 * replication base URL (from Osmosis' configuration.txt file)
2012 * </pre>
2013 *
2014 * <code>optional string osmosis_replication_base_url = 34;</code>
2015 * @param value The bytes for osmosisReplicationBaseUrl to set.
2016 * @return This builder for chaining.
2017 */
2018 public Builder setOsmosisReplicationBaseUrlBytes(
2019 com.google.protobuf.ByteString value) {
2020 if (value == null) {
2021 throw new NullPointerException();
2022 }
2023 bitField0_ |= 0x00000080;
2024 osmosisReplicationBaseUrl_ = value;
2025 onChanged();
2026 return this;
2027 }
2028 @java.lang.Override
2029 public final Builder setUnknownFields(
2030 final com.google.protobuf.UnknownFieldSet unknownFields) {
2031 return super.setUnknownFields(unknownFields);
2032 }
2033
2034 @java.lang.Override
2035 public final Builder mergeUnknownFields(
2036 final com.google.protobuf.UnknownFieldSet unknownFields) {
2037 return super.mergeUnknownFields(unknownFields);
2038 }
2039
2040
2041 // @@protoc_insertion_point(builder_scope:OSMPBF.HeaderBlock)
2042 }
2043
2044 // @@protoc_insertion_point(class_scope:OSMPBF.HeaderBlock)
2045 private static final org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBlock DEFAULT_INSTANCE;
2046 static {
2047 DEFAULT_INSTANCE = new org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBlock();
2048 }
2049
2050 public static org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBlock getDefaultInstance() {
2051 return DEFAULT_INSTANCE;
2052 }
2053
2054 @java.lang.Deprecated public static final com.google.protobuf.Parser<HeaderBlock>
2055 PARSER = new com.google.protobuf.AbstractParser<HeaderBlock>() {
2056 @java.lang.Override
2057 public HeaderBlock parsePartialFrom(
2058 com.google.protobuf.CodedInputStream input,
2059 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2060 throws com.google.protobuf.InvalidProtocolBufferException {
2061 return new HeaderBlock(input, extensionRegistry);
2062 }
2063 };
2064
2065 public static com.google.protobuf.Parser<HeaderBlock> parser() {
2066 return PARSER;
2067 }
2068
2069 @java.lang.Override
2070 public com.google.protobuf.Parser<HeaderBlock> getParserForType() {
2071 return PARSER;
2072 }
2073
2074 @java.lang.Override
2075 public org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBlock getDefaultInstanceForType() {
2076 return DEFAULT_INSTANCE;
2077 }
2078
2079 }
2080
2081 public interface HeaderBBoxOrBuilder extends
2082 // @@protoc_insertion_point(interface_extends:OSMPBF.HeaderBBox)
2083 com.google.protobuf.MessageOrBuilder {
2084
2085 /**
2086 * <code>required sint64 left = 1;</code>
2087 * @return Whether the left field is set.
2088 */
2089 boolean hasLeft();
2090 /**
2091 * <code>required sint64 left = 1;</code>
2092 * @return The left.
2093 */
2094 long getLeft();
2095
2096 /**
2097 * <code>required sint64 right = 2;</code>
2098 * @return Whether the right field is set.
2099 */
2100 boolean hasRight();
2101 /**
2102 * <code>required sint64 right = 2;</code>
2103 * @return The right.
2104 */
2105 long getRight();
2106
2107 /**
2108 * <code>required sint64 top = 3;</code>
2109 * @return Whether the top field is set.
2110 */
2111 boolean hasTop();
2112 /**
2113 * <code>required sint64 top = 3;</code>
2114 * @return The top.
2115 */
2116 long getTop();
2117
2118 /**
2119 * <code>required sint64 bottom = 4;</code>
2120 * @return Whether the bottom field is set.
2121 */
2122 boolean hasBottom();
2123 /**
2124 * <code>required sint64 bottom = 4;</code>
2125 * @return The bottom.
2126 */
2127 long getBottom();
2128 }
2129 /**
2130 * Protobuf type {@code OSMPBF.HeaderBBox}
2131 */
2132 public static final class HeaderBBox extends
2133 com.google.protobuf.GeneratedMessageV3 implements
2134 // @@protoc_insertion_point(message_implements:OSMPBF.HeaderBBox)
2135 HeaderBBoxOrBuilder {
2136 private static final long serialVersionUID = 0L;
2137 // Use HeaderBBox.newBuilder() to construct.
2138 private HeaderBBox(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
2139 super(builder);
2140 }
2141 private HeaderBBox() {
2142 }
2143
2144 @java.lang.Override
2145 @SuppressWarnings({"unused"})
2146 protected java.lang.Object newInstance(
2147 UnusedPrivateParameter unused) {
2148 return new HeaderBBox();
2149 }
2150
2151 @java.lang.Override
2152 public final com.google.protobuf.UnknownFieldSet
2153 getUnknownFields() {
2154 return this.unknownFields;
2155 }
2156 private HeaderBBox(
2157 com.google.protobuf.CodedInputStream input,
2158 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2159 throws com.google.protobuf.InvalidProtocolBufferException {
2160 this();
2161 if (extensionRegistry == null) {
2162 throw new java.lang.NullPointerException();
2163 }
2164 int mutable_bitField0_ = 0;
2165 com.google.protobuf.UnknownFieldSet.Builder unknownFields =
2166 com.google.protobuf.UnknownFieldSet.newBuilder();
2167 try {
2168 boolean done = false;
2169 while (!done) {
2170 int tag = input.readTag();
2171 switch (tag) {
2172 case 0:
2173 done = true;
2174 break;
2175 case 8: {
2176 bitField0_ |= 0x00000001;
2177 left_ = input.readSInt64();
2178 break;
2179 }
2180 case 16: {
2181 bitField0_ |= 0x00000002;
2182 right_ = input.readSInt64();
2183 break;
2184 }
2185 case 24: {
2186 bitField0_ |= 0x00000004;
2187 top_ = input.readSInt64();
2188 break;
2189 }
2190 case 32: {
2191 bitField0_ |= 0x00000008;
2192 bottom_ = input.readSInt64();
2193 break;
2194 }
2195 default: {
2196 if (!parseUnknownField(
2197 input, unknownFields, extensionRegistry, tag)) {
2198 done = true;
2199 }
2200 break;
2201 }
2202 }
2203 }
2204 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
2205 throw e.setUnfinishedMessage(this);
2206 } catch (java.io.IOException e) {
2207 throw new com.google.protobuf.InvalidProtocolBufferException(
2208 e).setUnfinishedMessage(this);
2209 } finally {
2210 this.unknownFields = unknownFields.build();
2211 makeExtensionsImmutable();
2212 }
2213 }
2214 public static final com.google.protobuf.Descriptors.Descriptor
2215 getDescriptor() {
2216 return org.openstreetmap.osmosis.osmbinary.Osmformat.internal_static_OSMPBF_HeaderBBox_descriptor;
2217 }
2218
2219 @java.lang.Override
2220 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
2221 internalGetFieldAccessorTable() {
2222 return org.openstreetmap.osmosis.osmbinary.Osmformat.internal_static_OSMPBF_HeaderBBox_fieldAccessorTable
2223 .ensureFieldAccessorsInitialized(
2224 org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox.class, org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox.Builder.class);
2225 }
2226
2227 private int bitField0_;
2228 public static final int LEFT_FIELD_NUMBER = 1;
2229 private long left_;
2230 /**
2231 * <code>required sint64 left = 1;</code>
2232 * @return Whether the left field is set.
2233 */
2234 @java.lang.Override
2235 public boolean hasLeft() {
2236 return ((bitField0_ & 0x00000001) != 0);
2237 }
2238 /**
2239 * <code>required sint64 left = 1;</code>
2240 * @return The left.
2241 */
2242 @java.lang.Override
2243 public long getLeft() {
2244 return left_;
2245 }
2246
2247 public static final int RIGHT_FIELD_NUMBER = 2;
2248 private long right_;
2249 /**
2250 * <code>required sint64 right = 2;</code>
2251 * @return Whether the right field is set.
2252 */
2253 @java.lang.Override
2254 public boolean hasRight() {
2255 return ((bitField0_ & 0x00000002) != 0);
2256 }
2257 /**
2258 * <code>required sint64 right = 2;</code>
2259 * @return The right.
2260 */
2261 @java.lang.Override
2262 public long getRight() {
2263 return right_;
2264 }
2265
2266 public static final int TOP_FIELD_NUMBER = 3;
2267 private long top_;
2268 /**
2269 * <code>required sint64 top = 3;</code>
2270 * @return Whether the top field is set.
2271 */
2272 @java.lang.Override
2273 public boolean hasTop() {
2274 return ((bitField0_ & 0x00000004) != 0);
2275 }
2276 /**
2277 * <code>required sint64 top = 3;</code>
2278 * @return The top.
2279 */
2280 @java.lang.Override
2281 public long getTop() {
2282 return top_;
2283 }
2284
2285 public static final int BOTTOM_FIELD_NUMBER = 4;
2286 private long bottom_;
2287 /**
2288 * <code>required sint64 bottom = 4;</code>
2289 * @return Whether the bottom field is set.
2290 */
2291 @java.lang.Override
2292 public boolean hasBottom() {
2293 return ((bitField0_ & 0x00000008) != 0);
2294 }
2295 /**
2296 * <code>required sint64 bottom = 4;</code>
2297 * @return The bottom.
2298 */
2299 @java.lang.Override
2300 public long getBottom() {
2301 return bottom_;
2302 }
2303
2304 private byte memoizedIsInitialized = -1;
2305 @java.lang.Override
2306 public final boolean isInitialized() {
2307 byte isInitialized = memoizedIsInitialized;
2308 if (isInitialized == 1) return true;
2309 if (isInitialized == 0) return false;
2310
2311 if (!hasLeft()) {
2312 memoizedIsInitialized = 0;
2313 return false;
2314 }
2315 if (!hasRight()) {
2316 memoizedIsInitialized = 0;
2317 return false;
2318 }
2319 if (!hasTop()) {
2320 memoizedIsInitialized = 0;
2321 return false;
2322 }
2323 if (!hasBottom()) {
2324 memoizedIsInitialized = 0;
2325 return false;
2326 }
2327 memoizedIsInitialized = 1;
2328 return true;
2329 }
2330
2331 @java.lang.Override
2332 public void writeTo(com.google.protobuf.CodedOutputStream output)
2333 throws java.io.IOException {
2334 if (((bitField0_ & 0x00000001) != 0)) {
2335 output.writeSInt64(1, left_);
2336 }
2337 if (((bitField0_ & 0x00000002) != 0)) {
2338 output.writeSInt64(2, right_);
2339 }
2340 if (((bitField0_ & 0x00000004) != 0)) {
2341 output.writeSInt64(3, top_);
2342 }
2343 if (((bitField0_ & 0x00000008) != 0)) {
2344 output.writeSInt64(4, bottom_);
2345 }
2346 unknownFields.writeTo(output);
2347 }
2348
2349 @java.lang.Override
2350 public int getSerializedSize() {
2351 int size = memoizedSize;
2352 if (size != -1) return size;
2353
2354 size = 0;
2355 if (((bitField0_ & 0x00000001) != 0)) {
2356 size += com.google.protobuf.CodedOutputStream
2357 .computeSInt64Size(1, left_);
2358 }
2359 if (((bitField0_ & 0x00000002) != 0)) {
2360 size += com.google.protobuf.CodedOutputStream
2361 .computeSInt64Size(2, right_);
2362 }
2363 if (((bitField0_ & 0x00000004) != 0)) {
2364 size += com.google.protobuf.CodedOutputStream
2365 .computeSInt64Size(3, top_);
2366 }
2367 if (((bitField0_ & 0x00000008) != 0)) {
2368 size += com.google.protobuf.CodedOutputStream
2369 .computeSInt64Size(4, bottom_);
2370 }
2371 size += unknownFields.getSerializedSize();
2372 memoizedSize = size;
2373 return size;
2374 }
2375
2376 @java.lang.Override
2377 public boolean equals(final java.lang.Object obj) {
2378 if (obj == this) {
2379 return true;
2380 }
2381 if (!(obj instanceof org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox)) {
2382 return super.equals(obj);
2383 }
2384 org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox other = (org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox) obj;
2385
2386 if (hasLeft() != other.hasLeft()) return false;
2387 if (hasLeft()) {
2388 if (getLeft()
2389 != other.getLeft()) return false;
2390 }
2391 if (hasRight() != other.hasRight()) return false;
2392 if (hasRight()) {
2393 if (getRight()
2394 != other.getRight()) return false;
2395 }
2396 if (hasTop() != other.hasTop()) return false;
2397 if (hasTop()) {
2398 if (getTop()
2399 != other.getTop()) return false;
2400 }
2401 if (hasBottom() != other.hasBottom()) return false;
2402 if (hasBottom()) {
2403 if (getBottom()
2404 != other.getBottom()) return false;
2405 }
2406 if (!unknownFields.equals(other.unknownFields)) return false;
2407 return true;
2408 }
2409
2410 @java.lang.Override
2411 public int hashCode() {
2412 if (memoizedHashCode != 0) {
2413 return memoizedHashCode;
2414 }
2415 int hash = 41;
2416 hash = (19 * hash) + getDescriptor().hashCode();
2417 if (hasLeft()) {
2418 hash = (37 * hash) + LEFT_FIELD_NUMBER;
2419 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
2420 getLeft());
2421 }
2422 if (hasRight()) {
2423 hash = (37 * hash) + RIGHT_FIELD_NUMBER;
2424 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
2425 getRight());
2426 }
2427 if (hasTop()) {
2428 hash = (37 * hash) + TOP_FIELD_NUMBER;
2429 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
2430 getTop());
2431 }
2432 if (hasBottom()) {
2433 hash = (37 * hash) + BOTTOM_FIELD_NUMBER;
2434 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
2435 getBottom());
2436 }
2437 hash = (29 * hash) + unknownFields.hashCode();
2438 memoizedHashCode = hash;
2439 return hash;
2440 }
2441
2442 public static org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox parseFrom(
2443 java.nio.ByteBuffer data)
2444 throws com.google.protobuf.InvalidProtocolBufferException {
2445 return PARSER.parseFrom(data);
2446 }
2447 public static org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox parseFrom(
2448 java.nio.ByteBuffer data,
2449 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2450 throws com.google.protobuf.InvalidProtocolBufferException {
2451 return PARSER.parseFrom(data, extensionRegistry);
2452 }
2453 public static org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox parseFrom(
2454 com.google.protobuf.ByteString data)
2455 throws com.google.protobuf.InvalidProtocolBufferException {
2456 return PARSER.parseFrom(data);
2457 }
2458 public static org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox parseFrom(
2459 com.google.protobuf.ByteString data,
2460 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2461 throws com.google.protobuf.InvalidProtocolBufferException {
2462 return PARSER.parseFrom(data, extensionRegistry);
2463 }
2464 public static org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox parseFrom(byte[] data)
2465 throws com.google.protobuf.InvalidProtocolBufferException {
2466 return PARSER.parseFrom(data);
2467 }
2468 public static org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox parseFrom(
2469 byte[] data,
2470 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2471 throws com.google.protobuf.InvalidProtocolBufferException {
2472 return PARSER.parseFrom(data, extensionRegistry);
2473 }
2474 public static org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox parseFrom(java.io.InputStream input)
2475 throws java.io.IOException {
2476 return com.google.protobuf.GeneratedMessageV3
2477 .parseWithIOException(PARSER, input);
2478 }
2479 public static org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox parseFrom(
2480 java.io.InputStream input,
2481 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2482 throws java.io.IOException {
2483 return com.google.protobuf.GeneratedMessageV3
2484 .parseWithIOException(PARSER, input, extensionRegistry);
2485 }
2486 public static org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox parseDelimitedFrom(java.io.InputStream input)
2487 throws java.io.IOException {
2488 return com.google.protobuf.GeneratedMessageV3
2489 .parseDelimitedWithIOException(PARSER, input);
2490 }
2491 public static org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox parseDelimitedFrom(
2492 java.io.InputStream input,
2493 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2494 throws java.io.IOException {
2495 return com.google.protobuf.GeneratedMessageV3
2496 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
2497 }
2498 public static org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox parseFrom(
2499 com.google.protobuf.CodedInputStream input)
2500 throws java.io.IOException {
2501 return com.google.protobuf.GeneratedMessageV3
2502 .parseWithIOException(PARSER, input);
2503 }
2504 public static org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox parseFrom(
2505 com.google.protobuf.CodedInputStream input,
2506 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2507 throws java.io.IOException {
2508 return com.google.protobuf.GeneratedMessageV3
2509 .parseWithIOException(PARSER, input, extensionRegistry);
2510 }
2511
2512 @java.lang.Override
2513 public Builder newBuilderForType() { return newBuilder(); }
2514 public static Builder newBuilder() {
2515 return DEFAULT_INSTANCE.toBuilder();
2516 }
2517 public static Builder newBuilder(org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox prototype) {
2518 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
2519 }
2520 @java.lang.Override
2521 public Builder toBuilder() {
2522 return this == DEFAULT_INSTANCE
2523 ? new Builder() : new Builder().mergeFrom(this);
2524 }
2525
2526 @java.lang.Override
2527 protected Builder newBuilderForType(
2528 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
2529 Builder builder = new Builder(parent);
2530 return builder;
2531 }
2532 /**
2533 * Protobuf type {@code OSMPBF.HeaderBBox}
2534 */
2535 public static final class Builder extends
2536 com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
2537 // @@protoc_insertion_point(builder_implements:OSMPBF.HeaderBBox)
2538 org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBoxOrBuilder {
2539 public static final com.google.protobuf.Descriptors.Descriptor
2540 getDescriptor() {
2541 return org.openstreetmap.osmosis.osmbinary.Osmformat.internal_static_OSMPBF_HeaderBBox_descriptor;
2542 }
2543
2544 @java.lang.Override
2545 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
2546 internalGetFieldAccessorTable() {
2547 return org.openstreetmap.osmosis.osmbinary.Osmformat.internal_static_OSMPBF_HeaderBBox_fieldAccessorTable
2548 .ensureFieldAccessorsInitialized(
2549 org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox.class, org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox.Builder.class);
2550 }
2551
2552 // Construct using org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox.newBuilder()
2553 private Builder() {
2554 maybeForceBuilderInitialization();
2555 }
2556
2557 private Builder(
2558 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
2559 super(parent);
2560 maybeForceBuilderInitialization();
2561 }
2562 private void maybeForceBuilderInitialization() {
2563 if (com.google.protobuf.GeneratedMessageV3
2564 .alwaysUseFieldBuilders) {
2565 }
2566 }
2567 @java.lang.Override
2568 public Builder clear() {
2569 super.clear();
2570 left_ = 0L;
2571 bitField0_ = (bitField0_ & ~0x00000001);
2572 right_ = 0L;
2573 bitField0_ = (bitField0_ & ~0x00000002);
2574 top_ = 0L;
2575 bitField0_ = (bitField0_ & ~0x00000004);
2576 bottom_ = 0L;
2577 bitField0_ = (bitField0_ & ~0x00000008);
2578 return this;
2579 }
2580
2581 @java.lang.Override
2582 public com.google.protobuf.Descriptors.Descriptor
2583 getDescriptorForType() {
2584 return org.openstreetmap.osmosis.osmbinary.Osmformat.internal_static_OSMPBF_HeaderBBox_descriptor;
2585 }
2586
2587 @java.lang.Override
2588 public org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox getDefaultInstanceForType() {
2589 return org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox.getDefaultInstance();
2590 }
2591
2592 @java.lang.Override
2593 public org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox build() {
2594 org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox result = buildPartial();
2595 if (!result.isInitialized()) {
2596 throw newUninitializedMessageException(result);
2597 }
2598 return result;
2599 }
2600
2601 @java.lang.Override
2602 public org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox buildPartial() {
2603 org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox result = new org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox(this);
2604 int from_bitField0_ = bitField0_;
2605 int to_bitField0_ = 0;
2606 if (((from_bitField0_ & 0x00000001) != 0)) {
2607 result.left_ = left_;
2608 to_bitField0_ |= 0x00000001;
2609 }
2610 if (((from_bitField0_ & 0x00000002) != 0)) {
2611 result.right_ = right_;
2612 to_bitField0_ |= 0x00000002;
2613 }
2614 if (((from_bitField0_ & 0x00000004) != 0)) {
2615 result.top_ = top_;
2616 to_bitField0_ |= 0x00000004;
2617 }
2618 if (((from_bitField0_ & 0x00000008) != 0)) {
2619 result.bottom_ = bottom_;
2620 to_bitField0_ |= 0x00000008;
2621 }
2622 result.bitField0_ = to_bitField0_;
2623 onBuilt();
2624 return result;
2625 }
2626
2627 @java.lang.Override
2628 public Builder clone() {
2629 return super.clone();
2630 }
2631 @java.lang.Override
2632 public Builder setField(
2633 com.google.protobuf.Descriptors.FieldDescriptor field,
2634 java.lang.Object value) {
2635 return super.setField(field, value);
2636 }
2637 @java.lang.Override
2638 public Builder clearField(
2639 com.google.protobuf.Descriptors.FieldDescriptor field) {
2640 return super.clearField(field);
2641 }
2642 @java.lang.Override
2643 public Builder clearOneof(
2644 com.google.protobuf.Descriptors.OneofDescriptor oneof) {
2645 return super.clearOneof(oneof);
2646 }
2647 @java.lang.Override
2648 public Builder setRepeatedField(
2649 com.google.protobuf.Descriptors.FieldDescriptor field,
2650 int index, java.lang.Object value) {
2651 return super.setRepeatedField(field, index, value);
2652 }
2653 @java.lang.Override
2654 public Builder addRepeatedField(
2655 com.google.protobuf.Descriptors.FieldDescriptor field,
2656 java.lang.Object value) {
2657 return super.addRepeatedField(field, value);
2658 }
2659 @java.lang.Override
2660 public Builder mergeFrom(com.google.protobuf.Message other) {
2661 if (other instanceof org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox) {
2662 return mergeFrom((org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox)other);
2663 } else {
2664 super.mergeFrom(other);
2665 return this;
2666 }
2667 }
2668
2669 public Builder mergeFrom(org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox other) {
2670 if (other == org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox.getDefaultInstance()) return this;
2671 if (other.hasLeft()) {
2672 setLeft(other.getLeft());
2673 }
2674 if (other.hasRight()) {
2675 setRight(other.getRight());
2676 }
2677 if (other.hasTop()) {
2678 setTop(other.getTop());
2679 }
2680 if (other.hasBottom()) {
2681 setBottom(other.getBottom());
2682 }
2683 this.mergeUnknownFields(other.unknownFields);
2684 onChanged();
2685 return this;
2686 }
2687
2688 @java.lang.Override
2689 public final boolean isInitialized() {
2690 if (!hasLeft()) {
2691 return false;
2692 }
2693 if (!hasRight()) {
2694 return false;
2695 }
2696 if (!hasTop()) {
2697 return false;
2698 }
2699 if (!hasBottom()) {
2700 return false;
2701 }
2702 return true;
2703 }
2704
2705 @java.lang.Override
2706 public Builder mergeFrom(
2707 com.google.protobuf.CodedInputStream input,
2708 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2709 throws java.io.IOException {
2710 org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox parsedMessage = null;
2711 try {
2712 parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
2713 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
2714 parsedMessage = (org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox) e.getUnfinishedMessage();
2715 throw e.unwrapIOException();
2716 } finally {
2717 if (parsedMessage != null) {
2718 mergeFrom(parsedMessage);
2719 }
2720 }
2721 return this;
2722 }
2723 private int bitField0_;
2724
2725 private long left_ ;
2726 /**
2727 * <code>required sint64 left = 1;</code>
2728 * @return Whether the left field is set.
2729 */
2730 @java.lang.Override
2731 public boolean hasLeft() {
2732 return ((bitField0_ & 0x00000001) != 0);
2733 }
2734 /**
2735 * <code>required sint64 left = 1;</code>
2736 * @return The left.
2737 */
2738 @java.lang.Override
2739 public long getLeft() {
2740 return left_;
2741 }
2742 /**
2743 * <code>required sint64 left = 1;</code>
2744 * @param value The left to set.
2745 * @return This builder for chaining.
2746 */
2747 public Builder setLeft(long value) {
2748 bitField0_ |= 0x00000001;
2749 left_ = value;
2750 onChanged();
2751 return this;
2752 }
2753 /**
2754 * <code>required sint64 left = 1;</code>
2755 * @return This builder for chaining.
2756 */
2757 public Builder clearLeft() {
2758 bitField0_ = (bitField0_ & ~0x00000001);
2759 left_ = 0L;
2760 onChanged();
2761 return this;
2762 }
2763
2764 private long right_ ;
2765 /**
2766 * <code>required sint64 right = 2;</code>
2767 * @return Whether the right field is set.
2768 */
2769 @java.lang.Override
2770 public boolean hasRight() {
2771 return ((bitField0_ & 0x00000002) != 0);
2772 }
2773 /**
2774 * <code>required sint64 right = 2;</code>
2775 * @return The right.
2776 */
2777 @java.lang.Override
2778 public long getRight() {
2779 return right_;
2780 }
2781 /**
2782 * <code>required sint64 right = 2;</code>
2783 * @param value The right to set.
2784 * @return This builder for chaining.
2785 */
2786 public Builder setRight(long value) {
2787 bitField0_ |= 0x00000002;
2788 right_ = value;
2789 onChanged();
2790 return this;
2791 }
2792 /**
2793 * <code>required sint64 right = 2;</code>
2794 * @return This builder for chaining.
2795 */
2796 public Builder clearRight() {
2797 bitField0_ = (bitField0_ & ~0x00000002);
2798 right_ = 0L;
2799 onChanged();
2800 return this;
2801 }
2802
2803 private long top_ ;
2804 /**
2805 * <code>required sint64 top = 3;</code>
2806 * @return Whether the top field is set.
2807 */
2808 @java.lang.Override
2809 public boolean hasTop() {
2810 return ((bitField0_ & 0x00000004) != 0);
2811 }
2812 /**
2813 * <code>required sint64 top = 3;</code>
2814 * @return The top.
2815 */
2816 @java.lang.Override
2817 public long getTop() {
2818 return top_;
2819 }
2820 /**
2821 * <code>required sint64 top = 3;</code>
2822 * @param value The top to set.
2823 * @return This builder for chaining.
2824 */
2825 public Builder setTop(long value) {
2826 bitField0_ |= 0x00000004;
2827 top_ = value;
2828 onChanged();
2829 return this;
2830 }
2831 /**
2832 * <code>required sint64 top = 3;</code>
2833 * @return This builder for chaining.
2834 */
2835 public Builder clearTop() {
2836 bitField0_ = (bitField0_ & ~0x00000004);
2837 top_ = 0L;
2838 onChanged();
2839 return this;
2840 }
2841
2842 private long bottom_ ;
2843 /**
2844 * <code>required sint64 bottom = 4;</code>
2845 * @return Whether the bottom field is set.
2846 */
2847 @java.lang.Override
2848 public boolean hasBottom() {
2849 return ((bitField0_ & 0x00000008) != 0);
2850 }
2851 /**
2852 * <code>required sint64 bottom = 4;</code>
2853 * @return The bottom.
2854 */
2855 @java.lang.Override
2856 public long getBottom() {
2857 return bottom_;
2858 }
2859 /**
2860 * <code>required sint64 bottom = 4;</code>
2861 * @param value The bottom to set.
2862 * @return This builder for chaining.
2863 */
2864 public Builder setBottom(long value) {
2865 bitField0_ |= 0x00000008;
2866 bottom_ = value;
2867 onChanged();
2868 return this;
2869 }
2870 /**
2871 * <code>required sint64 bottom = 4;</code>
2872 * @return This builder for chaining.
2873 */
2874 public Builder clearBottom() {
2875 bitField0_ = (bitField0_ & ~0x00000008);
2876 bottom_ = 0L;
2877 onChanged();
2878 return this;
2879 }
2880 @java.lang.Override
2881 public final Builder setUnknownFields(
2882 final com.google.protobuf.UnknownFieldSet unknownFields) {
2883 return super.setUnknownFields(unknownFields);
2884 }
2885
2886 @java.lang.Override
2887 public final Builder mergeUnknownFields(
2888 final com.google.protobuf.UnknownFieldSet unknownFields) {
2889 return super.mergeUnknownFields(unknownFields);
2890 }
2891
2892
2893 // @@protoc_insertion_point(builder_scope:OSMPBF.HeaderBBox)
2894 }
2895
2896 // @@protoc_insertion_point(class_scope:OSMPBF.HeaderBBox)
2897 private static final org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox DEFAULT_INSTANCE;
2898 static {
2899 DEFAULT_INSTANCE = new org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox();
2900 }
2901
2902 public static org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox getDefaultInstance() {
2903 return DEFAULT_INSTANCE;
2904 }
2905
2906 @java.lang.Deprecated public static final com.google.protobuf.Parser<HeaderBBox>
2907 PARSER = new com.google.protobuf.AbstractParser<HeaderBBox>() {
2908 @java.lang.Override
2909 public HeaderBBox parsePartialFrom(
2910 com.google.protobuf.CodedInputStream input,
2911 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2912 throws com.google.protobuf.InvalidProtocolBufferException {
2913 return new HeaderBBox(input, extensionRegistry);
2914 }
2915 };
2916
2917 public static com.google.protobuf.Parser<HeaderBBox> parser() {
2918 return PARSER;
2919 }
2920
2921 @java.lang.Override
2922 public com.google.protobuf.Parser<HeaderBBox> getParserForType() {
2923 return PARSER;
2924 }
2925
2926 @java.lang.Override
2927 public org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox getDefaultInstanceForType() {
2928 return DEFAULT_INSTANCE;
2929 }
2930
2931 }
2932
2933 public interface PrimitiveBlockOrBuilder extends
2934 // @@protoc_insertion_point(interface_extends:OSMPBF.PrimitiveBlock)
2935 com.google.protobuf.MessageOrBuilder {
2936
2937 /**
2938 * <code>required .OSMPBF.StringTable stringtable = 1;</code>
2939 * @return Whether the stringtable field is set.
2940 */
2941 boolean hasStringtable();
2942 /**
2943 * <code>required .OSMPBF.StringTable stringtable = 1;</code>
2944 * @return The stringtable.
2945 */
2946 org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable getStringtable();
2947 /**
2948 * <code>required .OSMPBF.StringTable stringtable = 1;</code>
2949 */
2950 org.openstreetmap.osmosis.osmbinary.Osmformat.StringTableOrBuilder getStringtableOrBuilder();
2951
2952 /**
2953 * <code>repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;</code>
2954 */
2955 java.util.List<org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup>
2956 getPrimitivegroupList();
2957 /**
2958 * <code>repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;</code>
2959 */
2960 org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup getPrimitivegroup(int index);
2961 /**
2962 * <code>repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;</code>
2963 */
2964 int getPrimitivegroupCount();
2965 /**
2966 * <code>repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;</code>
2967 */
2968 java.util.List<? extends org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroupOrBuilder>
2969 getPrimitivegroupOrBuilderList();
2970 /**
2971 * <code>repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;</code>
2972 */
2973 org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroupOrBuilder getPrimitivegroupOrBuilder(
2974 int index);
2975
2976 /**
2977 * <pre>
2978 * Granularity, units of nanodegrees, used to store coordinates in this block
2979 * </pre>
2980 *
2981 * <code>optional int32 granularity = 17 [default = 100];</code>
2982 * @return Whether the granularity field is set.
2983 */
2984 boolean hasGranularity();
2985 /**
2986 * <pre>
2987 * Granularity, units of nanodegrees, used to store coordinates in this block
2988 * </pre>
2989 *
2990 * <code>optional int32 granularity = 17 [default = 100];</code>
2991 * @return The granularity.
2992 */
2993 int getGranularity();
2994
2995 /**
2996 * <pre>
2997 * Offset value between the output coordinates coordinates and the granularity grid in unites of nanodegrees.
2998 * </pre>
2999 *
3000 * <code>optional int64 lat_offset = 19 [default = 0];</code>
3001 * @return Whether the latOffset field is set.
3002 */
3003 boolean hasLatOffset();
3004 /**
3005 * <pre>
3006 * Offset value between the output coordinates coordinates and the granularity grid in unites of nanodegrees.
3007 * </pre>
3008 *
3009 * <code>optional int64 lat_offset = 19 [default = 0];</code>
3010 * @return The latOffset.
3011 */
3012 long getLatOffset();
3013
3014 /**
3015 * <code>optional int64 lon_offset = 20 [default = 0];</code>
3016 * @return Whether the lonOffset field is set.
3017 */
3018 boolean hasLonOffset();
3019 /**
3020 * <code>optional int64 lon_offset = 20 [default = 0];</code>
3021 * @return The lonOffset.
3022 */
3023 long getLonOffset();
3024
3025 /**
3026 * <pre>
3027 * Granularity of dates, normally represented in units of milliseconds since the 1970 epoch.
3028 * </pre>
3029 *
3030 * <code>optional int32 date_granularity = 18 [default = 1000];</code>
3031 * @return Whether the dateGranularity field is set.
3032 */
3033 boolean hasDateGranularity();
3034 /**
3035 * <pre>
3036 * Granularity of dates, normally represented in units of milliseconds since the 1970 epoch.
3037 * </pre>
3038 *
3039 * <code>optional int32 date_granularity = 18 [default = 1000];</code>
3040 * @return The dateGranularity.
3041 */
3042 int getDateGranularity();
3043 }
3044 /**
3045 * Protobuf type {@code OSMPBF.PrimitiveBlock}
3046 */
3047 public static final class PrimitiveBlock extends
3048 com.google.protobuf.GeneratedMessageV3 implements
3049 // @@protoc_insertion_point(message_implements:OSMPBF.PrimitiveBlock)
3050 PrimitiveBlockOrBuilder {
3051 private static final long serialVersionUID = 0L;
3052 // Use PrimitiveBlock.newBuilder() to construct.
3053 private PrimitiveBlock(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
3054 super(builder);
3055 }
3056 private PrimitiveBlock() {
3057 primitivegroup_ = java.util.Collections.emptyList();
3058 granularity_ = 100;
3059 dateGranularity_ = 1000;
3060 }
3061
3062 @java.lang.Override
3063 @SuppressWarnings({"unused"})
3064 protected java.lang.Object newInstance(
3065 UnusedPrivateParameter unused) {
3066 return new PrimitiveBlock();
3067 }
3068
3069 @java.lang.Override
3070 public final com.google.protobuf.UnknownFieldSet
3071 getUnknownFields() {
3072 return this.unknownFields;
3073 }
3074 private PrimitiveBlock(
3075 com.google.protobuf.CodedInputStream input,
3076 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3077 throws com.google.protobuf.InvalidProtocolBufferException {
3078 this();
3079 if (extensionRegistry == null) {
3080 throw new java.lang.NullPointerException();
3081 }
3082 int mutable_bitField0_ = 0;
3083 com.google.protobuf.UnknownFieldSet.Builder unknownFields =
3084 com.google.protobuf.UnknownFieldSet.newBuilder();
3085 try {
3086 boolean done = false;
3087 while (!done) {
3088 int tag = input.readTag();
3089 switch (tag) {
3090 case 0:
3091 done = true;
3092 break;
3093 case 10: {
3094 org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable.Builder subBuilder = null;
3095 if (((bitField0_ & 0x00000001) != 0)) {
3096 subBuilder = stringtable_.toBuilder();
3097 }
3098 stringtable_ = input.readMessage(org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable.PARSER, extensionRegistry);
3099 if (subBuilder != null) {
3100 subBuilder.mergeFrom(stringtable_);
3101 stringtable_ = subBuilder.buildPartial();
3102 }
3103 bitField0_ |= 0x00000001;
3104 break;
3105 }
3106 case 18: {
3107 if (!((mutable_bitField0_ & 0x00000002) != 0)) {
3108 primitivegroup_ = new java.util.ArrayList<org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup>();
3109 mutable_bitField0_ |= 0x00000002;
3110 }
3111 primitivegroup_.add(
3112 input.readMessage(org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup.PARSER, extensionRegistry));
3113 break;
3114 }
3115 case 136: {
3116 bitField0_ |= 0x00000002;
3117 granularity_ = input.readInt32();
3118 break;
3119 }
3120 case 144: {
3121 bitField0_ |= 0x00000010;
3122 dateGranularity_ = input.readInt32();
3123 break;
3124 }
3125 case 152: {
3126 bitField0_ |= 0x00000004;
3127 latOffset_ = input.readInt64();
3128 break;
3129 }
3130 case 160: {
3131 bitField0_ |= 0x00000008;
3132 lonOffset_ = input.readInt64();
3133 break;
3134 }
3135 default: {
3136 if (!parseUnknownField(
3137 input, unknownFields, extensionRegistry, tag)) {
3138 done = true;
3139 }
3140 break;
3141 }
3142 }
3143 }
3144 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
3145 throw e.setUnfinishedMessage(this);
3146 } catch (java.io.IOException e) {
3147 throw new com.google.protobuf.InvalidProtocolBufferException(
3148 e).setUnfinishedMessage(this);
3149 } finally {
3150 if (((mutable_bitField0_ & 0x00000002) != 0)) {
3151 primitivegroup_ = java.util.Collections.unmodifiableList(primitivegroup_);
3152 }
3153 this.unknownFields = unknownFields.build();
3154 makeExtensionsImmutable();
3155 }
3156 }
3157 public static final com.google.protobuf.Descriptors.Descriptor
3158 getDescriptor() {
3159 return org.openstreetmap.osmosis.osmbinary.Osmformat.internal_static_OSMPBF_PrimitiveBlock_descriptor;
3160 }
3161
3162 @java.lang.Override
3163 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
3164 internalGetFieldAccessorTable() {
3165 return org.openstreetmap.osmosis.osmbinary.Osmformat.internal_static_OSMPBF_PrimitiveBlock_fieldAccessorTable
3166 .ensureFieldAccessorsInitialized(
3167 org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveBlock.class, org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveBlock.Builder.class);
3168 }
3169
3170 private int bitField0_;
3171 public static final int STRINGTABLE_FIELD_NUMBER = 1;
3172 private org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable stringtable_;
3173 /**
3174 * <code>required .OSMPBF.StringTable stringtable = 1;</code>
3175 * @return Whether the stringtable field is set.
3176 */
3177 @java.lang.Override
3178 public boolean hasStringtable() {
3179 return ((bitField0_ & 0x00000001) != 0);
3180 }
3181 /**
3182 * <code>required .OSMPBF.StringTable stringtable = 1;</code>
3183 * @return The stringtable.
3184 */
3185 @java.lang.Override
3186 public org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable getStringtable() {
3187 return stringtable_ == null ? org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable.getDefaultInstance() : stringtable_;
3188 }
3189 /**
3190 * <code>required .OSMPBF.StringTable stringtable = 1;</code>
3191 */
3192 @java.lang.Override
3193 public org.openstreetmap.osmosis.osmbinary.Osmformat.StringTableOrBuilder getStringtableOrBuilder() {
3194 return stringtable_ == null ? org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable.getDefaultInstance() : stringtable_;
3195 }
3196
3197 public static final int PRIMITIVEGROUP_FIELD_NUMBER = 2;
3198 private java.util.List<org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup> primitivegroup_;
3199 /**
3200 * <code>repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;</code>
3201 */
3202 @java.lang.Override
3203 public java.util.List<org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup> getPrimitivegroupList() {
3204 return primitivegroup_;
3205 }
3206 /**
3207 * <code>repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;</code>
3208 */
3209 @java.lang.Override
3210 public java.util.List<? extends org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroupOrBuilder>
3211 getPrimitivegroupOrBuilderList() {
3212 return primitivegroup_;
3213 }
3214 /**
3215 * <code>repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;</code>
3216 */
3217 @java.lang.Override
3218 public int getPrimitivegroupCount() {
3219 return primitivegroup_.size();
3220 }
3221 /**
3222 * <code>repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;</code>
3223 */
3224 @java.lang.Override
3225 public org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup getPrimitivegroup(int index) {
3226 return primitivegroup_.get(index);
3227 }
3228 /**
3229 * <code>repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;</code>
3230 */
3231 @java.lang.Override
3232 public org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroupOrBuilder getPrimitivegroupOrBuilder(
3233 int index) {
3234 return primitivegroup_.get(index);
3235 }
3236
3237 public static final int GRANULARITY_FIELD_NUMBER = 17;
3238 private int granularity_;
3239 /**
3240 * <pre>
3241 * Granularity, units of nanodegrees, used to store coordinates in this block
3242 * </pre>
3243 *
3244 * <code>optional int32 granularity = 17 [default = 100];</code>
3245 * @return Whether the granularity field is set.
3246 */
3247 @java.lang.Override
3248 public boolean hasGranularity() {
3249 return ((bitField0_ & 0x00000002) != 0);
3250 }
3251 /**
3252 * <pre>
3253 * Granularity, units of nanodegrees, used to store coordinates in this block
3254 * </pre>
3255 *
3256 * <code>optional int32 granularity = 17 [default = 100];</code>
3257 * @return The granularity.
3258 */
3259 @java.lang.Override
3260 public int getGranularity() {
3261 return granularity_;
3262 }
3263
3264 public static final int LAT_OFFSET_FIELD_NUMBER = 19;
3265 private long latOffset_;
3266 /**
3267 * <pre>
3268 * Offset value between the output coordinates coordinates and the granularity grid in unites of nanodegrees.
3269 * </pre>
3270 *
3271 * <code>optional int64 lat_offset = 19 [default = 0];</code>
3272 * @return Whether the latOffset field is set.
3273 */
3274 @java.lang.Override
3275 public boolean hasLatOffset() {
3276 return ((bitField0_ & 0x00000004) != 0);
3277 }
3278 /**
3279 * <pre>
3280 * Offset value between the output coordinates coordinates and the granularity grid in unites of nanodegrees.
3281 * </pre>
3282 *
3283 * <code>optional int64 lat_offset = 19 [default = 0];</code>
3284 * @return The latOffset.
3285 */
3286 @java.lang.Override
3287 public long getLatOffset() {
3288 return latOffset_;
3289 }
3290
3291 public static final int LON_OFFSET_FIELD_NUMBER = 20;
3292 private long lonOffset_;
3293 /**
3294 * <code>optional int64 lon_offset = 20 [default = 0];</code>
3295 * @return Whether the lonOffset field is set.
3296 */
3297 @java.lang.Override
3298 public boolean hasLonOffset() {
3299 return ((bitField0_ & 0x00000008) != 0);
3300 }
3301 /**
3302 * <code>optional int64 lon_offset = 20 [default = 0];</code>
3303 * @return The lonOffset.
3304 */
3305 @java.lang.Override
3306 public long getLonOffset() {
3307 return lonOffset_;
3308 }
3309
3310 public static final int DATE_GRANULARITY_FIELD_NUMBER = 18;
3311 private int dateGranularity_;
3312 /**
3313 * <pre>
3314 * Granularity of dates, normally represented in units of milliseconds since the 1970 epoch.
3315 * </pre>
3316 *
3317 * <code>optional int32 date_granularity = 18 [default = 1000];</code>
3318 * @return Whether the dateGranularity field is set.
3319 */
3320 @java.lang.Override
3321 public boolean hasDateGranularity() {
3322 return ((bitField0_ & 0x00000010) != 0);
3323 }
3324 /**
3325 * <pre>
3326 * Granularity of dates, normally represented in units of milliseconds since the 1970 epoch.
3327 * </pre>
3328 *
3329 * <code>optional int32 date_granularity = 18 [default = 1000];</code>
3330 * @return The dateGranularity.
3331 */
3332 @java.lang.Override
3333 public int getDateGranularity() {
3334 return dateGranularity_;
3335 }
3336
3337 private byte memoizedIsInitialized = -1;
3338 @java.lang.Override
3339 public final boolean isInitialized() {
3340 byte isInitialized = memoizedIsInitialized;
3341 if (isInitialized == 1) return true;
3342 if (isInitialized == 0) return false;
3343
3344 if (!hasStringtable()) {
3345 memoizedIsInitialized = 0;
3346 return false;
3347 }
3348 for (int i = 0; i < getPrimitivegroupCount(); i++) {
3349 if (!getPrimitivegroup(i).isInitialized()) {
3350 memoizedIsInitialized = 0;
3351 return false;
3352 }
3353 }
3354 memoizedIsInitialized = 1;
3355 return true;
3356 }
3357
3358 @java.lang.Override
3359 public void writeTo(com.google.protobuf.CodedOutputStream output)
3360 throws java.io.IOException {
3361 if (((bitField0_ & 0x00000001) != 0)) {
3362 output.writeMessage(1, getStringtable());
3363 }
3364 for (int i = 0; i < primitivegroup_.size(); i++) {
3365 output.writeMessage(2, primitivegroup_.get(i));
3366 }
3367 if (((bitField0_ & 0x00000002) != 0)) {
3368 output.writeInt32(17, granularity_);
3369 }
3370 if (((bitField0_ & 0x00000010) != 0)) {
3371 output.writeInt32(18, dateGranularity_);
3372 }
3373 if (((bitField0_ & 0x00000004) != 0)) {
3374 output.writeInt64(19, latOffset_);
3375 }
3376 if (((bitField0_ & 0x00000008) != 0)) {
3377 output.writeInt64(20, lonOffset_);
3378 }
3379 unknownFields.writeTo(output);
3380 }
3381
3382 @java.lang.Override
3383 public int getSerializedSize() {
3384 int size = memoizedSize;
3385 if (size != -1) return size;
3386
3387 size = 0;
3388 if (((bitField0_ & 0x00000001) != 0)) {
3389 size += com.google.protobuf.CodedOutputStream
3390 .computeMessageSize(1, getStringtable());
3391 }
3392 for (int i = 0; i < primitivegroup_.size(); i++) {
3393 size += com.google.protobuf.CodedOutputStream
3394 .computeMessageSize(2, primitivegroup_.get(i));
3395 }
3396 if (((bitField0_ & 0x00000002) != 0)) {
3397 size += com.google.protobuf.CodedOutputStream
3398 .computeInt32Size(17, granularity_);
3399 }
3400 if (((bitField0_ & 0x00000010) != 0)) {
3401 size += com.google.protobuf.CodedOutputStream
3402 .computeInt32Size(18, dateGranularity_);
3403 }
3404 if (((bitField0_ & 0x00000004) != 0)) {
3405 size += com.google.protobuf.CodedOutputStream
3406 .computeInt64Size(19, latOffset_);
3407 }
3408 if (((bitField0_ & 0x00000008) != 0)) {
3409 size += com.google.protobuf.CodedOutputStream
3410 .computeInt64Size(20, lonOffset_);
3411 }
3412 size += unknownFields.getSerializedSize();
3413 memoizedSize = size;
3414 return size;
3415 }
3416
3417 @java.lang.Override
3418 public boolean equals(final java.lang.Object obj) {
3419 if (obj == this) {
3420 return true;
3421 }
3422 if (!(obj instanceof org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveBlock)) {
3423 return super.equals(obj);
3424 }
3425 org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveBlock other = (org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveBlock) obj;
3426
3427 if (hasStringtable() != other.hasStringtable()) return false;
3428 if (hasStringtable()) {
3429 if (!getStringtable()
3430 .equals(other.getStringtable())) return false;
3431 }
3432 if (!getPrimitivegroupList()
3433 .equals(other.getPrimitivegroupList())) return false;
3434 if (hasGranularity() != other.hasGranularity()) return false;
3435 if (hasGranularity()) {
3436 if (getGranularity()
3437 != other.getGranularity()) return false;
3438 }
3439 if (hasLatOffset() != other.hasLatOffset()) return false;
3440 if (hasLatOffset()) {
3441 if (getLatOffset()
3442 != other.getLatOffset()) return false;
3443 }
3444 if (hasLonOffset() != other.hasLonOffset()) return false;
3445 if (hasLonOffset()) {
3446 if (getLonOffset()
3447 != other.getLonOffset()) return false;
3448 }
3449 if (hasDateGranularity() != other.hasDateGranularity()) return false;
3450 if (hasDateGranularity()) {
3451 if (getDateGranularity()
3452 != other.getDateGranularity()) return false;
3453 }
3454 if (!unknownFields.equals(other.unknownFields)) return false;
3455 return true;
3456 }
3457
3458 @java.lang.Override
3459 public int hashCode() {
3460 if (memoizedHashCode != 0) {
3461 return memoizedHashCode;
3462 }
3463 int hash = 41;
3464 hash = (19 * hash) + getDescriptor().hashCode();
3465 if (hasStringtable()) {
3466 hash = (37 * hash) + STRINGTABLE_FIELD_NUMBER;
3467 hash = (53 * hash) + getStringtable().hashCode();
3468 }
3469 if (getPrimitivegroupCount() > 0) {
3470 hash = (37 * hash) + PRIMITIVEGROUP_FIELD_NUMBER;
3471 hash = (53 * hash) + getPrimitivegroupList().hashCode();
3472 }
3473 if (hasGranularity()) {
3474 hash = (37 * hash) + GRANULARITY_FIELD_NUMBER;
3475 hash = (53 * hash) + getGranularity();
3476 }
3477 if (hasLatOffset()) {
3478 hash = (37 * hash) + LAT_OFFSET_FIELD_NUMBER;
3479 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
3480 getLatOffset());
3481 }
3482 if (hasLonOffset()) {
3483 hash = (37 * hash) + LON_OFFSET_FIELD_NUMBER;
3484 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
3485 getLonOffset());
3486 }
3487 if (hasDateGranularity()) {
3488 hash = (37 * hash) + DATE_GRANULARITY_FIELD_NUMBER;
3489 hash = (53 * hash) + getDateGranularity();
3490 }
3491 hash = (29 * hash) + unknownFields.hashCode();
3492 memoizedHashCode = hash;
3493 return hash;
3494 }
3495
3496 public static org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveBlock parseFrom(
3497 java.nio.ByteBuffer data)
3498 throws com.google.protobuf.InvalidProtocolBufferException {
3499 return PARSER.parseFrom(data);
3500 }
3501 public static org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveBlock parseFrom(
3502 java.nio.ByteBuffer data,
3503 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3504 throws com.google.protobuf.InvalidProtocolBufferException {
3505 return PARSER.parseFrom(data, extensionRegistry);
3506 }
3507 public static org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveBlock parseFrom(
3508 com.google.protobuf.ByteString data)
3509 throws com.google.protobuf.InvalidProtocolBufferException {
3510 return PARSER.parseFrom(data);
3511 }
3512 public static org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveBlock parseFrom(
3513 com.google.protobuf.ByteString data,
3514 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3515 throws com.google.protobuf.InvalidProtocolBufferException {
3516 return PARSER.parseFrom(data, extensionRegistry);
3517 }
3518 public static org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveBlock parseFrom(byte[] data)
3519 throws com.google.protobuf.InvalidProtocolBufferException {
3520 return PARSER.parseFrom(data);
3521 }
3522 public static org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveBlock parseFrom(
3523 byte[] data,
3524 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3525 throws com.google.protobuf.InvalidProtocolBufferException {
3526 return PARSER.parseFrom(data, extensionRegistry);
3527 }
3528 public static org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveBlock parseFrom(java.io.InputStream input)
3529 throws java.io.IOException {
3530 return com.google.protobuf.GeneratedMessageV3
3531 .parseWithIOException(PARSER, input);
3532 }
3533 public static org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveBlock parseFrom(
3534 java.io.InputStream input,
3535 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3536 throws java.io.IOException {
3537 return com.google.protobuf.GeneratedMessageV3
3538 .parseWithIOException(PARSER, input, extensionRegistry);
3539 }
3540 public static org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveBlock parseDelimitedFrom(java.io.InputStream input)
3541 throws java.io.IOException {
3542 return com.google.protobuf.GeneratedMessageV3
3543 .parseDelimitedWithIOException(PARSER, input);
3544 }
3545 public static org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveBlock parseDelimitedFrom(
3546 java.io.InputStream input,
3547 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3548 throws java.io.IOException {
3549 return com.google.protobuf.GeneratedMessageV3
3550 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
3551 }
3552 public static org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveBlock parseFrom(
3553 com.google.protobuf.CodedInputStream input)
3554 throws java.io.IOException {
3555 return com.google.protobuf.GeneratedMessageV3
3556 .parseWithIOException(PARSER, input);
3557 }
3558 public static org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveBlock parseFrom(
3559 com.google.protobuf.CodedInputStream input,
3560 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3561 throws java.io.IOException {
3562 return com.google.protobuf.GeneratedMessageV3
3563 .parseWithIOException(PARSER, input, extensionRegistry);
3564 }
3565
3566 @java.lang.Override
3567 public Builder newBuilderForType() { return newBuilder(); }
3568 public static Builder newBuilder() {
3569 return DEFAULT_INSTANCE.toBuilder();
3570 }
3571 public static Builder newBuilder(org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveBlock prototype) {
3572 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
3573 }
3574 @java.lang.Override
3575 public Builder toBuilder() {
3576 return this == DEFAULT_INSTANCE
3577 ? new Builder() : new Builder().mergeFrom(this);
3578 }
3579
3580 @java.lang.Override
3581 protected Builder newBuilderForType(
3582 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
3583 Builder builder = new Builder(parent);
3584 return builder;
3585 }
3586 /**
3587 * Protobuf type {@code OSMPBF.PrimitiveBlock}
3588 */
3589 public static final class Builder extends
3590 com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
3591 // @@protoc_insertion_point(builder_implements:OSMPBF.PrimitiveBlock)
3592 org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveBlockOrBuilder {
3593 public static final com.google.protobuf.Descriptors.Descriptor
3594 getDescriptor() {
3595 return org.openstreetmap.osmosis.osmbinary.Osmformat.internal_static_OSMPBF_PrimitiveBlock_descriptor;
3596 }
3597
3598 @java.lang.Override
3599 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
3600 internalGetFieldAccessorTable() {
3601 return org.openstreetmap.osmosis.osmbinary.Osmformat.internal_static_OSMPBF_PrimitiveBlock_fieldAccessorTable
3602 .ensureFieldAccessorsInitialized(
3603 org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveBlock.class, org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveBlock.Builder.class);
3604 }
3605
3606 // Construct using org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveBlock.newBuilder()
3607 private Builder() {
3608 maybeForceBuilderInitialization();
3609 }
3610
3611 private Builder(
3612 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
3613 super(parent);
3614 maybeForceBuilderInitialization();
3615 }
3616 private void maybeForceBuilderInitialization() {
3617 if (com.google.protobuf.GeneratedMessageV3
3618 .alwaysUseFieldBuilders) {
3619 getStringtableFieldBuilder();
3620 getPrimitivegroupFieldBuilder();
3621 }
3622 }
3623 @java.lang.Override
3624 public Builder clear() {
3625 super.clear();
3626 if (stringtableBuilder_ == null) {
3627 stringtable_ = null;
3628 } else {
3629 stringtableBuilder_.clear();
3630 }
3631 bitField0_ = (bitField0_ & ~0x00000001);
3632 if (primitivegroupBuilder_ == null) {
3633 primitivegroup_ = java.util.Collections.emptyList();
3634 bitField0_ = (bitField0_ & ~0x00000002);
3635 } else {
3636 primitivegroupBuilder_.clear();
3637 }
3638 granularity_ = 100;
3639 bitField0_ = (bitField0_ & ~0x00000004);
3640 latOffset_ = 0L;
3641 bitField0_ = (bitField0_ & ~0x00000008);
3642 lonOffset_ = 0L;
3643 bitField0_ = (bitField0_ & ~0x00000010);
3644 dateGranularity_ = 1000;
3645 bitField0_ = (bitField0_ & ~0x00000020);
3646 return this;
3647 }
3648
3649 @java.lang.Override
3650 public com.google.protobuf.Descriptors.Descriptor
3651 getDescriptorForType() {
3652 return org.openstreetmap.osmosis.osmbinary.Osmformat.internal_static_OSMPBF_PrimitiveBlock_descriptor;
3653 }
3654
3655 @java.lang.Override
3656 public org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveBlock getDefaultInstanceForType() {
3657 return org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveBlock.getDefaultInstance();
3658 }
3659
3660 @java.lang.Override
3661 public org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveBlock build() {
3662 org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveBlock result = buildPartial();
3663 if (!result.isInitialized()) {
3664 throw newUninitializedMessageException(result);
3665 }
3666 return result;
3667 }
3668
3669 @java.lang.Override
3670 public org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveBlock buildPartial() {
3671 org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveBlock result = new org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveBlock(this);
3672 int from_bitField0_ = bitField0_;
3673 int to_bitField0_ = 0;
3674 if (((from_bitField0_ & 0x00000001) != 0)) {
3675 if (stringtableBuilder_ == null) {
3676 result.stringtable_ = stringtable_;
3677 } else {
3678 result.stringtable_ = stringtableBuilder_.build();
3679 }
3680 to_bitField0_ |= 0x00000001;
3681 }
3682 if (primitivegroupBuilder_ == null) {
3683 if (((bitField0_ & 0x00000002) != 0)) {
3684 primitivegroup_ = java.util.Collections.unmodifiableList(primitivegroup_);
3685 bitField0_ = (bitField0_ & ~0x00000002);
3686 }
3687 result.primitivegroup_ = primitivegroup_;
3688 } else {
3689 result.primitivegroup_ = primitivegroupBuilder_.build();
3690 }
3691 if (((from_bitField0_ & 0x00000004) != 0)) {
3692 to_bitField0_ |= 0x00000002;
3693 }
3694 result.granularity_ = granularity_;
3695 if (((from_bitField0_ & 0x00000008) != 0)) {
3696 result.latOffset_ = latOffset_;
3697 to_bitField0_ |= 0x00000004;
3698 }
3699 if (((from_bitField0_ & 0x00000010) != 0)) {
3700 result.lonOffset_ = lonOffset_;
3701 to_bitField0_ |= 0x00000008;
3702 }
3703 if (((from_bitField0_ & 0x00000020) != 0)) {
3704 to_bitField0_ |= 0x00000010;
3705 }
3706 result.dateGranularity_ = dateGranularity_;
3707 result.bitField0_ = to_bitField0_;
3708 onBuilt();
3709 return result;
3710 }
3711
3712 @java.lang.Override
3713 public Builder clone() {
3714 return super.clone();
3715 }
3716 @java.lang.Override
3717 public Builder setField(
3718 com.google.protobuf.Descriptors.FieldDescriptor field,
3719 java.lang.Object value) {
3720 return super.setField(field, value);
3721 }
3722 @java.lang.Override
3723 public Builder clearField(
3724 com.google.protobuf.Descriptors.FieldDescriptor field) {
3725 return super.clearField(field);
3726 }
3727 @java.lang.Override
3728 public Builder clearOneof(
3729 com.google.protobuf.Descriptors.OneofDescriptor oneof) {
3730 return super.clearOneof(oneof);
3731 }
3732 @java.lang.Override
3733 public Builder setRepeatedField(
3734 com.google.protobuf.Descriptors.FieldDescriptor field,
3735 int index, java.lang.Object value) {
3736 return super.setRepeatedField(field, index, value);
3737 }
3738 @java.lang.Override
3739 public Builder addRepeatedField(
3740 com.google.protobuf.Descriptors.FieldDescriptor field,
3741 java.lang.Object value) {
3742 return super.addRepeatedField(field, value);
3743 }
3744 @java.lang.Override
3745 public Builder mergeFrom(com.google.protobuf.Message other) {
3746 if (other instanceof org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveBlock) {
3747 return mergeFrom((org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveBlock)other);
3748 } else {
3749 super.mergeFrom(other);
3750 return this;
3751 }
3752 }
3753
3754 public Builder mergeFrom(org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveBlock other) {
3755 if (other == org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveBlock.getDefaultInstance()) return this;
3756 if (other.hasStringtable()) {
3757 mergeStringtable(other.getStringtable());
3758 }
3759 if (primitivegroupBuilder_ == null) {
3760 if (!other.primitivegroup_.isEmpty()) {
3761 if (primitivegroup_.isEmpty()) {
3762 primitivegroup_ = other.primitivegroup_;
3763 bitField0_ = (bitField0_ & ~0x00000002);
3764 } else {
3765 ensurePrimitivegroupIsMutable();
3766 primitivegroup_.addAll(other.primitivegroup_);
3767 }
3768 onChanged();
3769 }
3770 } else {
3771 if (!other.primitivegroup_.isEmpty()) {
3772 if (primitivegroupBuilder_.isEmpty()) {
3773 primitivegroupBuilder_.dispose();
3774 primitivegroupBuilder_ = null;
3775 primitivegroup_ = other.primitivegroup_;
3776 bitField0_ = (bitField0_ & ~0x00000002);
3777 primitivegroupBuilder_ =
3778 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
3779 getPrimitivegroupFieldBuilder() : null;
3780 } else {
3781 primitivegroupBuilder_.addAllMessages(other.primitivegroup_);
3782 }
3783 }
3784 }
3785 if (other.hasGranularity()) {
3786 setGranularity(other.getGranularity());
3787 }
3788 if (other.hasLatOffset()) {
3789 setLatOffset(other.getLatOffset());
3790 }
3791 if (other.hasLonOffset()) {
3792 setLonOffset(other.getLonOffset());
3793 }
3794 if (other.hasDateGranularity()) {
3795 setDateGranularity(other.getDateGranularity());
3796 }
3797 this.mergeUnknownFields(other.unknownFields);
3798 onChanged();
3799 return this;
3800 }
3801
3802 @java.lang.Override
3803 public final boolean isInitialized() {
3804 if (!hasStringtable()) {
3805 return false;
3806 }
3807 for (int i = 0; i < getPrimitivegroupCount(); i++) {
3808 if (!getPrimitivegroup(i).isInitialized()) {
3809 return false;
3810 }
3811 }
3812 return true;
3813 }
3814
3815 @java.lang.Override
3816 public Builder mergeFrom(
3817 com.google.protobuf.CodedInputStream input,
3818 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3819 throws java.io.IOException {
3820 org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveBlock parsedMessage = null;
3821 try {
3822 parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
3823 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
3824 parsedMessage = (org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveBlock) e.getUnfinishedMessage();
3825 throw e.unwrapIOException();
3826 } finally {
3827 if (parsedMessage != null) {
3828 mergeFrom(parsedMessage);
3829 }
3830 }
3831 return this;
3832 }
3833 private int bitField0_;
3834
3835 private org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable stringtable_;
3836 private com.google.protobuf.SingleFieldBuilderV3<
3837 org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable, org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable.Builder, org.openstreetmap.osmosis.osmbinary.Osmformat.StringTableOrBuilder> stringtableBuilder_;
3838 /**
3839 * <code>required .OSMPBF.StringTable stringtable = 1;</code>
3840 * @return Whether the stringtable field is set.
3841 */
3842 public boolean hasStringtable() {
3843 return ((bitField0_ & 0x00000001) != 0);
3844 }
3845 /**
3846 * <code>required .OSMPBF.StringTable stringtable = 1;</code>
3847 * @return The stringtable.
3848 */
3849 public org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable getStringtable() {
3850 if (stringtableBuilder_ == null) {
3851 return stringtable_ == null ? org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable.getDefaultInstance() : stringtable_;
3852 } else {
3853 return stringtableBuilder_.getMessage();
3854 }
3855 }
3856 /**
3857 * <code>required .OSMPBF.StringTable stringtable = 1;</code>
3858 */
3859 public Builder setStringtable(org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable value) {
3860 if (stringtableBuilder_ == null) {
3861 if (value == null) {
3862 throw new NullPointerException();
3863 }
3864 stringtable_ = value;
3865 onChanged();
3866 } else {
3867 stringtableBuilder_.setMessage(value);
3868 }
3869 bitField0_ |= 0x00000001;
3870 return this;
3871 }
3872 /**
3873 * <code>required .OSMPBF.StringTable stringtable = 1;</code>
3874 */
3875 public Builder setStringtable(
3876 org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable.Builder builderForValue) {
3877 if (stringtableBuilder_ == null) {
3878 stringtable_ = builderForValue.build();
3879 onChanged();
3880 } else {
3881 stringtableBuilder_.setMessage(builderForValue.build());
3882 }
3883 bitField0_ |= 0x00000001;
3884 return this;
3885 }
3886 /**
3887 * <code>required .OSMPBF.StringTable stringtable = 1;</code>
3888 */
3889 public Builder mergeStringtable(org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable value) {
3890 if (stringtableBuilder_ == null) {
3891 if (((bitField0_ & 0x00000001) != 0) &&
3892 stringtable_ != null &&
3893 stringtable_ != org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable.getDefaultInstance()) {
3894 stringtable_ =
3895 org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable.newBuilder(stringtable_).mergeFrom(value).buildPartial();
3896 } else {
3897 stringtable_ = value;
3898 }
3899 onChanged();
3900 } else {
3901 stringtableBuilder_.mergeFrom(value);
3902 }
3903 bitField0_ |= 0x00000001;
3904 return this;
3905 }
3906 /**
3907 * <code>required .OSMPBF.StringTable stringtable = 1;</code>
3908 */
3909 public Builder clearStringtable() {
3910 if (stringtableBuilder_ == null) {
3911 stringtable_ = null;
3912 onChanged();
3913 } else {
3914 stringtableBuilder_.clear();
3915 }
3916 bitField0_ = (bitField0_ & ~0x00000001);
3917 return this;
3918 }
3919 /**
3920 * <code>required .OSMPBF.StringTable stringtable = 1;</code>
3921 */
3922 public org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable.Builder getStringtableBuilder() {
3923 bitField0_ |= 0x00000001;
3924 onChanged();
3925 return getStringtableFieldBuilder().getBuilder();
3926 }
3927 /**
3928 * <code>required .OSMPBF.StringTable stringtable = 1;</code>
3929 */
3930 public org.openstreetmap.osmosis.osmbinary.Osmformat.StringTableOrBuilder getStringtableOrBuilder() {
3931 if (stringtableBuilder_ != null) {
3932 return stringtableBuilder_.getMessageOrBuilder();
3933 } else {
3934 return stringtable_ == null ?
3935 org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable.getDefaultInstance() : stringtable_;
3936 }
3937 }
3938 /**
3939 * <code>required .OSMPBF.StringTable stringtable = 1;</code>
3940 */
3941 private com.google.protobuf.SingleFieldBuilderV3<
3942 org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable, org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable.Builder, org.openstreetmap.osmosis.osmbinary.Osmformat.StringTableOrBuilder>
3943 getStringtableFieldBuilder() {
3944 if (stringtableBuilder_ == null) {
3945 stringtableBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
3946 org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable, org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable.Builder, org.openstreetmap.osmosis.osmbinary.Osmformat.StringTableOrBuilder>(
3947 getStringtable(),
3948 getParentForChildren(),
3949 isClean());
3950 stringtable_ = null;
3951 }
3952 return stringtableBuilder_;
3953 }
3954
3955 private java.util.List<org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup> primitivegroup_ =
3956 java.util.Collections.emptyList();
3957 private void ensurePrimitivegroupIsMutable() {
3958 if (!((bitField0_ & 0x00000002) != 0)) {
3959 primitivegroup_ = new java.util.ArrayList<org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup>(primitivegroup_);
3960 bitField0_ |= 0x00000002;
3961 }
3962 }
3963
3964 private com.google.protobuf.RepeatedFieldBuilderV3<
3965 org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup, org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup.Builder, org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroupOrBuilder> primitivegroupBuilder_;
3966
3967 /**
3968 * <code>repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;</code>
3969 */
3970 public java.util.List<org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup> getPrimitivegroupList() {
3971 if (primitivegroupBuilder_ == null) {
3972 return java.util.Collections.unmodifiableList(primitivegroup_);
3973 } else {
3974 return primitivegroupBuilder_.getMessageList();
3975 }
3976 }
3977 /**
3978 * <code>repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;</code>
3979 */
3980 public int getPrimitivegroupCount() {
3981 if (primitivegroupBuilder_ == null) {
3982 return primitivegroup_.size();
3983 } else {
3984 return primitivegroupBuilder_.getCount();
3985 }
3986 }
3987 /**
3988 * <code>repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;</code>
3989 */
3990 public org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup getPrimitivegroup(int index) {
3991 if (primitivegroupBuilder_ == null) {
3992 return primitivegroup_.get(index);
3993 } else {
3994 return primitivegroupBuilder_.getMessage(index);
3995 }
3996 }
3997 /**
3998 * <code>repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;</code>
3999 */
4000 public Builder setPrimitivegroup(
4001 int index, org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup value) {
4002 if (primitivegroupBuilder_ == null) {
4003 if (value == null) {
4004 throw new NullPointerException();
4005 }
4006 ensurePrimitivegroupIsMutable();
4007 primitivegroup_.set(index, value);
4008 onChanged();
4009 } else {
4010 primitivegroupBuilder_.setMessage(index, value);
4011 }
4012 return this;
4013 }
4014 /**
4015 * <code>repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;</code>
4016 */
4017 public Builder setPrimitivegroup(
4018 int index, org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup.Builder builderForValue) {
4019 if (primitivegroupBuilder_ == null) {
4020 ensurePrimitivegroupIsMutable();
4021 primitivegroup_.set(index, builderForValue.build());
4022 onChanged();
4023 } else {
4024 primitivegroupBuilder_.setMessage(index, builderForValue.build());
4025 }
4026 return this;
4027 }
4028 /**
4029 * <code>repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;</code>
4030 */
4031 public Builder addPrimitivegroup(org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup value) {
4032 if (primitivegroupBuilder_ == null) {
4033 if (value == null) {
4034 throw new NullPointerException();
4035 }
4036 ensurePrimitivegroupIsMutable();
4037 primitivegroup_.add(value);
4038 onChanged();
4039 } else {
4040 primitivegroupBuilder_.addMessage(value);
4041 }
4042 return this;
4043 }
4044 /**
4045 * <code>repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;</code>
4046 */
4047 public Builder addPrimitivegroup(
4048 int index, org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup value) {
4049 if (primitivegroupBuilder_ == null) {
4050 if (value == null) {
4051 throw new NullPointerException();
4052 }
4053 ensurePrimitivegroupIsMutable();
4054 primitivegroup_.add(index, value);
4055 onChanged();
4056 } else {
4057 primitivegroupBuilder_.addMessage(index, value);
4058 }
4059 return this;
4060 }
4061 /**
4062 * <code>repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;</code>
4063 */
4064 public Builder addPrimitivegroup(
4065 org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup.Builder builderForValue) {
4066 if (primitivegroupBuilder_ == null) {
4067 ensurePrimitivegroupIsMutable();
4068 primitivegroup_.add(builderForValue.build());
4069 onChanged();
4070 } else {
4071 primitivegroupBuilder_.addMessage(builderForValue.build());
4072 }
4073 return this;
4074 }
4075 /**
4076 * <code>repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;</code>
4077 */
4078 public Builder addPrimitivegroup(
4079 int index, org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup.Builder builderForValue) {
4080 if (primitivegroupBuilder_ == null) {
4081 ensurePrimitivegroupIsMutable();
4082 primitivegroup_.add(index, builderForValue.build());
4083 onChanged();
4084 } else {
4085 primitivegroupBuilder_.addMessage(index, builderForValue.build());
4086 }
4087 return this;
4088 }
4089 /**
4090 * <code>repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;</code>
4091 */
4092 public Builder addAllPrimitivegroup(
4093 java.lang.Iterable<? extends org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup> values) {
4094 if (primitivegroupBuilder_ == null) {
4095 ensurePrimitivegroupIsMutable();
4096 com.google.protobuf.AbstractMessageLite.Builder.addAll(
4097 values, primitivegroup_);
4098 onChanged();
4099 } else {
4100 primitivegroupBuilder_.addAllMessages(values);
4101 }
4102 return this;
4103 }
4104 /**
4105 * <code>repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;</code>
4106 */
4107 public Builder clearPrimitivegroup() {
4108 if (primitivegroupBuilder_ == null) {
4109 primitivegroup_ = java.util.Collections.emptyList();
4110 bitField0_ = (bitField0_ & ~0x00000002);
4111 onChanged();
4112 } else {
4113 primitivegroupBuilder_.clear();
4114 }
4115 return this;
4116 }
4117 /**
4118 * <code>repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;</code>
4119 */
4120 public Builder removePrimitivegroup(int index) {
4121 if (primitivegroupBuilder_ == null) {
4122 ensurePrimitivegroupIsMutable();
4123 primitivegroup_.remove(index);
4124 onChanged();
4125 } else {
4126 primitivegroupBuilder_.remove(index);
4127 }
4128 return this;
4129 }
4130 /**
4131 * <code>repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;</code>
4132 */
4133 public org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup.Builder getPrimitivegroupBuilder(
4134 int index) {
4135 return getPrimitivegroupFieldBuilder().getBuilder(index);
4136 }
4137 /**
4138 * <code>repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;</code>
4139 */
4140 public org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroupOrBuilder getPrimitivegroupOrBuilder(
4141 int index) {
4142 if (primitivegroupBuilder_ == null) {
4143 return primitivegroup_.get(index); } else {
4144 return primitivegroupBuilder_.getMessageOrBuilder(index);
4145 }
4146 }
4147 /**
4148 * <code>repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;</code>
4149 */
4150 public java.util.List<? extends org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroupOrBuilder>
4151 getPrimitivegroupOrBuilderList() {
4152 if (primitivegroupBuilder_ != null) {
4153 return primitivegroupBuilder_.getMessageOrBuilderList();
4154 } else {
4155 return java.util.Collections.unmodifiableList(primitivegroup_);
4156 }
4157 }
4158 /**
4159 * <code>repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;</code>
4160 */
4161 public org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup.Builder addPrimitivegroupBuilder() {
4162 return getPrimitivegroupFieldBuilder().addBuilder(
4163 org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup.getDefaultInstance());
4164 }
4165 /**
4166 * <code>repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;</code>
4167 */
4168 public org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup.Builder addPrimitivegroupBuilder(
4169 int index) {
4170 return getPrimitivegroupFieldBuilder().addBuilder(
4171 index, org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup.getDefaultInstance());
4172 }
4173 /**
4174 * <code>repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;</code>
4175 */
4176 public java.util.List<org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup.Builder>
4177 getPrimitivegroupBuilderList() {
4178 return getPrimitivegroupFieldBuilder().getBuilderList();
4179 }
4180 private com.google.protobuf.RepeatedFieldBuilderV3<
4181 org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup, org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup.Builder, org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroupOrBuilder>
4182 getPrimitivegroupFieldBuilder() {
4183 if (primitivegroupBuilder_ == null) {
4184 primitivegroupBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
4185 org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup, org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup.Builder, org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroupOrBuilder>(
4186 primitivegroup_,
4187 ((bitField0_ & 0x00000002) != 0),
4188 getParentForChildren(),
4189 isClean());
4190 primitivegroup_ = null;
4191 }
4192 return primitivegroupBuilder_;
4193 }
4194
4195 private int granularity_ = 100;
4196 /**
4197 * <pre>
4198 * Granularity, units of nanodegrees, used to store coordinates in this block
4199 * </pre>
4200 *
4201 * <code>optional int32 granularity = 17 [default = 100];</code>
4202 * @return Whether the granularity field is set.
4203 */
4204 @java.lang.Override
4205 public boolean hasGranularity() {
4206 return ((bitField0_ & 0x00000004) != 0);
4207 }
4208 /**
4209 * <pre>
4210 * Granularity, units of nanodegrees, used to store coordinates in this block
4211 * </pre>
4212 *
4213 * <code>optional int32 granularity = 17 [default = 100];</code>
4214 * @return The granularity.
4215 */
4216 @java.lang.Override
4217 public int getGranularity() {
4218 return granularity_;
4219 }
4220 /**
4221 * <pre>
4222 * Granularity, units of nanodegrees, used to store coordinates in this block
4223 * </pre>
4224 *
4225 * <code>optional int32 granularity = 17 [default = 100];</code>
4226 * @param value The granularity to set.
4227 * @return This builder for chaining.
4228 */
4229 public Builder setGranularity(int value) {
4230 bitField0_ |= 0x00000004;
4231 granularity_ = value;
4232 onChanged();
4233 return this;
4234 }
4235 /**
4236 * <pre>
4237 * Granularity, units of nanodegrees, used to store coordinates in this block
4238 * </pre>
4239 *
4240 * <code>optional int32 granularity = 17 [default = 100];</code>
4241 * @return This builder for chaining.
4242 */
4243 public Builder clearGranularity() {
4244 bitField0_ = (bitField0_ & ~0x00000004);
4245 granularity_ = 100;
4246 onChanged();
4247 return this;
4248 }
4249
4250 private long latOffset_ ;
4251 /**
4252 * <pre>
4253 * Offset value between the output coordinates coordinates and the granularity grid in unites of nanodegrees.
4254 * </pre>
4255 *
4256 * <code>optional int64 lat_offset = 19 [default = 0];</code>
4257 * @return Whether the latOffset field is set.
4258 */
4259 @java.lang.Override
4260 public boolean hasLatOffset() {
4261 return ((bitField0_ & 0x00000008) != 0);
4262 }
4263 /**
4264 * <pre>
4265 * Offset value between the output coordinates coordinates and the granularity grid in unites of nanodegrees.
4266 * </pre>
4267 *
4268 * <code>optional int64 lat_offset = 19 [default = 0];</code>
4269 * @return The latOffset.
4270 */
4271 @java.lang.Override
4272 public long getLatOffset() {
4273 return latOffset_;
4274 }
4275 /**
4276 * <pre>
4277 * Offset value between the output coordinates coordinates and the granularity grid in unites of nanodegrees.
4278 * </pre>
4279 *
4280 * <code>optional int64 lat_offset = 19 [default = 0];</code>
4281 * @param value The latOffset to set.
4282 * @return This builder for chaining.
4283 */
4284 public Builder setLatOffset(long value) {
4285 bitField0_ |= 0x00000008;
4286 latOffset_ = value;
4287 onChanged();
4288 return this;
4289 }
4290 /**
4291 * <pre>
4292 * Offset value between the output coordinates coordinates and the granularity grid in unites of nanodegrees.
4293 * </pre>
4294 *
4295 * <code>optional int64 lat_offset = 19 [default = 0];</code>
4296 * @return This builder for chaining.
4297 */
4298 public Builder clearLatOffset() {
4299 bitField0_ = (bitField0_ & ~0x00000008);
4300 latOffset_ = 0L;
4301 onChanged();
4302 return this;
4303 }
4304
4305 private long lonOffset_ ;
4306 /**
4307 * <code>optional int64 lon_offset = 20 [default = 0];</code>
4308 * @return Whether the lonOffset field is set.
4309 */
4310 @java.lang.Override
4311 public boolean hasLonOffset() {
4312 return ((bitField0_ & 0x00000010) != 0);
4313 }
4314 /**
4315 * <code>optional int64 lon_offset = 20 [default = 0];</code>
4316 * @return The lonOffset.
4317 */
4318 @java.lang.Override
4319 public long getLonOffset() {
4320 return lonOffset_;
4321 }
4322 /**
4323 * <code>optional int64 lon_offset = 20 [default = 0];</code>
4324 * @param value The lonOffset to set.
4325 * @return This builder for chaining.
4326 */
4327 public Builder setLonOffset(long value) {
4328 bitField0_ |= 0x00000010;
4329 lonOffset_ = value;
4330 onChanged();
4331 return this;
4332 }
4333 /**
4334 * <code>optional int64 lon_offset = 20 [default = 0];</code>
4335 * @return This builder for chaining.
4336 */
4337 public Builder clearLonOffset() {
4338 bitField0_ = (bitField0_ & ~0x00000010);
4339 lonOffset_ = 0L;
4340 onChanged();
4341 return this;
4342 }
4343
4344 private int dateGranularity_ = 1000;
4345 /**
4346 * <pre>
4347 * Granularity of dates, normally represented in units of milliseconds since the 1970 epoch.
4348 * </pre>
4349 *
4350 * <code>optional int32 date_granularity = 18 [default = 1000];</code>
4351 * @return Whether the dateGranularity field is set.
4352 */
4353 @java.lang.Override
4354 public boolean hasDateGranularity() {
4355 return ((bitField0_ & 0x00000020) != 0);
4356 }
4357 /**
4358 * <pre>
4359 * Granularity of dates, normally represented in units of milliseconds since the 1970 epoch.
4360 * </pre>
4361 *
4362 * <code>optional int32 date_granularity = 18 [default = 1000];</code>
4363 * @return The dateGranularity.
4364 */
4365 @java.lang.Override
4366 public int getDateGranularity() {
4367 return dateGranularity_;
4368 }
4369 /**
4370 * <pre>
4371 * Granularity of dates, normally represented in units of milliseconds since the 1970 epoch.
4372 * </pre>
4373 *
4374 * <code>optional int32 date_granularity = 18 [default = 1000];</code>
4375 * @param value The dateGranularity to set.
4376 * @return This builder for chaining.
4377 */
4378 public Builder setDateGranularity(int value) {
4379 bitField0_ |= 0x00000020;
4380 dateGranularity_ = value;
4381 onChanged();
4382 return this;
4383 }
4384 /**
4385 * <pre>
4386 * Granularity of dates, normally represented in units of milliseconds since the 1970 epoch.
4387 * </pre>
4388 *
4389 * <code>optional int32 date_granularity = 18 [default = 1000];</code>
4390 * @return This builder for chaining.
4391 */
4392 public Builder clearDateGranularity() {
4393 bitField0_ = (bitField0_ & ~0x00000020);
4394 dateGranularity_ = 1000;
4395 onChanged();
4396 return this;
4397 }
4398 @java.lang.Override
4399 public final Builder setUnknownFields(
4400 final com.google.protobuf.UnknownFieldSet unknownFields) {
4401 return super.setUnknownFields(unknownFields);
4402 }
4403
4404 @java.lang.Override
4405 public final Builder mergeUnknownFields(
4406 final com.google.protobuf.UnknownFieldSet unknownFields) {
4407 return super.mergeUnknownFields(unknownFields);
4408 }
4409
4410
4411 // @@protoc_insertion_point(builder_scope:OSMPBF.PrimitiveBlock)
4412 }
4413
4414 // @@protoc_insertion_point(class_scope:OSMPBF.PrimitiveBlock)
4415 private static final org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveBlock DEFAULT_INSTANCE;
4416 static {
4417 DEFAULT_INSTANCE = new org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveBlock();
4418 }
4419
4420 public static org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveBlock getDefaultInstance() {
4421 return DEFAULT_INSTANCE;
4422 }
4423
4424 @java.lang.Deprecated public static final com.google.protobuf.Parser<PrimitiveBlock>
4425 PARSER = new com.google.protobuf.AbstractParser<PrimitiveBlock>() {
4426 @java.lang.Override
4427 public PrimitiveBlock parsePartialFrom(
4428 com.google.protobuf.CodedInputStream input,
4429 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
4430 throws com.google.protobuf.InvalidProtocolBufferException {
4431 return new PrimitiveBlock(input, extensionRegistry);
4432 }
4433 };
4434
4435 public static com.google.protobuf.Parser<PrimitiveBlock> parser() {
4436 return PARSER;
4437 }
4438
4439 @java.lang.Override
4440 public com.google.protobuf.Parser<PrimitiveBlock> getParserForType() {
4441 return PARSER;
4442 }
4443
4444 @java.lang.Override
4445 public org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveBlock getDefaultInstanceForType() {
4446 return DEFAULT_INSTANCE;
4447 }
4448
4449 }
4450
4451 public interface PrimitiveGroupOrBuilder extends
4452 // @@protoc_insertion_point(interface_extends:OSMPBF.PrimitiveGroup)
4453 com.google.protobuf.MessageOrBuilder {
4454
4455 /**
4456 * <code>repeated .OSMPBF.Node nodes = 1;</code>
4457 */
4458 java.util.List<org.openstreetmap.osmosis.osmbinary.Osmformat.Node>
4459 getNodesList();
4460 /**
4461 * <code>repeated .OSMPBF.Node nodes = 1;</code>
4462 */
4463 org.openstreetmap.osmosis.osmbinary.Osmformat.Node getNodes(int index);
4464 /**
4465 * <code>repeated .OSMPBF.Node nodes = 1;</code>
4466 */
4467 int getNodesCount();
4468 /**
4469 * <code>repeated .OSMPBF.Node nodes = 1;</code>
4470 */
4471 java.util.List<? extends org.openstreetmap.osmosis.osmbinary.Osmformat.NodeOrBuilder>
4472 getNodesOrBuilderList();
4473 /**
4474 * <code>repeated .OSMPBF.Node nodes = 1;</code>
4475 */
4476 org.openstreetmap.osmosis.osmbinary.Osmformat.NodeOrBuilder getNodesOrBuilder(
4477 int index);
4478
4479 /**
4480 * <code>optional .OSMPBF.DenseNodes dense = 2;</code>
4481 * @return Whether the dense field is set.
4482 */
4483 boolean hasDense();
4484 /**
4485 * <code>optional .OSMPBF.DenseNodes dense = 2;</code>
4486 * @return The dense.
4487 */
4488 org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes getDense();
4489 /**
4490 * <code>optional .OSMPBF.DenseNodes dense = 2;</code>
4491 */
4492 org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodesOrBuilder getDenseOrBuilder();
4493
4494 /**
4495 * <code>repeated .OSMPBF.Way ways = 3;</code>
4496 */
4497 java.util.List<org.openstreetmap.osmosis.osmbinary.Osmformat.Way>
4498 getWaysList();
4499 /**
4500 * <code>repeated .OSMPBF.Way ways = 3;</code>
4501 */
4502 org.openstreetmap.osmosis.osmbinary.Osmformat.Way getWays(int index);
4503 /**
4504 * <code>repeated .OSMPBF.Way ways = 3;</code>
4505 */
4506 int getWaysCount();
4507 /**
4508 * <code>repeated .OSMPBF.Way ways = 3;</code>
4509 */
4510 java.util.List<? extends org.openstreetmap.osmosis.osmbinary.Osmformat.WayOrBuilder>
4511 getWaysOrBuilderList();
4512 /**
4513 * <code>repeated .OSMPBF.Way ways = 3;</code>
4514 */
4515 org.openstreetmap.osmosis.osmbinary.Osmformat.WayOrBuilder getWaysOrBuilder(
4516 int index);
4517
4518 /**
4519 * <code>repeated .OSMPBF.Relation relations = 4;</code>
4520 */
4521 java.util.List<org.openstreetmap.osmosis.osmbinary.Osmformat.Relation>
4522 getRelationsList();
4523 /**
4524 * <code>repeated .OSMPBF.Relation relations = 4;</code>
4525 */
4526 org.openstreetmap.osmosis.osmbinary.Osmformat.Relation getRelations(int index);
4527 /**
4528 * <code>repeated .OSMPBF.Relation relations = 4;</code>
4529 */
4530 int getRelationsCount();
4531 /**
4532 * <code>repeated .OSMPBF.Relation relations = 4;</code>
4533 */
4534 java.util.List<? extends org.openstreetmap.osmosis.osmbinary.Osmformat.RelationOrBuilder>
4535 getRelationsOrBuilderList();
4536 /**
4537 * <code>repeated .OSMPBF.Relation relations = 4;</code>
4538 */
4539 org.openstreetmap.osmosis.osmbinary.Osmformat.RelationOrBuilder getRelationsOrBuilder(
4540 int index);
4541
4542 /**
4543 * <code>repeated .OSMPBF.ChangeSet changesets = 5;</code>
4544 */
4545 java.util.List<org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet>
4546 getChangesetsList();
4547 /**
4548 * <code>repeated .OSMPBF.ChangeSet changesets = 5;</code>
4549 */
4550 org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet getChangesets(int index);
4551 /**
4552 * <code>repeated .OSMPBF.ChangeSet changesets = 5;</code>
4553 */
4554 int getChangesetsCount();
4555 /**
4556 * <code>repeated .OSMPBF.ChangeSet changesets = 5;</code>
4557 */
4558 java.util.List<? extends org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSetOrBuilder>
4559 getChangesetsOrBuilderList();
4560 /**
4561 * <code>repeated .OSMPBF.ChangeSet changesets = 5;</code>
4562 */
4563 org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSetOrBuilder getChangesetsOrBuilder(
4564 int index);
4565 }
4566 /**
4567 * <pre>
4568 * Group of OSMPrimitives. All primitives in a group must be the same type.
4569 * </pre>
4570 *
4571 * Protobuf type {@code OSMPBF.PrimitiveGroup}
4572 */
4573 public static final class PrimitiveGroup extends
4574 com.google.protobuf.GeneratedMessageV3 implements
4575 // @@protoc_insertion_point(message_implements:OSMPBF.PrimitiveGroup)
4576 PrimitiveGroupOrBuilder {
4577 private static final long serialVersionUID = 0L;
4578 // Use PrimitiveGroup.newBuilder() to construct.
4579 private PrimitiveGroup(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
4580 super(builder);
4581 }
4582 private PrimitiveGroup() {
4583 nodes_ = java.util.Collections.emptyList();
4584 ways_ = java.util.Collections.emptyList();
4585 relations_ = java.util.Collections.emptyList();
4586 changesets_ = java.util.Collections.emptyList();
4587 }
4588
4589 @java.lang.Override
4590 @SuppressWarnings({"unused"})
4591 protected java.lang.Object newInstance(
4592 UnusedPrivateParameter unused) {
4593 return new PrimitiveGroup();
4594 }
4595
4596 @java.lang.Override
4597 public final com.google.protobuf.UnknownFieldSet
4598 getUnknownFields() {
4599 return this.unknownFields;
4600 }
4601 private PrimitiveGroup(
4602 com.google.protobuf.CodedInputStream input,
4603 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
4604 throws com.google.protobuf.InvalidProtocolBufferException {
4605 this();
4606 if (extensionRegistry == null) {
4607 throw new java.lang.NullPointerException();
4608 }
4609 int mutable_bitField0_ = 0;
4610 com.google.protobuf.UnknownFieldSet.Builder unknownFields =
4611 com.google.protobuf.UnknownFieldSet.newBuilder();
4612 try {
4613 boolean done = false;
4614 while (!done) {
4615 int tag = input.readTag();
4616 switch (tag) {
4617 case 0:
4618 done = true;
4619 break;
4620 case 10: {
4621 if (!((mutable_bitField0_ & 0x00000001) != 0)) {
4622 nodes_ = new java.util.ArrayList<org.openstreetmap.osmosis.osmbinary.Osmformat.Node>();
4623 mutable_bitField0_ |= 0x00000001;
4624 }
4625 nodes_.add(
4626 input.readMessage(org.openstreetmap.osmosis.osmbinary.Osmformat.Node.PARSER, extensionRegistry));
4627 break;
4628 }
4629 case 18: {
4630 org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes.Builder subBuilder = null;
4631 if (((bitField0_ & 0x00000001) != 0)) {
4632 subBuilder = dense_.toBuilder();
4633 }
4634 dense_ = input.readMessage(org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes.PARSER, extensionRegistry);
4635 if (subBuilder != null) {
4636 subBuilder.mergeFrom(dense_);
4637 dense_ = subBuilder.buildPartial();
4638 }
4639 bitField0_ |= 0x00000001;
4640 break;
4641 }
4642 case 26: {
4643 if (!((mutable_bitField0_ & 0x00000004) != 0)) {
4644 ways_ = new java.util.ArrayList<org.openstreetmap.osmosis.osmbinary.Osmformat.Way>();
4645 mutable_bitField0_ |= 0x00000004;
4646 }
4647 ways_.add(
4648 input.readMessage(org.openstreetmap.osmosis.osmbinary.Osmformat.Way.PARSER, extensionRegistry));
4649 break;
4650 }
4651 case 34: {
4652 if (!((mutable_bitField0_ & 0x00000008) != 0)) {
4653 relations_ = new java.util.ArrayList<org.openstreetmap.osmosis.osmbinary.Osmformat.Relation>();
4654 mutable_bitField0_ |= 0x00000008;
4655 }
4656 relations_.add(
4657 input.readMessage(org.openstreetmap.osmosis.osmbinary.Osmformat.Relation.PARSER, extensionRegistry));
4658 break;
4659 }
4660 case 42: {
4661 if (!((mutable_bitField0_ & 0x00000010) != 0)) {
4662 changesets_ = new java.util.ArrayList<org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet>();
4663 mutable_bitField0_ |= 0x00000010;
4664 }
4665 changesets_.add(
4666 input.readMessage(org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet.PARSER, extensionRegistry));
4667 break;
4668 }
4669 default: {
4670 if (!parseUnknownField(
4671 input, unknownFields, extensionRegistry, tag)) {
4672 done = true;
4673 }
4674 break;
4675 }
4676 }
4677 }
4678 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
4679 throw e.setUnfinishedMessage(this);
4680 } catch (java.io.IOException e) {
4681 throw new com.google.protobuf.InvalidProtocolBufferException(
4682 e).setUnfinishedMessage(this);
4683 } finally {
4684 if (((mutable_bitField0_ & 0x00000001) != 0)) {
4685 nodes_ = java.util.Collections.unmodifiableList(nodes_);
4686 }
4687 if (((mutable_bitField0_ & 0x00000004) != 0)) {
4688 ways_ = java.util.Collections.unmodifiableList(ways_);
4689 }
4690 if (((mutable_bitField0_ & 0x00000008) != 0)) {
4691 relations_ = java.util.Collections.unmodifiableList(relations_);
4692 }
4693 if (((mutable_bitField0_ & 0x00000010) != 0)) {
4694 changesets_ = java.util.Collections.unmodifiableList(changesets_);
4695 }
4696 this.unknownFields = unknownFields.build();
4697 makeExtensionsImmutable();
4698 }
4699 }
4700 public static final com.google.protobuf.Descriptors.Descriptor
4701 getDescriptor() {
4702 return org.openstreetmap.osmosis.osmbinary.Osmformat.internal_static_OSMPBF_PrimitiveGroup_descriptor;
4703 }
4704
4705 @java.lang.Override
4706 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
4707 internalGetFieldAccessorTable() {
4708 return org.openstreetmap.osmosis.osmbinary.Osmformat.internal_static_OSMPBF_PrimitiveGroup_fieldAccessorTable
4709 .ensureFieldAccessorsInitialized(
4710 org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup.class, org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup.Builder.class);
4711 }
4712
4713 private int bitField0_;
4714 public static final int NODES_FIELD_NUMBER = 1;
4715 private java.util.List<org.openstreetmap.osmosis.osmbinary.Osmformat.Node> nodes_;
4716 /**
4717 * <code>repeated .OSMPBF.Node nodes = 1;</code>
4718 */
4719 @java.lang.Override
4720 public java.util.List<org.openstreetmap.osmosis.osmbinary.Osmformat.Node> getNodesList() {
4721 return nodes_;
4722 }
4723 /**
4724 * <code>repeated .OSMPBF.Node nodes = 1;</code>
4725 */
4726 @java.lang.Override
4727 public java.util.List<? extends org.openstreetmap.osmosis.osmbinary.Osmformat.NodeOrBuilder>
4728 getNodesOrBuilderList() {
4729 return nodes_;
4730 }
4731 /**
4732 * <code>repeated .OSMPBF.Node nodes = 1;</code>
4733 */
4734 @java.lang.Override
4735 public int getNodesCount() {
4736 return nodes_.size();
4737 }
4738 /**
4739 * <code>repeated .OSMPBF.Node nodes = 1;</code>
4740 */
4741 @java.lang.Override
4742 public org.openstreetmap.osmosis.osmbinary.Osmformat.Node getNodes(int index) {
4743 return nodes_.get(index);
4744 }
4745 /**
4746 * <code>repeated .OSMPBF.Node nodes = 1;</code>
4747 */
4748 @java.lang.Override
4749 public org.openstreetmap.osmosis.osmbinary.Osmformat.NodeOrBuilder getNodesOrBuilder(
4750 int index) {
4751 return nodes_.get(index);
4752 }
4753
4754 public static final int DENSE_FIELD_NUMBER = 2;
4755 private org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes dense_;
4756 /**
4757 * <code>optional .OSMPBF.DenseNodes dense = 2;</code>
4758 * @return Whether the dense field is set.
4759 */
4760 @java.lang.Override
4761 public boolean hasDense() {
4762 return ((bitField0_ & 0x00000001) != 0);
4763 }
4764 /**
4765 * <code>optional .OSMPBF.DenseNodes dense = 2;</code>
4766 * @return The dense.
4767 */
4768 @java.lang.Override
4769 public org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes getDense() {
4770 return dense_ == null ? org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes.getDefaultInstance() : dense_;
4771 }
4772 /**
4773 * <code>optional .OSMPBF.DenseNodes dense = 2;</code>
4774 */
4775 @java.lang.Override
4776 public org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodesOrBuilder getDenseOrBuilder() {
4777 return dense_ == null ? org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes.getDefaultInstance() : dense_;
4778 }
4779
4780 public static final int WAYS_FIELD_NUMBER = 3;
4781 private java.util.List<org.openstreetmap.osmosis.osmbinary.Osmformat.Way> ways_;
4782 /**
4783 * <code>repeated .OSMPBF.Way ways = 3;</code>
4784 */
4785 @java.lang.Override
4786 public java.util.List<org.openstreetmap.osmosis.osmbinary.Osmformat.Way> getWaysList() {
4787 return ways_;
4788 }
4789 /**
4790 * <code>repeated .OSMPBF.Way ways = 3;</code>
4791 */
4792 @java.lang.Override
4793 public java.util.List<? extends org.openstreetmap.osmosis.osmbinary.Osmformat.WayOrBuilder>
4794 getWaysOrBuilderList() {
4795 return ways_;
4796 }
4797 /**
4798 * <code>repeated .OSMPBF.Way ways = 3;</code>
4799 */
4800 @java.lang.Override
4801 public int getWaysCount() {
4802 return ways_.size();
4803 }
4804 /**
4805 * <code>repeated .OSMPBF.Way ways = 3;</code>
4806 */
4807 @java.lang.Override
4808 public org.openstreetmap.osmosis.osmbinary.Osmformat.Way getWays(int index) {
4809 return ways_.get(index);
4810 }
4811 /**
4812 * <code>repeated .OSMPBF.Way ways = 3;</code>
4813 */
4814 @java.lang.Override
4815 public org.openstreetmap.osmosis.osmbinary.Osmformat.WayOrBuilder getWaysOrBuilder(
4816 int index) {
4817 return ways_.get(index);
4818 }
4819
4820 public static final int RELATIONS_FIELD_NUMBER = 4;
4821 private java.util.List<org.openstreetmap.osmosis.osmbinary.Osmformat.Relation> relations_;
4822 /**
4823 * <code>repeated .OSMPBF.Relation relations = 4;</code>
4824 */
4825 @java.lang.Override
4826 public java.util.List<org.openstreetmap.osmosis.osmbinary.Osmformat.Relation> getRelationsList() {
4827 return relations_;
4828 }
4829 /**
4830 * <code>repeated .OSMPBF.Relation relations = 4;</code>
4831 */
4832 @java.lang.Override
4833 public java.util.List<? extends org.openstreetmap.osmosis.osmbinary.Osmformat.RelationOrBuilder>
4834 getRelationsOrBuilderList() {
4835 return relations_;
4836 }
4837 /**
4838 * <code>repeated .OSMPBF.Relation relations = 4;</code>
4839 */
4840 @java.lang.Override
4841 public int getRelationsCount() {
4842 return relations_.size();
4843 }
4844 /**
4845 * <code>repeated .OSMPBF.Relation relations = 4;</code>
4846 */
4847 @java.lang.Override
4848 public org.openstreetmap.osmosis.osmbinary.Osmformat.Relation getRelations(int index) {
4849 return relations_.get(index);
4850 }
4851 /**
4852 * <code>repeated .OSMPBF.Relation relations = 4;</code>
4853 */
4854 @java.lang.Override
4855 public org.openstreetmap.osmosis.osmbinary.Osmformat.RelationOrBuilder getRelationsOrBuilder(
4856 int index) {
4857 return relations_.get(index);
4858 }
4859
4860 public static final int CHANGESETS_FIELD_NUMBER = 5;
4861 private java.util.List<org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet> changesets_;
4862 /**
4863 * <code>repeated .OSMPBF.ChangeSet changesets = 5;</code>
4864 */
4865 @java.lang.Override
4866 public java.util.List<org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet> getChangesetsList() {
4867 return changesets_;
4868 }
4869 /**
4870 * <code>repeated .OSMPBF.ChangeSet changesets = 5;</code>
4871 */
4872 @java.lang.Override
4873 public java.util.List<? extends org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSetOrBuilder>
4874 getChangesetsOrBuilderList() {
4875 return changesets_;
4876 }
4877 /**
4878 * <code>repeated .OSMPBF.ChangeSet changesets = 5;</code>
4879 */
4880 @java.lang.Override
4881 public int getChangesetsCount() {
4882 return changesets_.size();
4883 }
4884 /**
4885 * <code>repeated .OSMPBF.ChangeSet changesets = 5;</code>
4886 */
4887 @java.lang.Override
4888 public org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet getChangesets(int index) {
4889 return changesets_.get(index);
4890 }
4891 /**
4892 * <code>repeated .OSMPBF.ChangeSet changesets = 5;</code>
4893 */
4894 @java.lang.Override
4895 public org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSetOrBuilder getChangesetsOrBuilder(
4896 int index) {
4897 return changesets_.get(index);
4898 }
4899
4900 private byte memoizedIsInitialized = -1;
4901 @java.lang.Override
4902 public final boolean isInitialized() {
4903 byte isInitialized = memoizedIsInitialized;
4904 if (isInitialized == 1) return true;
4905 if (isInitialized == 0) return false;
4906
4907 for (int i = 0; i < getNodesCount(); i++) {
4908 if (!getNodes(i).isInitialized()) {
4909 memoizedIsInitialized = 0;
4910 return false;
4911 }
4912 }
4913 for (int i = 0; i < getWaysCount(); i++) {
4914 if (!getWays(i).isInitialized()) {
4915 memoizedIsInitialized = 0;
4916 return false;
4917 }
4918 }
4919 for (int i = 0; i < getRelationsCount(); i++) {
4920 if (!getRelations(i).isInitialized()) {
4921 memoizedIsInitialized = 0;
4922 return false;
4923 }
4924 }
4925 for (int i = 0; i < getChangesetsCount(); i++) {
4926 if (!getChangesets(i).isInitialized()) {
4927 memoizedIsInitialized = 0;
4928 return false;
4929 }
4930 }
4931 memoizedIsInitialized = 1;
4932 return true;
4933 }
4934
4935 @java.lang.Override
4936 public void writeTo(com.google.protobuf.CodedOutputStream output)
4937 throws java.io.IOException {
4938 for (int i = 0; i < nodes_.size(); i++) {
4939 output.writeMessage(1, nodes_.get(i));
4940 }
4941 if (((bitField0_ & 0x00000001) != 0)) {
4942 output.writeMessage(2, getDense());
4943 }
4944 for (int i = 0; i < ways_.size(); i++) {
4945 output.writeMessage(3, ways_.get(i));
4946 }
4947 for (int i = 0; i < relations_.size(); i++) {
4948 output.writeMessage(4, relations_.get(i));
4949 }
4950 for (int i = 0; i < changesets_.size(); i++) {
4951 output.writeMessage(5, changesets_.get(i));
4952 }
4953 unknownFields.writeTo(output);
4954 }
4955
4956 @java.lang.Override
4957 public int getSerializedSize() {
4958 int size = memoizedSize;
4959 if (size != -1) return size;
4960
4961 size = 0;
4962 for (int i = 0; i < nodes_.size(); i++) {
4963 size += com.google.protobuf.CodedOutputStream
4964 .computeMessageSize(1, nodes_.get(i));
4965 }
4966 if (((bitField0_ & 0x00000001) != 0)) {
4967 size += com.google.protobuf.CodedOutputStream
4968 .computeMessageSize(2, getDense());
4969 }
4970 for (int i = 0; i < ways_.size(); i++) {
4971 size += com.google.protobuf.CodedOutputStream
4972 .computeMessageSize(3, ways_.get(i));
4973 }
4974 for (int i = 0; i < relations_.size(); i++) {
4975 size += com.google.protobuf.CodedOutputStream
4976 .computeMessageSize(4, relations_.get(i));
4977 }
4978 for (int i = 0; i < changesets_.size(); i++) {
4979 size += com.google.protobuf.CodedOutputStream
4980 .computeMessageSize(5, changesets_.get(i));
4981 }
4982 size += unknownFields.getSerializedSize();
4983 memoizedSize = size;
4984 return size;
4985 }
4986
4987 @java.lang.Override
4988 public boolean equals(final java.lang.Object obj) {
4989 if (obj == this) {
4990 return true;
4991 }
4992 if (!(obj instanceof org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup)) {
4993 return super.equals(obj);
4994 }
4995 org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup other = (org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup) obj;
4996
4997 if (!getNodesList()
4998 .equals(other.getNodesList())) return false;
4999 if (hasDense() != other.hasDense()) return false;
5000 if (hasDense()) {
5001 if (!getDense()
5002 .equals(other.getDense())) return false;
5003 }
5004 if (!getWaysList()
5005 .equals(other.getWaysList())) return false;
5006 if (!getRelationsList()
5007 .equals(other.getRelationsList())) return false;
5008 if (!getChangesetsList()
5009 .equals(other.getChangesetsList())) return false;
5010 if (!unknownFields.equals(other.unknownFields)) return false;
5011 return true;
5012 }
5013
5014 @java.lang.Override
5015 public int hashCode() {
5016 if (memoizedHashCode != 0) {
5017 return memoizedHashCode;
5018 }
5019 int hash = 41;
5020 hash = (19 * hash) + getDescriptor().hashCode();
5021 if (getNodesCount() > 0) {
5022 hash = (37 * hash) + NODES_FIELD_NUMBER;
5023 hash = (53 * hash) + getNodesList().hashCode();
5024 }
5025 if (hasDense()) {
5026 hash = (37 * hash) + DENSE_FIELD_NUMBER;
5027 hash = (53 * hash) + getDense().hashCode();
5028 }
5029 if (getWaysCount() > 0) {
5030 hash = (37 * hash) + WAYS_FIELD_NUMBER;
5031 hash = (53 * hash) + getWaysList().hashCode();
5032 }
5033 if (getRelationsCount() > 0) {
5034 hash = (37 * hash) + RELATIONS_FIELD_NUMBER;
5035 hash = (53 * hash) + getRelationsList().hashCode();
5036 }
5037 if (getChangesetsCount() > 0) {
5038 hash = (37 * hash) + CHANGESETS_FIELD_NUMBER;
5039 hash = (53 * hash) + getChangesetsList().hashCode();
5040 }
5041 hash = (29 * hash) + unknownFields.hashCode();
5042 memoizedHashCode = hash;
5043 return hash;
5044 }
5045
5046 public static org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup parseFrom(
5047 java.nio.ByteBuffer data)
5048 throws com.google.protobuf.InvalidProtocolBufferException {
5049 return PARSER.parseFrom(data);
5050 }
5051 public static org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup parseFrom(
5052 java.nio.ByteBuffer data,
5053 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
5054 throws com.google.protobuf.InvalidProtocolBufferException {
5055 return PARSER.parseFrom(data, extensionRegistry);
5056 }
5057 public static org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup parseFrom(
5058 com.google.protobuf.ByteString data)
5059 throws com.google.protobuf.InvalidProtocolBufferException {
5060 return PARSER.parseFrom(data);
5061 }
5062 public static org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup parseFrom(
5063 com.google.protobuf.ByteString data,
5064 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
5065 throws com.google.protobuf.InvalidProtocolBufferException {
5066 return PARSER.parseFrom(data, extensionRegistry);
5067 }
5068 public static org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup parseFrom(byte[] data)
5069 throws com.google.protobuf.InvalidProtocolBufferException {
5070 return PARSER.parseFrom(data);
5071 }
5072 public static org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup parseFrom(
5073 byte[] data,
5074 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
5075 throws com.google.protobuf.InvalidProtocolBufferException {
5076 return PARSER.parseFrom(data, extensionRegistry);
5077 }
5078 public static org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup parseFrom(java.io.InputStream input)
5079 throws java.io.IOException {
5080 return com.google.protobuf.GeneratedMessageV3
5081 .parseWithIOException(PARSER, input);
5082 }
5083 public static org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup parseFrom(
5084 java.io.InputStream input,
5085 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
5086 throws java.io.IOException {
5087 return com.google.protobuf.GeneratedMessageV3
5088 .parseWithIOException(PARSER, input, extensionRegistry);
5089 }
5090 public static org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup parseDelimitedFrom(java.io.InputStream input)
5091 throws java.io.IOException {
5092 return com.google.protobuf.GeneratedMessageV3
5093 .parseDelimitedWithIOException(PARSER, input);
5094 }
5095 public static org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup parseDelimitedFrom(
5096 java.io.InputStream input,
5097 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
5098 throws java.io.IOException {
5099 return com.google.protobuf.GeneratedMessageV3
5100 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
5101 }
5102 public static org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup parseFrom(
5103 com.google.protobuf.CodedInputStream input)
5104 throws java.io.IOException {
5105 return com.google.protobuf.GeneratedMessageV3
5106 .parseWithIOException(PARSER, input);
5107 }
5108 public static org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup parseFrom(
5109 com.google.protobuf.CodedInputStream input,
5110 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
5111 throws java.io.IOException {
5112 return com.google.protobuf.GeneratedMessageV3
5113 .parseWithIOException(PARSER, input, extensionRegistry);
5114 }
5115
5116 @java.lang.Override
5117 public Builder newBuilderForType() { return newBuilder(); }
5118 public static Builder newBuilder() {
5119 return DEFAULT_INSTANCE.toBuilder();
5120 }
5121 public static Builder newBuilder(org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup prototype) {
5122 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
5123 }
5124 @java.lang.Override
5125 public Builder toBuilder() {
5126 return this == DEFAULT_INSTANCE
5127 ? new Builder() : new Builder().mergeFrom(this);
5128 }
5129
5130 @java.lang.Override
5131 protected Builder newBuilderForType(
5132 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
5133 Builder builder = new Builder(parent);
5134 return builder;
5135 }
5136 /**
5137 * <pre>
5138 * Group of OSMPrimitives. All primitives in a group must be the same type.
5139 * </pre>
5140 *
5141 * Protobuf type {@code OSMPBF.PrimitiveGroup}
5142 */
5143 public static final class Builder extends
5144 com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
5145 // @@protoc_insertion_point(builder_implements:OSMPBF.PrimitiveGroup)
5146 org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroupOrBuilder {
5147 public static final com.google.protobuf.Descriptors.Descriptor
5148 getDescriptor() {
5149 return org.openstreetmap.osmosis.osmbinary.Osmformat.internal_static_OSMPBF_PrimitiveGroup_descriptor;
5150 }
5151
5152 @java.lang.Override
5153 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
5154 internalGetFieldAccessorTable() {
5155 return org.openstreetmap.osmosis.osmbinary.Osmformat.internal_static_OSMPBF_PrimitiveGroup_fieldAccessorTable
5156 .ensureFieldAccessorsInitialized(
5157 org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup.class, org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup.Builder.class);
5158 }
5159
5160 // Construct using org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup.newBuilder()
5161 private Builder() {
5162 maybeForceBuilderInitialization();
5163 }
5164
5165 private Builder(
5166 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
5167 super(parent);
5168 maybeForceBuilderInitialization();
5169 }
5170 private void maybeForceBuilderInitialization() {
5171 if (com.google.protobuf.GeneratedMessageV3
5172 .alwaysUseFieldBuilders) {
5173 getNodesFieldBuilder();
5174 getDenseFieldBuilder();
5175 getWaysFieldBuilder();
5176 getRelationsFieldBuilder();
5177 getChangesetsFieldBuilder();
5178 }
5179 }
5180 @java.lang.Override
5181 public Builder clear() {
5182 super.clear();
5183 if (nodesBuilder_ == null) {
5184 nodes_ = java.util.Collections.emptyList();
5185 bitField0_ = (bitField0_ & ~0x00000001);
5186 } else {
5187 nodesBuilder_.clear();
5188 }
5189 if (denseBuilder_ == null) {
5190 dense_ = null;
5191 } else {
5192 denseBuilder_.clear();
5193 }
5194 bitField0_ = (bitField0_ & ~0x00000002);
5195 if (waysBuilder_ == null) {
5196 ways_ = java.util.Collections.emptyList();
5197 bitField0_ = (bitField0_ & ~0x00000004);
5198 } else {
5199 waysBuilder_.clear();
5200 }
5201 if (relationsBuilder_ == null) {
5202 relations_ = java.util.Collections.emptyList();
5203 bitField0_ = (bitField0_ & ~0x00000008);
5204 } else {
5205 relationsBuilder_.clear();
5206 }
5207 if (changesetsBuilder_ == null) {
5208 changesets_ = java.util.Collections.emptyList();
5209 bitField0_ = (bitField0_ & ~0x00000010);
5210 } else {
5211 changesetsBuilder_.clear();
5212 }
5213 return this;
5214 }
5215
5216 @java.lang.Override
5217 public com.google.protobuf.Descriptors.Descriptor
5218 getDescriptorForType() {
5219 return org.openstreetmap.osmosis.osmbinary.Osmformat.internal_static_OSMPBF_PrimitiveGroup_descriptor;
5220 }
5221
5222 @java.lang.Override
5223 public org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup getDefaultInstanceForType() {
5224 return org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup.getDefaultInstance();
5225 }
5226
5227 @java.lang.Override
5228 public org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup build() {
5229 org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup result = buildPartial();
5230 if (!result.isInitialized()) {
5231 throw newUninitializedMessageException(result);
5232 }
5233 return result;
5234 }
5235
5236 @java.lang.Override
5237 public org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup buildPartial() {
5238 org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup result = new org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup(this);
5239 int from_bitField0_ = bitField0_;
5240 int to_bitField0_ = 0;
5241 if (nodesBuilder_ == null) {
5242 if (((bitField0_ & 0x00000001) != 0)) {
5243 nodes_ = java.util.Collections.unmodifiableList(nodes_);
5244 bitField0_ = (bitField0_ & ~0x00000001);
5245 }
5246 result.nodes_ = nodes_;
5247 } else {
5248 result.nodes_ = nodesBuilder_.build();
5249 }
5250 if (((from_bitField0_ & 0x00000002) != 0)) {
5251 if (denseBuilder_ == null) {
5252 result.dense_ = dense_;
5253 } else {
5254 result.dense_ = denseBuilder_.build();
5255 }
5256 to_bitField0_ |= 0x00000001;
5257 }
5258 if (waysBuilder_ == null) {
5259 if (((bitField0_ & 0x00000004) != 0)) {
5260 ways_ = java.util.Collections.unmodifiableList(ways_);
5261 bitField0_ = (bitField0_ & ~0x00000004);
5262 }
5263 result.ways_ = ways_;
5264 } else {
5265 result.ways_ = waysBuilder_.build();
5266 }
5267 if (relationsBuilder_ == null) {
5268 if (((bitField0_ & 0x00000008) != 0)) {
5269 relations_ = java.util.Collections.unmodifiableList(relations_);
5270 bitField0_ = (bitField0_ & ~0x00000008);
5271 }
5272 result.relations_ = relations_;
5273 } else {
5274 result.relations_ = relationsBuilder_.build();
5275 }
5276 if (changesetsBuilder_ == null) {
5277 if (((bitField0_ & 0x00000010) != 0)) {
5278 changesets_ = java.util.Collections.unmodifiableList(changesets_);
5279 bitField0_ = (bitField0_ & ~0x00000010);
5280 }
5281 result.changesets_ = changesets_;
5282 } else {
5283 result.changesets_ = changesetsBuilder_.build();
5284 }
5285 result.bitField0_ = to_bitField0_;
5286 onBuilt();
5287 return result;
5288 }
5289
5290 @java.lang.Override
5291 public Builder clone() {
5292 return super.clone();
5293 }
5294 @java.lang.Override
5295 public Builder setField(
5296 com.google.protobuf.Descriptors.FieldDescriptor field,
5297 java.lang.Object value) {
5298 return super.setField(field, value);
5299 }
5300 @java.lang.Override
5301 public Builder clearField(
5302 com.google.protobuf.Descriptors.FieldDescriptor field) {
5303 return super.clearField(field);
5304 }
5305 @java.lang.Override
5306 public Builder clearOneof(
5307 com.google.protobuf.Descriptors.OneofDescriptor oneof) {
5308 return super.clearOneof(oneof);
5309 }
5310 @java.lang.Override
5311 public Builder setRepeatedField(
5312 com.google.protobuf.Descriptors.FieldDescriptor field,
5313 int index, java.lang.Object value) {
5314 return super.setRepeatedField(field, index, value);
5315 }
5316 @java.lang.Override
5317 public Builder addRepeatedField(
5318 com.google.protobuf.Descriptors.FieldDescriptor field,
5319 java.lang.Object value) {
5320 return super.addRepeatedField(field, value);
5321 }
5322 @java.lang.Override
5323 public Builder mergeFrom(com.google.protobuf.Message other) {
5324 if (other instanceof org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup) {
5325 return mergeFrom((org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup)other);
5326 } else {
5327 super.mergeFrom(other);
5328 return this;
5329 }
5330 }
5331
5332 public Builder mergeFrom(org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup other) {
5333 if (other == org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup.getDefaultInstance()) return this;
5334 if (nodesBuilder_ == null) {
5335 if (!other.nodes_.isEmpty()) {
5336 if (nodes_.isEmpty()) {
5337 nodes_ = other.nodes_;
5338 bitField0_ = (bitField0_ & ~0x00000001);
5339 } else {
5340 ensureNodesIsMutable();
5341 nodes_.addAll(other.nodes_);
5342 }
5343 onChanged();
5344 }
5345 } else {
5346 if (!other.nodes_.isEmpty()) {
5347 if (nodesBuilder_.isEmpty()) {
5348 nodesBuilder_.dispose();
5349 nodesBuilder_ = null;
5350 nodes_ = other.nodes_;
5351 bitField0_ = (bitField0_ & ~0x00000001);
5352 nodesBuilder_ =
5353 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
5354 getNodesFieldBuilder() : null;
5355 } else {
5356 nodesBuilder_.addAllMessages(other.nodes_);
5357 }
5358 }
5359 }
5360 if (other.hasDense()) {
5361 mergeDense(other.getDense());
5362 }
5363 if (waysBuilder_ == null) {
5364 if (!other.ways_.isEmpty()) {
5365 if (ways_.isEmpty()) {
5366 ways_ = other.ways_;
5367 bitField0_ = (bitField0_ & ~0x00000004);
5368 } else {
5369 ensureWaysIsMutable();
5370 ways_.addAll(other.ways_);
5371 }
5372 onChanged();
5373 }
5374 } else {
5375 if (!other.ways_.isEmpty()) {
5376 if (waysBuilder_.isEmpty()) {
5377 waysBuilder_.dispose();
5378 waysBuilder_ = null;
5379 ways_ = other.ways_;
5380 bitField0_ = (bitField0_ & ~0x00000004);
5381 waysBuilder_ =
5382 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
5383 getWaysFieldBuilder() : null;
5384 } else {
5385 waysBuilder_.addAllMessages(other.ways_);
5386 }
5387 }
5388 }
5389 if (relationsBuilder_ == null) {
5390 if (!other.relations_.isEmpty()) {
5391 if (relations_.isEmpty()) {
5392 relations_ = other.relations_;
5393 bitField0_ = (bitField0_ & ~0x00000008);
5394 } else {
5395 ensureRelationsIsMutable();
5396 relations_.addAll(other.relations_);
5397 }
5398 onChanged();
5399 }
5400 } else {
5401 if (!other.relations_.isEmpty()) {
5402 if (relationsBuilder_.isEmpty()) {
5403 relationsBuilder_.dispose();
5404 relationsBuilder_ = null;
5405 relations_ = other.relations_;
5406 bitField0_ = (bitField0_ & ~0x00000008);
5407 relationsBuilder_ =
5408 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
5409 getRelationsFieldBuilder() : null;
5410 } else {
5411 relationsBuilder_.addAllMessages(other.relations_);
5412 }
5413 }
5414 }
5415 if (changesetsBuilder_ == null) {
5416 if (!other.changesets_.isEmpty()) {
5417 if (changesets_.isEmpty()) {
5418 changesets_ = other.changesets_;
5419 bitField0_ = (bitField0_ & ~0x00000010);
5420 } else {
5421 ensureChangesetsIsMutable();
5422 changesets_.addAll(other.changesets_);
5423 }
5424 onChanged();
5425 }
5426 } else {
5427 if (!other.changesets_.isEmpty()) {
5428 if (changesetsBuilder_.isEmpty()) {
5429 changesetsBuilder_.dispose();
5430 changesetsBuilder_ = null;
5431 changesets_ = other.changesets_;
5432 bitField0_ = (bitField0_ & ~0x00000010);
5433 changesetsBuilder_ =
5434 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
5435 getChangesetsFieldBuilder() : null;
5436 } else {
5437 changesetsBuilder_.addAllMessages(other.changesets_);
5438 }
5439 }
5440 }
5441 this.mergeUnknownFields(other.unknownFields);
5442 onChanged();
5443 return this;
5444 }
5445
5446 @java.lang.Override
5447 public final boolean isInitialized() {
5448 for (int i = 0; i < getNodesCount(); i++) {
5449 if (!getNodes(i).isInitialized()) {
5450 return false;
5451 }
5452 }
5453 for (int i = 0; i < getWaysCount(); i++) {
5454 if (!getWays(i).isInitialized()) {
5455 return false;
5456 }
5457 }
5458 for (int i = 0; i < getRelationsCount(); i++) {
5459 if (!getRelations(i).isInitialized()) {
5460 return false;
5461 }
5462 }
5463 for (int i = 0; i < getChangesetsCount(); i++) {
5464 if (!getChangesets(i).isInitialized()) {
5465 return false;
5466 }
5467 }
5468 return true;
5469 }
5470
5471 @java.lang.Override
5472 public Builder mergeFrom(
5473 com.google.protobuf.CodedInputStream input,
5474 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
5475 throws java.io.IOException {
5476 org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup parsedMessage = null;
5477 try {
5478 parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
5479 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
5480 parsedMessage = (org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup) e.getUnfinishedMessage();
5481 throw e.unwrapIOException();
5482 } finally {
5483 if (parsedMessage != null) {
5484 mergeFrom(parsedMessage);
5485 }
5486 }
5487 return this;
5488 }
5489 private int bitField0_;
5490
5491 private java.util.List<org.openstreetmap.osmosis.osmbinary.Osmformat.Node> nodes_ =
5492 java.util.Collections.emptyList();
5493 private void ensureNodesIsMutable() {
5494 if (!((bitField0_ & 0x00000001) != 0)) {
5495 nodes_ = new java.util.ArrayList<org.openstreetmap.osmosis.osmbinary.Osmformat.Node>(nodes_);
5496 bitField0_ |= 0x00000001;
5497 }
5498 }
5499
5500 private com.google.protobuf.RepeatedFieldBuilderV3<
5501 org.openstreetmap.osmosis.osmbinary.Osmformat.Node, org.openstreetmap.osmosis.osmbinary.Osmformat.Node.Builder, org.openstreetmap.osmosis.osmbinary.Osmformat.NodeOrBuilder> nodesBuilder_;
5502
5503 /**
5504 * <code>repeated .OSMPBF.Node nodes = 1;</code>
5505 */
5506 public java.util.List<org.openstreetmap.osmosis.osmbinary.Osmformat.Node> getNodesList() {
5507 if (nodesBuilder_ == null) {
5508 return java.util.Collections.unmodifiableList(nodes_);
5509 } else {
5510 return nodesBuilder_.getMessageList();
5511 }
5512 }
5513 /**
5514 * <code>repeated .OSMPBF.Node nodes = 1;</code>
5515 */
5516 public int getNodesCount() {
5517 if (nodesBuilder_ == null) {
5518 return nodes_.size();
5519 } else {
5520 return nodesBuilder_.getCount();
5521 }
5522 }
5523 /**
5524 * <code>repeated .OSMPBF.Node nodes = 1;</code>
5525 */
5526 public org.openstreetmap.osmosis.osmbinary.Osmformat.Node getNodes(int index) {
5527 if (nodesBuilder_ == null) {
5528 return nodes_.get(index);
5529 } else {
5530 return nodesBuilder_.getMessage(index);
5531 }
5532 }
5533 /**
5534 * <code>repeated .OSMPBF.Node nodes = 1;</code>
5535 */
5536 public Builder setNodes(
5537 int index, org.openstreetmap.osmosis.osmbinary.Osmformat.Node value) {
5538 if (nodesBuilder_ == null) {
5539 if (value == null) {
5540 throw new NullPointerException();
5541 }
5542 ensureNodesIsMutable();
5543 nodes_.set(index, value);
5544 onChanged();
5545 } else {
5546 nodesBuilder_.setMessage(index, value);
5547 }
5548 return this;
5549 }
5550 /**
5551 * <code>repeated .OSMPBF.Node nodes = 1;</code>
5552 */
5553 public Builder setNodes(
5554 int index, org.openstreetmap.osmosis.osmbinary.Osmformat.Node.Builder builderForValue) {
5555 if (nodesBuilder_ == null) {
5556 ensureNodesIsMutable();
5557 nodes_.set(index, builderForValue.build());
5558 onChanged();
5559 } else {
5560 nodesBuilder_.setMessage(index, builderForValue.build());
5561 }
5562 return this;
5563 }
5564 /**
5565 * <code>repeated .OSMPBF.Node nodes = 1;</code>
5566 */
5567 public Builder addNodes(org.openstreetmap.osmosis.osmbinary.Osmformat.Node value) {
5568 if (nodesBuilder_ == null) {
5569 if (value == null) {
5570 throw new NullPointerException();
5571 }
5572 ensureNodesIsMutable();
5573 nodes_.add(value);
5574 onChanged();
5575 } else {
5576 nodesBuilder_.addMessage(value);
5577 }
5578 return this;
5579 }
5580 /**
5581 * <code>repeated .OSMPBF.Node nodes = 1;</code>
5582 */
5583 public Builder addNodes(
5584 int index, org.openstreetmap.osmosis.osmbinary.Osmformat.Node value) {
5585 if (nodesBuilder_ == null) {
5586 if (value == null) {
5587 throw new NullPointerException();
5588 }
5589 ensureNodesIsMutable();
5590 nodes_.add(index, value);
5591 onChanged();
5592 } else {
5593 nodesBuilder_.addMessage(index, value);
5594 }
5595 return this;
5596 }
5597 /**
5598 * <code>repeated .OSMPBF.Node nodes = 1;</code>
5599 */
5600 public Builder addNodes(
5601 org.openstreetmap.osmosis.osmbinary.Osmformat.Node.Builder builderForValue) {
5602 if (nodesBuilder_ == null) {
5603 ensureNodesIsMutable();
5604 nodes_.add(builderForValue.build());
5605 onChanged();
5606 } else {
5607 nodesBuilder_.addMessage(builderForValue.build());
5608 }
5609 return this;
5610 }
5611 /**
5612 * <code>repeated .OSMPBF.Node nodes = 1;</code>
5613 */
5614 public Builder addNodes(
5615 int index, org.openstreetmap.osmosis.osmbinary.Osmformat.Node.Builder builderForValue) {
5616 if (nodesBuilder_ == null) {
5617 ensureNodesIsMutable();
5618 nodes_.add(index, builderForValue.build());
5619 onChanged();
5620 } else {
5621 nodesBuilder_.addMessage(index, builderForValue.build());
5622 }
5623 return this;
5624 }
5625 /**
5626 * <code>repeated .OSMPBF.Node nodes = 1;</code>
5627 */
5628 public Builder addAllNodes(
5629 java.lang.Iterable<? extends org.openstreetmap.osmosis.osmbinary.Osmformat.Node> values) {
5630 if (nodesBuilder_ == null) {
5631 ensureNodesIsMutable();
5632 com.google.protobuf.AbstractMessageLite.Builder.addAll(
5633 values, nodes_);
5634 onChanged();
5635 } else {
5636 nodesBuilder_.addAllMessages(values);
5637 }
5638 return this;
5639 }
5640 /**
5641 * <code>repeated .OSMPBF.Node nodes = 1;</code>
5642 */
5643 public Builder clearNodes() {
5644 if (nodesBuilder_ == null) {
5645 nodes_ = java.util.Collections.emptyList();
5646 bitField0_ = (bitField0_ & ~0x00000001);
5647 onChanged();
5648 } else {
5649 nodesBuilder_.clear();
5650 }
5651 return this;
5652 }
5653 /**
5654 * <code>repeated .OSMPBF.Node nodes = 1;</code>
5655 */
5656 public Builder removeNodes(int index) {
5657 if (nodesBuilder_ == null) {
5658 ensureNodesIsMutable();
5659 nodes_.remove(index);
5660 onChanged();
5661 } else {
5662 nodesBuilder_.remove(index);
5663 }
5664 return this;
5665 }
5666 /**
5667 * <code>repeated .OSMPBF.Node nodes = 1;</code>
5668 */
5669 public org.openstreetmap.osmosis.osmbinary.Osmformat.Node.Builder getNodesBuilder(
5670 int index) {
5671 return getNodesFieldBuilder().getBuilder(index);
5672 }
5673 /**
5674 * <code>repeated .OSMPBF.Node nodes = 1;</code>
5675 */
5676 public org.openstreetmap.osmosis.osmbinary.Osmformat.NodeOrBuilder getNodesOrBuilder(
5677 int index) {
5678 if (nodesBuilder_ == null) {
5679 return nodes_.get(index); } else {
5680 return nodesBuilder_.getMessageOrBuilder(index);
5681 }
5682 }
5683 /**
5684 * <code>repeated .OSMPBF.Node nodes = 1;</code>
5685 */
5686 public java.util.List<? extends org.openstreetmap.osmosis.osmbinary.Osmformat.NodeOrBuilder>
5687 getNodesOrBuilderList() {
5688 if (nodesBuilder_ != null) {
5689 return nodesBuilder_.getMessageOrBuilderList();
5690 } else {
5691 return java.util.Collections.unmodifiableList(nodes_);
5692 }
5693 }
5694 /**
5695 * <code>repeated .OSMPBF.Node nodes = 1;</code>
5696 */
5697 public org.openstreetmap.osmosis.osmbinary.Osmformat.Node.Builder addNodesBuilder() {
5698 return getNodesFieldBuilder().addBuilder(
5699 org.openstreetmap.osmosis.osmbinary.Osmformat.Node.getDefaultInstance());
5700 }
5701 /**
5702 * <code>repeated .OSMPBF.Node nodes = 1;</code>
5703 */
5704 public org.openstreetmap.osmosis.osmbinary.Osmformat.Node.Builder addNodesBuilder(
5705 int index) {
5706 return getNodesFieldBuilder().addBuilder(
5707 index, org.openstreetmap.osmosis.osmbinary.Osmformat.Node.getDefaultInstance());
5708 }
5709 /**
5710 * <code>repeated .OSMPBF.Node nodes = 1;</code>
5711 */
5712 public java.util.List<org.openstreetmap.osmosis.osmbinary.Osmformat.Node.Builder>
5713 getNodesBuilderList() {
5714 return getNodesFieldBuilder().getBuilderList();
5715 }
5716 private com.google.protobuf.RepeatedFieldBuilderV3<
5717 org.openstreetmap.osmosis.osmbinary.Osmformat.Node, org.openstreetmap.osmosis.osmbinary.Osmformat.Node.Builder, org.openstreetmap.osmosis.osmbinary.Osmformat.NodeOrBuilder>
5718 getNodesFieldBuilder() {
5719 if (nodesBuilder_ == null) {
5720 nodesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
5721 org.openstreetmap.osmosis.osmbinary.Osmformat.Node, org.openstreetmap.osmosis.osmbinary.Osmformat.Node.Builder, org.openstreetmap.osmosis.osmbinary.Osmformat.NodeOrBuilder>(
5722 nodes_,
5723 ((bitField0_ & 0x00000001) != 0),
5724 getParentForChildren(),
5725 isClean());
5726 nodes_ = null;
5727 }
5728 return nodesBuilder_;
5729 }
5730
5731 private org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes dense_;
5732 private com.google.protobuf.SingleFieldBuilderV3<
5733 org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes, org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes.Builder, org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodesOrBuilder> denseBuilder_;
5734 /**
5735 * <code>optional .OSMPBF.DenseNodes dense = 2;</code>
5736 * @return Whether the dense field is set.
5737 */
5738 public boolean hasDense() {
5739 return ((bitField0_ & 0x00000002) != 0);
5740 }
5741 /**
5742 * <code>optional .OSMPBF.DenseNodes dense = 2;</code>
5743 * @return The dense.
5744 */
5745 public org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes getDense() {
5746 if (denseBuilder_ == null) {
5747 return dense_ == null ? org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes.getDefaultInstance() : dense_;
5748 } else {
5749 return denseBuilder_.getMessage();
5750 }
5751 }
5752 /**
5753 * <code>optional .OSMPBF.DenseNodes dense = 2;</code>
5754 */
5755 public Builder setDense(org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes value) {
5756 if (denseBuilder_ == null) {
5757 if (value == null) {
5758 throw new NullPointerException();
5759 }
5760 dense_ = value;
5761 onChanged();
5762 } else {
5763 denseBuilder_.setMessage(value);
5764 }
5765 bitField0_ |= 0x00000002;
5766 return this;
5767 }
5768 /**
5769 * <code>optional .OSMPBF.DenseNodes dense = 2;</code>
5770 */
5771 public Builder setDense(
5772 org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes.Builder builderForValue) {
5773 if (denseBuilder_ == null) {
5774 dense_ = builderForValue.build();
5775 onChanged();
5776 } else {
5777 denseBuilder_.setMessage(builderForValue.build());
5778 }
5779 bitField0_ |= 0x00000002;
5780 return this;
5781 }
5782 /**
5783 * <code>optional .OSMPBF.DenseNodes dense = 2;</code>
5784 */
5785 public Builder mergeDense(org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes value) {
5786 if (denseBuilder_ == null) {
5787 if (((bitField0_ & 0x00000002) != 0) &&
5788 dense_ != null &&
5789 dense_ != org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes.getDefaultInstance()) {
5790 dense_ =
5791 org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes.newBuilder(dense_).mergeFrom(value).buildPartial();
5792 } else {
5793 dense_ = value;
5794 }
5795 onChanged();
5796 } else {
5797 denseBuilder_.mergeFrom(value);
5798 }
5799 bitField0_ |= 0x00000002;
5800 return this;
5801 }
5802 /**
5803 * <code>optional .OSMPBF.DenseNodes dense = 2;</code>
5804 */
5805 public Builder clearDense() {
5806 if (denseBuilder_ == null) {
5807 dense_ = null;
5808 onChanged();
5809 } else {
5810 denseBuilder_.clear();
5811 }
5812 bitField0_ = (bitField0_ & ~0x00000002);
5813 return this;
5814 }
5815 /**
5816 * <code>optional .OSMPBF.DenseNodes dense = 2;</code>
5817 */
5818 public org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes.Builder getDenseBuilder() {
5819 bitField0_ |= 0x00000002;
5820 onChanged();
5821 return getDenseFieldBuilder().getBuilder();
5822 }
5823 /**
5824 * <code>optional .OSMPBF.DenseNodes dense = 2;</code>
5825 */
5826 public org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodesOrBuilder getDenseOrBuilder() {
5827 if (denseBuilder_ != null) {
5828 return denseBuilder_.getMessageOrBuilder();
5829 } else {
5830 return dense_ == null ?
5831 org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes.getDefaultInstance() : dense_;
5832 }
5833 }
5834 /**
5835 * <code>optional .OSMPBF.DenseNodes dense = 2;</code>
5836 */
5837 private com.google.protobuf.SingleFieldBuilderV3<
5838 org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes, org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes.Builder, org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodesOrBuilder>
5839 getDenseFieldBuilder() {
5840 if (denseBuilder_ == null) {
5841 denseBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
5842 org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes, org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes.Builder, org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodesOrBuilder>(
5843 getDense(),
5844 getParentForChildren(),
5845 isClean());
5846 dense_ = null;
5847 }
5848 return denseBuilder_;
5849 }
5850
5851 private java.util.List<org.openstreetmap.osmosis.osmbinary.Osmformat.Way> ways_ =
5852 java.util.Collections.emptyList();
5853 private void ensureWaysIsMutable() {
5854 if (!((bitField0_ & 0x00000004) != 0)) {
5855 ways_ = new java.util.ArrayList<org.openstreetmap.osmosis.osmbinary.Osmformat.Way>(ways_);
5856 bitField0_ |= 0x00000004;
5857 }
5858 }
5859
5860 private com.google.protobuf.RepeatedFieldBuilderV3<
5861 org.openstreetmap.osmosis.osmbinary.Osmformat.Way, org.openstreetmap.osmosis.osmbinary.Osmformat.Way.Builder, org.openstreetmap.osmosis.osmbinary.Osmformat.WayOrBuilder> waysBuilder_;
5862
5863 /**
5864 * <code>repeated .OSMPBF.Way ways = 3;</code>
5865 */
5866 public java.util.List<org.openstreetmap.osmosis.osmbinary.Osmformat.Way> getWaysList() {
5867 if (waysBuilder_ == null) {
5868 return java.util.Collections.unmodifiableList(ways_);
5869 } else {
5870 return waysBuilder_.getMessageList();
5871 }
5872 }
5873 /**
5874 * <code>repeated .OSMPBF.Way ways = 3;</code>
5875 */
5876 public int getWaysCount() {
5877 if (waysBuilder_ == null) {
5878 return ways_.size();
5879 } else {
5880 return waysBuilder_.getCount();
5881 }
5882 }
5883 /**
5884 * <code>repeated .OSMPBF.Way ways = 3;</code>
5885 */
5886 public org.openstreetmap.osmosis.osmbinary.Osmformat.Way getWays(int index) {
5887 if (waysBuilder_ == null) {
5888 return ways_.get(index);
5889 } else {
5890 return waysBuilder_.getMessage(index);
5891 }
5892 }
5893 /**
5894 * <code>repeated .OSMPBF.Way ways = 3;</code>
5895 */
5896 public Builder setWays(
5897 int index, org.openstreetmap.osmosis.osmbinary.Osmformat.Way value) {
5898 if (waysBuilder_ == null) {
5899 if (value == null) {
5900 throw new NullPointerException();
5901 }
5902 ensureWaysIsMutable();
5903 ways_.set(index, value);
5904 onChanged();
5905 } else {
5906 waysBuilder_.setMessage(index, value);
5907 }
5908 return this;
5909 }
5910 /**
5911 * <code>repeated .OSMPBF.Way ways = 3;</code>
5912 */
5913 public Builder setWays(
5914 int index, org.openstreetmap.osmosis.osmbinary.Osmformat.Way.Builder builderForValue) {
5915 if (waysBuilder_ == null) {
5916 ensureWaysIsMutable();
5917 ways_.set(index, builderForValue.build());
5918 onChanged();
5919 } else {
5920 waysBuilder_.setMessage(index, builderForValue.build());
5921 }
5922 return this;
5923 }
5924 /**
5925 * <code>repeated .OSMPBF.Way ways = 3;</code>
5926 */
5927 public Builder addWays(org.openstreetmap.osmosis.osmbinary.Osmformat.Way value) {
5928 if (waysBuilder_ == null) {
5929 if (value == null) {
5930 throw new NullPointerException();
5931 }
5932 ensureWaysIsMutable();
5933 ways_.add(value);
5934 onChanged();
5935 } else {
5936 waysBuilder_.addMessage(value);
5937 }
5938 return this;
5939 }
5940 /**
5941 * <code>repeated .OSMPBF.Way ways = 3;</code>
5942 */
5943 public Builder addWays(
5944 int index, org.openstreetmap.osmosis.osmbinary.Osmformat.Way value) {
5945 if (waysBuilder_ == null) {
5946 if (value == null) {
5947 throw new NullPointerException();
5948 }
5949 ensureWaysIsMutable();
5950 ways_.add(index, value);
5951 onChanged();
5952 } else {
5953 waysBuilder_.addMessage(index, value);
5954 }
5955 return this;
5956 }
5957 /**
5958 * <code>repeated .OSMPBF.Way ways = 3;</code>
5959 */
5960 public Builder addWays(
5961 org.openstreetmap.osmosis.osmbinary.Osmformat.Way.Builder builderForValue) {
5962 if (waysBuilder_ == null) {
5963 ensureWaysIsMutable();
5964 ways_.add(builderForValue.build());
5965 onChanged();
5966 } else {
5967 waysBuilder_.addMessage(builderForValue.build());
5968 }
5969 return this;
5970 }
5971 /**
5972 * <code>repeated .OSMPBF.Way ways = 3;</code>
5973 */
5974 public Builder addWays(
5975 int index, org.openstreetmap.osmosis.osmbinary.Osmformat.Way.Builder builderForValue) {
5976 if (waysBuilder_ == null) {
5977 ensureWaysIsMutable();
5978 ways_.add(index, builderForValue.build());
5979 onChanged();
5980 } else {
5981 waysBuilder_.addMessage(index, builderForValue.build());
5982 }
5983 return this;
5984 }
5985 /**
5986 * <code>repeated .OSMPBF.Way ways = 3;</code>
5987 */
5988 public Builder addAllWays(
5989 java.lang.Iterable<? extends org.openstreetmap.osmosis.osmbinary.Osmformat.Way> values) {
5990 if (waysBuilder_ == null) {
5991 ensureWaysIsMutable();
5992 com.google.protobuf.AbstractMessageLite.Builder.addAll(
5993 values, ways_);
5994 onChanged();
5995 } else {
5996 waysBuilder_.addAllMessages(values);
5997 }
5998 return this;
5999 }
6000 /**
6001 * <code>repeated .OSMPBF.Way ways = 3;</code>
6002 */
6003 public Builder clearWays() {
6004 if (waysBuilder_ == null) {
6005 ways_ = java.util.Collections.emptyList();
6006 bitField0_ = (bitField0_ & ~0x00000004);
6007 onChanged();
6008 } else {
6009 waysBuilder_.clear();
6010 }
6011 return this;
6012 }
6013 /**
6014 * <code>repeated .OSMPBF.Way ways = 3;</code>
6015 */
6016 public Builder removeWays(int index) {
6017 if (waysBuilder_ == null) {
6018 ensureWaysIsMutable();
6019 ways_.remove(index);
6020 onChanged();
6021 } else {
6022 waysBuilder_.remove(index);
6023 }
6024 return this;
6025 }
6026 /**
6027 * <code>repeated .OSMPBF.Way ways = 3;</code>
6028 */
6029 public org.openstreetmap.osmosis.osmbinary.Osmformat.Way.Builder getWaysBuilder(
6030 int index) {
6031 return getWaysFieldBuilder().getBuilder(index);
6032 }
6033 /**
6034 * <code>repeated .OSMPBF.Way ways = 3;</code>
6035 */
6036 public org.openstreetmap.osmosis.osmbinary.Osmformat.WayOrBuilder getWaysOrBuilder(
6037 int index) {
6038 if (waysBuilder_ == null) {
6039 return ways_.get(index); } else {
6040 return waysBuilder_.getMessageOrBuilder(index);
6041 }
6042 }
6043 /**
6044 * <code>repeated .OSMPBF.Way ways = 3;</code>
6045 */
6046 public java.util.List<? extends org.openstreetmap.osmosis.osmbinary.Osmformat.WayOrBuilder>
6047 getWaysOrBuilderList() {
6048 if (waysBuilder_ != null) {
6049 return waysBuilder_.getMessageOrBuilderList();
6050 } else {
6051 return java.util.Collections.unmodifiableList(ways_);
6052 }
6053 }
6054 /**
6055 * <code>repeated .OSMPBF.Way ways = 3;</code>
6056 */
6057 public org.openstreetmap.osmosis.osmbinary.Osmformat.Way.Builder addWaysBuilder() {
6058 return getWaysFieldBuilder().addBuilder(
6059 org.openstreetmap.osmosis.osmbinary.Osmformat.Way.getDefaultInstance());
6060 }
6061 /**
6062 * <code>repeated .OSMPBF.Way ways = 3;</code>
6063 */
6064 public org.openstreetmap.osmosis.osmbinary.Osmformat.Way.Builder addWaysBuilder(
6065 int index) {
6066 return getWaysFieldBuilder().addBuilder(
6067 index, org.openstreetmap.osmosis.osmbinary.Osmformat.Way.getDefaultInstance());
6068 }
6069 /**
6070 * <code>repeated .OSMPBF.Way ways = 3;</code>
6071 */
6072 public java.util.List<org.openstreetmap.osmosis.osmbinary.Osmformat.Way.Builder>
6073 getWaysBuilderList() {
6074 return getWaysFieldBuilder().getBuilderList();
6075 }
6076 private com.google.protobuf.RepeatedFieldBuilderV3<
6077 org.openstreetmap.osmosis.osmbinary.Osmformat.Way, org.openstreetmap.osmosis.osmbinary.Osmformat.Way.Builder, org.openstreetmap.osmosis.osmbinary.Osmformat.WayOrBuilder>
6078 getWaysFieldBuilder() {
6079 if (waysBuilder_ == null) {
6080 waysBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
6081 org.openstreetmap.osmosis.osmbinary.Osmformat.Way, org.openstreetmap.osmosis.osmbinary.Osmformat.Way.Builder, org.openstreetmap.osmosis.osmbinary.Osmformat.WayOrBuilder>(
6082 ways_,
6083 ((bitField0_ & 0x00000004) != 0),
6084 getParentForChildren(),
6085 isClean());
6086 ways_ = null;
6087 }
6088 return waysBuilder_;
6089 }
6090
6091 private java.util.List<org.openstreetmap.osmosis.osmbinary.Osmformat.Relation> relations_ =
6092 java.util.Collections.emptyList();
6093 private void ensureRelationsIsMutable() {
6094 if (!((bitField0_ & 0x00000008) != 0)) {
6095 relations_ = new java.util.ArrayList<org.openstreetmap.osmosis.osmbinary.Osmformat.Relation>(relations_);
6096 bitField0_ |= 0x00000008;
6097 }
6098 }
6099
6100 private com.google.protobuf.RepeatedFieldBuilderV3<
6101 org.openstreetmap.osmosis.osmbinary.Osmformat.Relation, org.openstreetmap.osmosis.osmbinary.Osmformat.Relation.Builder, org.openstreetmap.osmosis.osmbinary.Osmformat.RelationOrBuilder> relationsBuilder_;
6102
6103 /**
6104 * <code>repeated .OSMPBF.Relation relations = 4;</code>
6105 */
6106 public java.util.List<org.openstreetmap.osmosis.osmbinary.Osmformat.Relation> getRelationsList() {
6107 if (relationsBuilder_ == null) {
6108 return java.util.Collections.unmodifiableList(relations_);
6109 } else {
6110 return relationsBuilder_.getMessageList();
6111 }
6112 }
6113 /**
6114 * <code>repeated .OSMPBF.Relation relations = 4;</code>
6115 */
6116 public int getRelationsCount() {
6117 if (relationsBuilder_ == null) {
6118 return relations_.size();
6119 } else {
6120 return relationsBuilder_.getCount();
6121 }
6122 }
6123 /**
6124 * <code>repeated .OSMPBF.Relation relations = 4;</code>
6125 */
6126 public org.openstreetmap.osmosis.osmbinary.Osmformat.Relation getRelations(int index) {
6127 if (relationsBuilder_ == null) {
6128 return relations_.get(index);
6129 } else {
6130 return relationsBuilder_.getMessage(index);
6131 }
6132 }
6133 /**
6134 * <code>repeated .OSMPBF.Relation relations = 4;</code>
6135 */
6136 public Builder setRelations(
6137 int index, org.openstreetmap.osmosis.osmbinary.Osmformat.Relation value) {
6138 if (relationsBuilder_ == null) {
6139 if (value == null) {
6140 throw new NullPointerException();
6141 }
6142 ensureRelationsIsMutable();
6143 relations_.set(index, value);
6144 onChanged();
6145 } else {
6146 relationsBuilder_.setMessage(index, value);
6147 }
6148 return this;
6149 }
6150 /**
6151 * <code>repeated .OSMPBF.Relation relations = 4;</code>
6152 */
6153 public Builder setRelations(
6154 int index, org.openstreetmap.osmosis.osmbinary.Osmformat.Relation.Builder builderForValue) {
6155 if (relationsBuilder_ == null) {
6156 ensureRelationsIsMutable();
6157 relations_.set(index, builderForValue.build());
6158 onChanged();
6159 } else {
6160 relationsBuilder_.setMessage(index, builderForValue.build());
6161 }
6162 return this;
6163 }
6164 /**
6165 * <code>repeated .OSMPBF.Relation relations = 4;</code>
6166 */
6167 public Builder addRelations(org.openstreetmap.osmosis.osmbinary.Osmformat.Relation value) {
6168 if (relationsBuilder_ == null) {
6169 if (value == null) {
6170 throw new NullPointerException();
6171 }
6172 ensureRelationsIsMutable();
6173 relations_.add(value);
6174 onChanged();
6175 } else {
6176 relationsBuilder_.addMessage(value);
6177 }
6178 return this;
6179 }
6180 /**
6181 * <code>repeated .OSMPBF.Relation relations = 4;</code>
6182 */
6183 public Builder addRelations(
6184 int index, org.openstreetmap.osmosis.osmbinary.Osmformat.Relation value) {
6185 if (relationsBuilder_ == null) {
6186 if (value == null) {
6187 throw new NullPointerException();
6188 }
6189 ensureRelationsIsMutable();
6190 relations_.add(index, value);
6191 onChanged();
6192 } else {
6193 relationsBuilder_.addMessage(index, value);
6194 }
6195 return this;
6196 }
6197 /**
6198 * <code>repeated .OSMPBF.Relation relations = 4;</code>
6199 */
6200 public Builder addRelations(
6201 org.openstreetmap.osmosis.osmbinary.Osmformat.Relation.Builder builderForValue) {
6202 if (relationsBuilder_ == null) {
6203 ensureRelationsIsMutable();
6204 relations_.add(builderForValue.build());
6205 onChanged();
6206 } else {
6207 relationsBuilder_.addMessage(builderForValue.build());
6208 }
6209 return this;
6210 }
6211 /**
6212 * <code>repeated .OSMPBF.Relation relations = 4;</code>
6213 */
6214 public Builder addRelations(
6215 int index, org.openstreetmap.osmosis.osmbinary.Osmformat.Relation.Builder builderForValue) {
6216 if (relationsBuilder_ == null) {
6217 ensureRelationsIsMutable();
6218 relations_.add(index, builderForValue.build());
6219 onChanged();
6220 } else {
6221 relationsBuilder_.addMessage(index, builderForValue.build());
6222 }
6223 return this;
6224 }
6225 /**
6226 * <code>repeated .OSMPBF.Relation relations = 4;</code>
6227 */
6228 public Builder addAllRelations(
6229 java.lang.Iterable<? extends org.openstreetmap.osmosis.osmbinary.Osmformat.Relation> values) {
6230 if (relationsBuilder_ == null) {
6231 ensureRelationsIsMutable();
6232 com.google.protobuf.AbstractMessageLite.Builder.addAll(
6233 values, relations_);
6234 onChanged();
6235 } else {
6236 relationsBuilder_.addAllMessages(values);
6237 }
6238 return this;
6239 }
6240 /**
6241 * <code>repeated .OSMPBF.Relation relations = 4;</code>
6242 */
6243 public Builder clearRelations() {
6244 if (relationsBuilder_ == null) {
6245 relations_ = java.util.Collections.emptyList();
6246 bitField0_ = (bitField0_ & ~0x00000008);
6247 onChanged();
6248 } else {
6249 relationsBuilder_.clear();
6250 }
6251 return this;
6252 }
6253 /**
6254 * <code>repeated .OSMPBF.Relation relations = 4;</code>
6255 */
6256 public Builder removeRelations(int index) {
6257 if (relationsBuilder_ == null) {
6258 ensureRelationsIsMutable();
6259 relations_.remove(index);
6260 onChanged();
6261 } else {
6262 relationsBuilder_.remove(index);
6263 }
6264 return this;
6265 }
6266 /**
6267 * <code>repeated .OSMPBF.Relation relations = 4;</code>
6268 */
6269 public org.openstreetmap.osmosis.osmbinary.Osmformat.Relation.Builder getRelationsBuilder(
6270 int index) {
6271 return getRelationsFieldBuilder().getBuilder(index);
6272 }
6273 /**
6274 * <code>repeated .OSMPBF.Relation relations = 4;</code>
6275 */
6276 public org.openstreetmap.osmosis.osmbinary.Osmformat.RelationOrBuilder getRelationsOrBuilder(
6277 int index) {
6278 if (relationsBuilder_ == null) {
6279 return relations_.get(index); } else {
6280 return relationsBuilder_.getMessageOrBuilder(index);
6281 }
6282 }
6283 /**
6284 * <code>repeated .OSMPBF.Relation relations = 4;</code>
6285 */
6286 public java.util.List<? extends org.openstreetmap.osmosis.osmbinary.Osmformat.RelationOrBuilder>
6287 getRelationsOrBuilderList() {
6288 if (relationsBuilder_ != null) {
6289 return relationsBuilder_.getMessageOrBuilderList();
6290 } else {
6291 return java.util.Collections.unmodifiableList(relations_);
6292 }
6293 }
6294 /**
6295 * <code>repeated .OSMPBF.Relation relations = 4;</code>
6296 */
6297 public org.openstreetmap.osmosis.osmbinary.Osmformat.Relation.Builder addRelationsBuilder() {
6298 return getRelationsFieldBuilder().addBuilder(
6299 org.openstreetmap.osmosis.osmbinary.Osmformat.Relation.getDefaultInstance());
6300 }
6301 /**
6302 * <code>repeated .OSMPBF.Relation relations = 4;</code>
6303 */
6304 public org.openstreetmap.osmosis.osmbinary.Osmformat.Relation.Builder addRelationsBuilder(
6305 int index) {
6306 return getRelationsFieldBuilder().addBuilder(
6307 index, org.openstreetmap.osmosis.osmbinary.Osmformat.Relation.getDefaultInstance());
6308 }
6309 /**
6310 * <code>repeated .OSMPBF.Relation relations = 4;</code>
6311 */
6312 public java.util.List<org.openstreetmap.osmosis.osmbinary.Osmformat.Relation.Builder>
6313 getRelationsBuilderList() {
6314 return getRelationsFieldBuilder().getBuilderList();
6315 }
6316 private com.google.protobuf.RepeatedFieldBuilderV3<
6317 org.openstreetmap.osmosis.osmbinary.Osmformat.Relation, org.openstreetmap.osmosis.osmbinary.Osmformat.Relation.Builder, org.openstreetmap.osmosis.osmbinary.Osmformat.RelationOrBuilder>
6318 getRelationsFieldBuilder() {
6319 if (relationsBuilder_ == null) {
6320 relationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
6321 org.openstreetmap.osmosis.osmbinary.Osmformat.Relation, org.openstreetmap.osmosis.osmbinary.Osmformat.Relation.Builder, org.openstreetmap.osmosis.osmbinary.Osmformat.RelationOrBuilder>(
6322 relations_,
6323 ((bitField0_ & 0x00000008) != 0),
6324 getParentForChildren(),
6325 isClean());
6326 relations_ = null;
6327 }
6328 return relationsBuilder_;
6329 }
6330
6331 private java.util.List<org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet> changesets_ =
6332 java.util.Collections.emptyList();
6333 private void ensureChangesetsIsMutable() {
6334 if (!((bitField0_ & 0x00000010) != 0)) {
6335 changesets_ = new java.util.ArrayList<org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet>(changesets_);
6336 bitField0_ |= 0x00000010;
6337 }
6338 }
6339
6340 private com.google.protobuf.RepeatedFieldBuilderV3<
6341 org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet, org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet.Builder, org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSetOrBuilder> changesetsBuilder_;
6342
6343 /**
6344 * <code>repeated .OSMPBF.ChangeSet changesets = 5;</code>
6345 */
6346 public java.util.List<org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet> getChangesetsList() {
6347 if (changesetsBuilder_ == null) {
6348 return java.util.Collections.unmodifiableList(changesets_);
6349 } else {
6350 return changesetsBuilder_.getMessageList();
6351 }
6352 }
6353 /**
6354 * <code>repeated .OSMPBF.ChangeSet changesets = 5;</code>
6355 */
6356 public int getChangesetsCount() {
6357 if (changesetsBuilder_ == null) {
6358 return changesets_.size();
6359 } else {
6360 return changesetsBuilder_.getCount();
6361 }
6362 }
6363 /**
6364 * <code>repeated .OSMPBF.ChangeSet changesets = 5;</code>
6365 */
6366 public org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet getChangesets(int index) {
6367 if (changesetsBuilder_ == null) {
6368 return changesets_.get(index);
6369 } else {
6370 return changesetsBuilder_.getMessage(index);
6371 }
6372 }
6373 /**
6374 * <code>repeated .OSMPBF.ChangeSet changesets = 5;</code>
6375 */
6376 public Builder setChangesets(
6377 int index, org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet value) {
6378 if (changesetsBuilder_ == null) {
6379 if (value == null) {
6380 throw new NullPointerException();
6381 }
6382 ensureChangesetsIsMutable();
6383 changesets_.set(index, value);
6384 onChanged();
6385 } else {
6386 changesetsBuilder_.setMessage(index, value);
6387 }
6388 return this;
6389 }
6390 /**
6391 * <code>repeated .OSMPBF.ChangeSet changesets = 5;</code>
6392 */
6393 public Builder setChangesets(
6394 int index, org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet.Builder builderForValue) {
6395 if (changesetsBuilder_ == null) {
6396 ensureChangesetsIsMutable();
6397 changesets_.set(index, builderForValue.build());
6398 onChanged();
6399 } else {
6400 changesetsBuilder_.setMessage(index, builderForValue.build());
6401 }
6402 return this;
6403 }
6404 /**
6405 * <code>repeated .OSMPBF.ChangeSet changesets = 5;</code>
6406 */
6407 public Builder addChangesets(org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet value) {
6408 if (changesetsBuilder_ == null) {
6409 if (value == null) {
6410 throw new NullPointerException();
6411 }
6412 ensureChangesetsIsMutable();
6413 changesets_.add(value);
6414 onChanged();
6415 } else {
6416 changesetsBuilder_.addMessage(value);
6417 }
6418 return this;
6419 }
6420 /**
6421 * <code>repeated .OSMPBF.ChangeSet changesets = 5;</code>
6422 */
6423 public Builder addChangesets(
6424 int index, org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet value) {
6425 if (changesetsBuilder_ == null) {
6426 if (value == null) {
6427 throw new NullPointerException();
6428 }
6429 ensureChangesetsIsMutable();
6430 changesets_.add(index, value);
6431 onChanged();
6432 } else {
6433 changesetsBuilder_.addMessage(index, value);
6434 }
6435 return this;
6436 }
6437 /**
6438 * <code>repeated .OSMPBF.ChangeSet changesets = 5;</code>
6439 */
6440 public Builder addChangesets(
6441 org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet.Builder builderForValue) {
6442 if (changesetsBuilder_ == null) {
6443 ensureChangesetsIsMutable();
6444 changesets_.add(builderForValue.build());
6445 onChanged();
6446 } else {
6447 changesetsBuilder_.addMessage(builderForValue.build());
6448 }
6449 return this;
6450 }
6451 /**
6452 * <code>repeated .OSMPBF.ChangeSet changesets = 5;</code>
6453 */
6454 public Builder addChangesets(
6455 int index, org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet.Builder builderForValue) {
6456 if (changesetsBuilder_ == null) {
6457 ensureChangesetsIsMutable();
6458 changesets_.add(index, builderForValue.build());
6459 onChanged();
6460 } else {
6461 changesetsBuilder_.addMessage(index, builderForValue.build());
6462 }
6463 return this;
6464 }
6465 /**
6466 * <code>repeated .OSMPBF.ChangeSet changesets = 5;</code>
6467 */
6468 public Builder addAllChangesets(
6469 java.lang.Iterable<? extends org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet> values) {
6470 if (changesetsBuilder_ == null) {
6471 ensureChangesetsIsMutable();
6472 com.google.protobuf.AbstractMessageLite.Builder.addAll(
6473 values, changesets_);
6474 onChanged();
6475 } else {
6476 changesetsBuilder_.addAllMessages(values);
6477 }
6478 return this;
6479 }
6480 /**
6481 * <code>repeated .OSMPBF.ChangeSet changesets = 5;</code>
6482 */
6483 public Builder clearChangesets() {
6484 if (changesetsBuilder_ == null) {
6485 changesets_ = java.util.Collections.emptyList();
6486 bitField0_ = (bitField0_ & ~0x00000010);
6487 onChanged();
6488 } else {
6489 changesetsBuilder_.clear();
6490 }
6491 return this;
6492 }
6493 /**
6494 * <code>repeated .OSMPBF.ChangeSet changesets = 5;</code>
6495 */
6496 public Builder removeChangesets(int index) {
6497 if (changesetsBuilder_ == null) {
6498 ensureChangesetsIsMutable();
6499 changesets_.remove(index);
6500 onChanged();
6501 } else {
6502 changesetsBuilder_.remove(index);
6503 }
6504 return this;
6505 }
6506 /**
6507 * <code>repeated .OSMPBF.ChangeSet changesets = 5;</code>
6508 */
6509 public org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet.Builder getChangesetsBuilder(
6510 int index) {
6511 return getChangesetsFieldBuilder().getBuilder(index);
6512 }
6513 /**
6514 * <code>repeated .OSMPBF.ChangeSet changesets = 5;</code>
6515 */
6516 public org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSetOrBuilder getChangesetsOrBuilder(
6517 int index) {
6518 if (changesetsBuilder_ == null) {
6519 return changesets_.get(index); } else {
6520 return changesetsBuilder_.getMessageOrBuilder(index);
6521 }
6522 }
6523 /**
6524 * <code>repeated .OSMPBF.ChangeSet changesets = 5;</code>
6525 */
6526 public java.util.List<? extends org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSetOrBuilder>
6527 getChangesetsOrBuilderList() {
6528 if (changesetsBuilder_ != null) {
6529 return changesetsBuilder_.getMessageOrBuilderList();
6530 } else {
6531 return java.util.Collections.unmodifiableList(changesets_);
6532 }
6533 }
6534 /**
6535 * <code>repeated .OSMPBF.ChangeSet changesets = 5;</code>
6536 */
6537 public org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet.Builder addChangesetsBuilder() {
6538 return getChangesetsFieldBuilder().addBuilder(
6539 org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet.getDefaultInstance());
6540 }
6541 /**
6542 * <code>repeated .OSMPBF.ChangeSet changesets = 5;</code>
6543 */
6544 public org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet.Builder addChangesetsBuilder(
6545 int index) {
6546 return getChangesetsFieldBuilder().addBuilder(
6547 index, org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet.getDefaultInstance());
6548 }
6549 /**
6550 * <code>repeated .OSMPBF.ChangeSet changesets = 5;</code>
6551 */
6552 public java.util.List<org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet.Builder>
6553 getChangesetsBuilderList() {
6554 return getChangesetsFieldBuilder().getBuilderList();
6555 }
6556 private com.google.protobuf.RepeatedFieldBuilderV3<
6557 org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet, org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet.Builder, org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSetOrBuilder>
6558 getChangesetsFieldBuilder() {
6559 if (changesetsBuilder_ == null) {
6560 changesetsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
6561 org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet, org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet.Builder, org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSetOrBuilder>(
6562 changesets_,
6563 ((bitField0_ & 0x00000010) != 0),
6564 getParentForChildren(),
6565 isClean());
6566 changesets_ = null;
6567 }
6568 return changesetsBuilder_;
6569 }
6570 @java.lang.Override
6571 public final Builder setUnknownFields(
6572 final com.google.protobuf.UnknownFieldSet unknownFields) {
6573 return super.setUnknownFields(unknownFields);
6574 }
6575
6576 @java.lang.Override
6577 public final Builder mergeUnknownFields(
6578 final com.google.protobuf.UnknownFieldSet unknownFields) {
6579 return super.mergeUnknownFields(unknownFields);
6580 }
6581
6582
6583 // @@protoc_insertion_point(builder_scope:OSMPBF.PrimitiveGroup)
6584 }
6585
6586 // @@protoc_insertion_point(class_scope:OSMPBF.PrimitiveGroup)
6587 private static final org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup DEFAULT_INSTANCE;
6588 static {
6589 DEFAULT_INSTANCE = new org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup();
6590 }
6591
6592 public static org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup getDefaultInstance() {
6593 return DEFAULT_INSTANCE;
6594 }
6595
6596 @java.lang.Deprecated public static final com.google.protobuf.Parser<PrimitiveGroup>
6597 PARSER = new com.google.protobuf.AbstractParser<PrimitiveGroup>() {
6598 @java.lang.Override
6599 public PrimitiveGroup parsePartialFrom(
6600 com.google.protobuf.CodedInputStream input,
6601 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
6602 throws com.google.protobuf.InvalidProtocolBufferException {
6603 return new PrimitiveGroup(input, extensionRegistry);
6604 }
6605 };
6606
6607 public static com.google.protobuf.Parser<PrimitiveGroup> parser() {
6608 return PARSER;
6609 }
6610
6611 @java.lang.Override
6612 public com.google.protobuf.Parser<PrimitiveGroup> getParserForType() {
6613 return PARSER;
6614 }
6615
6616 @java.lang.Override
6617 public org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup getDefaultInstanceForType() {
6618 return DEFAULT_INSTANCE;
6619 }
6620
6621 }
6622
6623 public interface StringTableOrBuilder extends
6624 // @@protoc_insertion_point(interface_extends:OSMPBF.StringTable)
6625 com.google.protobuf.MessageOrBuilder {
6626
6627 /**
6628 * <code>repeated bytes s = 1;</code>
6629 * @return A list containing the s.
6630 */
6631 java.util.List<com.google.protobuf.ByteString> getSList();
6632 /**
6633 * <code>repeated bytes s = 1;</code>
6634 * @return The count of s.
6635 */
6636 int getSCount();
6637 /**
6638 * <code>repeated bytes s = 1;</code>
6639 * @param index The index of the element to return.
6640 * @return The s at the given index.
6641 */
6642 com.google.protobuf.ByteString getS(int index);
6643 }
6644 /**
6645 * <pre>
6646 ** String table, contains the common strings in each block.
6647 *Note that we reserve index '0' as a delimiter, so the entry at that
6648 *index in the table is ALWAYS blank and unused.
6649 * </pre>
6650 *
6651 * Protobuf type {@code OSMPBF.StringTable}
6652 */
6653 public static final class StringTable extends
6654 com.google.protobuf.GeneratedMessageV3 implements
6655 // @@protoc_insertion_point(message_implements:OSMPBF.StringTable)
6656 StringTableOrBuilder {
6657 private static final long serialVersionUID = 0L;
6658 // Use StringTable.newBuilder() to construct.
6659 private StringTable(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
6660 super(builder);
6661 }
6662 private StringTable() {
6663 s_ = java.util.Collections.emptyList();
6664 }
6665
6666 @java.lang.Override
6667 @SuppressWarnings({"unused"})
6668 protected java.lang.Object newInstance(
6669 UnusedPrivateParameter unused) {
6670 return new StringTable();
6671 }
6672
6673 @java.lang.Override
6674 public final com.google.protobuf.UnknownFieldSet
6675 getUnknownFields() {
6676 return this.unknownFields;
6677 }
6678 private StringTable(
6679 com.google.protobuf.CodedInputStream input,
6680 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
6681 throws com.google.protobuf.InvalidProtocolBufferException {
6682 this();
6683 if (extensionRegistry == null) {
6684 throw new java.lang.NullPointerException();
6685 }
6686 int mutable_bitField0_ = 0;
6687 com.google.protobuf.UnknownFieldSet.Builder unknownFields =
6688 com.google.protobuf.UnknownFieldSet.newBuilder();
6689 try {
6690 boolean done = false;
6691 while (!done) {
6692 int tag = input.readTag();
6693 switch (tag) {
6694 case 0:
6695 done = true;
6696 break;
6697 case 10: {
6698 if (!((mutable_bitField0_ & 0x00000001) != 0)) {
6699 s_ = new java.util.ArrayList<com.google.protobuf.ByteString>();
6700 mutable_bitField0_ |= 0x00000001;
6701 }
6702 s_.add(input.readBytes());
6703 break;
6704 }
6705 default: {
6706 if (!parseUnknownField(
6707 input, unknownFields, extensionRegistry, tag)) {
6708 done = true;
6709 }
6710 break;
6711 }
6712 }
6713 }
6714 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
6715 throw e.setUnfinishedMessage(this);
6716 } catch (java.io.IOException e) {
6717 throw new com.google.protobuf.InvalidProtocolBufferException(
6718 e).setUnfinishedMessage(this);
6719 } finally {
6720 if (((mutable_bitField0_ & 0x00000001) != 0)) {
6721 s_ = java.util.Collections.unmodifiableList(s_); // C
6722 }
6723 this.unknownFields = unknownFields.build();
6724 makeExtensionsImmutable();
6725 }
6726 }
6727 public static final com.google.protobuf.Descriptors.Descriptor
6728 getDescriptor() {
6729 return org.openstreetmap.osmosis.osmbinary.Osmformat.internal_static_OSMPBF_StringTable_descriptor;
6730 }
6731
6732 @java.lang.Override
6733 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
6734 internalGetFieldAccessorTable() {
6735 return org.openstreetmap.osmosis.osmbinary.Osmformat.internal_static_OSMPBF_StringTable_fieldAccessorTable
6736 .ensureFieldAccessorsInitialized(
6737 org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable.class, org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable.Builder.class);
6738 }
6739
6740 public static final int S_FIELD_NUMBER = 1;
6741 private java.util.List<com.google.protobuf.ByteString> s_;
6742 /**
6743 * <code>repeated bytes s = 1;</code>
6744 * @return A list containing the s.
6745 */
6746 @java.lang.Override
6747 public java.util.List<com.google.protobuf.ByteString>
6748 getSList() {
6749 return s_;
6750 }
6751 /**
6752 * <code>repeated bytes s = 1;</code>
6753 * @return The count of s.
6754 */
6755 public int getSCount() {
6756 return s_.size();
6757 }
6758 /**
6759 * <code>repeated bytes s = 1;</code>
6760 * @param index The index of the element to return.
6761 * @return The s at the given index.
6762 */
6763 public com.google.protobuf.ByteString getS(int index) {
6764 return s_.get(index);
6765 }
6766
6767 private byte memoizedIsInitialized = -1;
6768 @java.lang.Override
6769 public final boolean isInitialized() {
6770 byte isInitialized = memoizedIsInitialized;
6771 if (isInitialized == 1) return true;
6772 if (isInitialized == 0) return false;
6773
6774 memoizedIsInitialized = 1;
6775 return true;
6776 }
6777
6778 @java.lang.Override
6779 public void writeTo(com.google.protobuf.CodedOutputStream output)
6780 throws java.io.IOException {
6781 for (int i = 0; i < s_.size(); i++) {
6782 output.writeBytes(1, s_.get(i));
6783 }
6784 unknownFields.writeTo(output);
6785 }
6786
6787 @java.lang.Override
6788 public int getSerializedSize() {
6789 int size = memoizedSize;
6790 if (size != -1) return size;
6791
6792 size = 0;
6793 {
6794 int dataSize = 0;
6795 for (int i = 0; i < s_.size(); i++) {
6796 dataSize += com.google.protobuf.CodedOutputStream
6797 .computeBytesSizeNoTag(s_.get(i));
6798 }
6799 size += dataSize;
6800 size += 1 * getSList().size();
6801 }
6802 size += unknownFields.getSerializedSize();
6803 memoizedSize = size;
6804 return size;
6805 }
6806
6807 @java.lang.Override
6808 public boolean equals(final java.lang.Object obj) {
6809 if (obj == this) {
6810 return true;
6811 }
6812 if (!(obj instanceof org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable)) {
6813 return super.equals(obj);
6814 }
6815 org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable other = (org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable) obj;
6816
6817 if (!getSList()
6818 .equals(other.getSList())) return false;
6819 if (!unknownFields.equals(other.unknownFields)) return false;
6820 return true;
6821 }
6822
6823 @java.lang.Override
6824 public int hashCode() {
6825 if (memoizedHashCode != 0) {
6826 return memoizedHashCode;
6827 }
6828 int hash = 41;
6829 hash = (19 * hash) + getDescriptor().hashCode();
6830 if (getSCount() > 0) {
6831 hash = (37 * hash) + S_FIELD_NUMBER;
6832 hash = (53 * hash) + getSList().hashCode();
6833 }
6834 hash = (29 * hash) + unknownFields.hashCode();
6835 memoizedHashCode = hash;
6836 return hash;
6837 }
6838
6839 public static org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable parseFrom(
6840 java.nio.ByteBuffer data)
6841 throws com.google.protobuf.InvalidProtocolBufferException {
6842 return PARSER.parseFrom(data);
6843 }
6844 public static org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable parseFrom(
6845 java.nio.ByteBuffer data,
6846 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
6847 throws com.google.protobuf.InvalidProtocolBufferException {
6848 return PARSER.parseFrom(data, extensionRegistry);
6849 }
6850 public static org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable parseFrom(
6851 com.google.protobuf.ByteString data)
6852 throws com.google.protobuf.InvalidProtocolBufferException {
6853 return PARSER.parseFrom(data);
6854 }
6855 public static org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable parseFrom(
6856 com.google.protobuf.ByteString data,
6857 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
6858 throws com.google.protobuf.InvalidProtocolBufferException {
6859 return PARSER.parseFrom(data, extensionRegistry);
6860 }
6861 public static org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable parseFrom(byte[] data)
6862 throws com.google.protobuf.InvalidProtocolBufferException {
6863 return PARSER.parseFrom(data);
6864 }
6865 public static org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable parseFrom(
6866 byte[] data,
6867 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
6868 throws com.google.protobuf.InvalidProtocolBufferException {
6869 return PARSER.parseFrom(data, extensionRegistry);
6870 }
6871 public static org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable parseFrom(java.io.InputStream input)
6872 throws java.io.IOException {
6873 return com.google.protobuf.GeneratedMessageV3
6874 .parseWithIOException(PARSER, input);
6875 }
6876 public static org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable parseFrom(
6877 java.io.InputStream input,
6878 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
6879 throws java.io.IOException {
6880 return com.google.protobuf.GeneratedMessageV3
6881 .parseWithIOException(PARSER, input, extensionRegistry);
6882 }
6883 public static org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable parseDelimitedFrom(java.io.InputStream input)
6884 throws java.io.IOException {
6885 return com.google.protobuf.GeneratedMessageV3
6886 .parseDelimitedWithIOException(PARSER, input);
6887 }
6888 public static org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable parseDelimitedFrom(
6889 java.io.InputStream input,
6890 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
6891 throws java.io.IOException {
6892 return com.google.protobuf.GeneratedMessageV3
6893 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
6894 }
6895 public static org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable parseFrom(
6896 com.google.protobuf.CodedInputStream input)
6897 throws java.io.IOException {
6898 return com.google.protobuf.GeneratedMessageV3
6899 .parseWithIOException(PARSER, input);
6900 }
6901 public static org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable parseFrom(
6902 com.google.protobuf.CodedInputStream input,
6903 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
6904 throws java.io.IOException {
6905 return com.google.protobuf.GeneratedMessageV3
6906 .parseWithIOException(PARSER, input, extensionRegistry);
6907 }
6908
6909 @java.lang.Override
6910 public Builder newBuilderForType() { return newBuilder(); }
6911 public static Builder newBuilder() {
6912 return DEFAULT_INSTANCE.toBuilder();
6913 }
6914 public static Builder newBuilder(org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable prototype) {
6915 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
6916 }
6917 @java.lang.Override
6918 public Builder toBuilder() {
6919 return this == DEFAULT_INSTANCE
6920 ? new Builder() : new Builder().mergeFrom(this);
6921 }
6922
6923 @java.lang.Override
6924 protected Builder newBuilderForType(
6925 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
6926 Builder builder = new Builder(parent);
6927 return builder;
6928 }
6929 /**
6930 * <pre>
6931 ** String table, contains the common strings in each block.
6932 *Note that we reserve index '0' as a delimiter, so the entry at that
6933 *index in the table is ALWAYS blank and unused.
6934 * </pre>
6935 *
6936 * Protobuf type {@code OSMPBF.StringTable}
6937 */
6938 public static final class Builder extends
6939 com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
6940 // @@protoc_insertion_point(builder_implements:OSMPBF.StringTable)
6941 org.openstreetmap.osmosis.osmbinary.Osmformat.StringTableOrBuilder {
6942 public static final com.google.protobuf.Descriptors.Descriptor
6943 getDescriptor() {
6944 return org.openstreetmap.osmosis.osmbinary.Osmformat.internal_static_OSMPBF_StringTable_descriptor;
6945 }
6946
6947 @java.lang.Override
6948 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
6949 internalGetFieldAccessorTable() {
6950 return org.openstreetmap.osmosis.osmbinary.Osmformat.internal_static_OSMPBF_StringTable_fieldAccessorTable
6951 .ensureFieldAccessorsInitialized(
6952 org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable.class, org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable.Builder.class);
6953 }
6954
6955 // Construct using org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable.newBuilder()
6956 private Builder() {
6957 maybeForceBuilderInitialization();
6958 }
6959
6960 private Builder(
6961 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
6962 super(parent);
6963 maybeForceBuilderInitialization();
6964 }
6965 private void maybeForceBuilderInitialization() {
6966 if (com.google.protobuf.GeneratedMessageV3
6967 .alwaysUseFieldBuilders) {
6968 }
6969 }
6970 @java.lang.Override
6971 public Builder clear() {
6972 super.clear();
6973 s_ = java.util.Collections.emptyList();
6974 bitField0_ = (bitField0_ & ~0x00000001);
6975 return this;
6976 }
6977
6978 @java.lang.Override
6979 public com.google.protobuf.Descriptors.Descriptor
6980 getDescriptorForType() {
6981 return org.openstreetmap.osmosis.osmbinary.Osmformat.internal_static_OSMPBF_StringTable_descriptor;
6982 }
6983
6984 @java.lang.Override
6985 public org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable getDefaultInstanceForType() {
6986 return org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable.getDefaultInstance();
6987 }
6988
6989 @java.lang.Override
6990 public org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable build() {
6991 org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable result = buildPartial();
6992 if (!result.isInitialized()) {
6993 throw newUninitializedMessageException(result);
6994 }
6995 return result;
6996 }
6997
6998 @java.lang.Override
6999 public org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable buildPartial() {
7000 org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable result = new org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable(this);
7001 int from_bitField0_ = bitField0_;
7002 if (((bitField0_ & 0x00000001) != 0)) {
7003 s_ = java.util.Collections.unmodifiableList(s_);
7004 bitField0_ = (bitField0_ & ~0x00000001);
7005 }
7006 result.s_ = s_;
7007 onBuilt();
7008 return result;
7009 }
7010
7011 @java.lang.Override
7012 public Builder clone() {
7013 return super.clone();
7014 }
7015 @java.lang.Override
7016 public Builder setField(
7017 com.google.protobuf.Descriptors.FieldDescriptor field,
7018 java.lang.Object value) {
7019 return super.setField(field, value);
7020 }
7021 @java.lang.Override
7022 public Builder clearField(
7023 com.google.protobuf.Descriptors.FieldDescriptor field) {
7024 return super.clearField(field);
7025 }
7026 @java.lang.Override
7027 public Builder clearOneof(
7028 com.google.protobuf.Descriptors.OneofDescriptor oneof) {
7029 return super.clearOneof(oneof);
7030 }
7031 @java.lang.Override
7032 public Builder setRepeatedField(
7033 com.google.protobuf.Descriptors.FieldDescriptor field,
7034 int index, java.lang.Object value) {
7035 return super.setRepeatedField(field, index, value);
7036 }
7037 @java.lang.Override
7038 public Builder addRepeatedField(
7039 com.google.protobuf.Descriptors.FieldDescriptor field,
7040 java.lang.Object value) {
7041 return super.addRepeatedField(field, value);
7042 }
7043 @java.lang.Override
7044 public Builder mergeFrom(com.google.protobuf.Message other) {
7045 if (other instanceof org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable) {
7046 return mergeFrom((org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable)other);
7047 } else {
7048 super.mergeFrom(other);
7049 return this;
7050 }
7051 }
7052
7053 public Builder mergeFrom(org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable other) {
7054 if (other == org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable.getDefaultInstance()) return this;
7055 if (!other.s_.isEmpty()) {
7056 if (s_.isEmpty()) {
7057 s_ = other.s_;
7058 bitField0_ = (bitField0_ & ~0x00000001);
7059 } else {
7060 ensureSIsMutable();
7061 s_.addAll(other.s_);
7062 }
7063 onChanged();
7064 }
7065 this.mergeUnknownFields(other.unknownFields);
7066 onChanged();
7067 return this;
7068 }
7069
7070 @java.lang.Override
7071 public final boolean isInitialized() {
7072 return true;
7073 }
7074
7075 @java.lang.Override
7076 public Builder mergeFrom(
7077 com.google.protobuf.CodedInputStream input,
7078 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
7079 throws java.io.IOException {
7080 org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable parsedMessage = null;
7081 try {
7082 parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
7083 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
7084 parsedMessage = (org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable) e.getUnfinishedMessage();
7085 throw e.unwrapIOException();
7086 } finally {
7087 if (parsedMessage != null) {
7088 mergeFrom(parsedMessage);
7089 }
7090 }
7091 return this;
7092 }
7093 private int bitField0_;
7094
7095 private java.util.List<com.google.protobuf.ByteString> s_ = java.util.Collections.emptyList();
7096 private void ensureSIsMutable() {
7097 if (!((bitField0_ & 0x00000001) != 0)) {
7098 s_ = new java.util.ArrayList<com.google.protobuf.ByteString>(s_);
7099 bitField0_ |= 0x00000001;
7100 }
7101 }
7102 /**
7103 * <code>repeated bytes s = 1;</code>
7104 * @return A list containing the s.
7105 */
7106 public java.util.List<com.google.protobuf.ByteString>
7107 getSList() {
7108 return ((bitField0_ & 0x00000001) != 0) ?
7109 java.util.Collections.unmodifiableList(s_) : s_;
7110 }
7111 /**
7112 * <code>repeated bytes s = 1;</code>
7113 * @return The count of s.
7114 */
7115 public int getSCount() {
7116 return s_.size();
7117 }
7118 /**
7119 * <code>repeated bytes s = 1;</code>
7120 * @param index The index of the element to return.
7121 * @return The s at the given index.
7122 */
7123 public com.google.protobuf.ByteString getS(int index) {
7124 return s_.get(index);
7125 }
7126 /**
7127 * <code>repeated bytes s = 1;</code>
7128 * @param index The index to set the value at.
7129 * @param value The s to set.
7130 * @return This builder for chaining.
7131 */
7132 public Builder setS(
7133 int index, com.google.protobuf.ByteString value) {
7134 if (value == null) {
7135 throw new NullPointerException();
7136 }
7137 ensureSIsMutable();
7138 s_.set(index, value);
7139 onChanged();
7140 return this;
7141 }
7142 /**
7143 * <code>repeated bytes s = 1;</code>
7144 * @param value The s to add.
7145 * @return This builder for chaining.
7146 */
7147 public Builder addS(com.google.protobuf.ByteString value) {
7148 if (value == null) {
7149 throw new NullPointerException();
7150 }
7151 ensureSIsMutable();
7152 s_.add(value);
7153 onChanged();
7154 return this;
7155 }
7156 /**
7157 * <code>repeated bytes s = 1;</code>
7158 * @param values The s to add.
7159 * @return This builder for chaining.
7160 */
7161 public Builder addAllS(
7162 java.lang.Iterable<? extends com.google.protobuf.ByteString> values) {
7163 ensureSIsMutable();
7164 com.google.protobuf.AbstractMessageLite.Builder.addAll(
7165 values, s_);
7166 onChanged();
7167 return this;
7168 }
7169 /**
7170 * <code>repeated bytes s = 1;</code>
7171 * @return This builder for chaining.
7172 */
7173 public Builder clearS() {
7174 s_ = java.util.Collections.emptyList();
7175 bitField0_ = (bitField0_ & ~0x00000001);
7176 onChanged();
7177 return this;
7178 }
7179 @java.lang.Override
7180 public final Builder setUnknownFields(
7181 final com.google.protobuf.UnknownFieldSet unknownFields) {
7182 return super.setUnknownFields(unknownFields);
7183 }
7184
7185 @java.lang.Override
7186 public final Builder mergeUnknownFields(
7187 final com.google.protobuf.UnknownFieldSet unknownFields) {
7188 return super.mergeUnknownFields(unknownFields);
7189 }
7190
7191
7192 // @@protoc_insertion_point(builder_scope:OSMPBF.StringTable)
7193 }
7194
7195 // @@protoc_insertion_point(class_scope:OSMPBF.StringTable)
7196 private static final org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable DEFAULT_INSTANCE;
7197 static {
7198 DEFAULT_INSTANCE = new org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable();
7199 }
7200
7201 public static org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable getDefaultInstance() {
7202 return DEFAULT_INSTANCE;
7203 }
7204
7205 @java.lang.Deprecated public static final com.google.protobuf.Parser<StringTable>
7206 PARSER = new com.google.protobuf.AbstractParser<StringTable>() {
7207 @java.lang.Override
7208 public StringTable parsePartialFrom(
7209 com.google.protobuf.CodedInputStream input,
7210 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
7211 throws com.google.protobuf.InvalidProtocolBufferException {
7212 return new StringTable(input, extensionRegistry);
7213 }
7214 };
7215
7216 public static com.google.protobuf.Parser<StringTable> parser() {
7217 return PARSER;
7218 }
7219
7220 @java.lang.Override
7221 public com.google.protobuf.Parser<StringTable> getParserForType() {
7222 return PARSER;
7223 }
7224
7225 @java.lang.Override
7226 public org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable getDefaultInstanceForType() {
7227 return DEFAULT_INSTANCE;
7228 }
7229
7230 }
7231
7232 public interface InfoOrBuilder extends
7233 // @@protoc_insertion_point(interface_extends:OSMPBF.Info)
7234 com.google.protobuf.MessageOrBuilder {
7235
7236 /**
7237 * <code>optional int32 version = 1 [default = -1];</code>
7238 * @return Whether the version field is set.
7239 */
7240 boolean hasVersion();
7241 /**
7242 * <code>optional int32 version = 1 [default = -1];</code>
7243 * @return The version.
7244 */
7245 int getVersion();
7246
7247 /**
7248 * <code>optional int64 timestamp = 2;</code>
7249 * @return Whether the timestamp field is set.
7250 */
7251 boolean hasTimestamp();
7252 /**
7253 * <code>optional int64 timestamp = 2;</code>
7254 * @return The timestamp.
7255 */
7256 long getTimestamp();
7257
7258 /**
7259 * <code>optional int64 changeset = 3;</code>
7260 * @return Whether the changeset field is set.
7261 */
7262 boolean hasChangeset();
7263 /**
7264 * <code>optional int64 changeset = 3;</code>
7265 * @return The changeset.
7266 */
7267 long getChangeset();
7268
7269 /**
7270 * <code>optional int32 uid = 4;</code>
7271 * @return Whether the uid field is set.
7272 */
7273 boolean hasUid();
7274 /**
7275 * <code>optional int32 uid = 4;</code>
7276 * @return The uid.
7277 */
7278 int getUid();
7279
7280 /**
7281 * <pre>
7282 * String IDs
7283 * </pre>
7284 *
7285 * <code>optional uint32 user_sid = 5;</code>
7286 * @return Whether the userSid field is set.
7287 */
7288 boolean hasUserSid();
7289 /**
7290 * <pre>
7291 * String IDs
7292 * </pre>
7293 *
7294 * <code>optional uint32 user_sid = 5;</code>
7295 * @return The userSid.
7296 */
7297 int getUserSid();
7298
7299 /**
7300 * <pre>
7301 * The visible flag is used to store history information. It indicates that
7302 * the current object version has been created by a delete operation on the
7303 * OSM API.
7304 * When a writer sets this flag, it MUST add a required_features tag with
7305 * value "HistoricalInformation" to the HeaderBlock.
7306 * If this flag is not available for some object it MUST be assumed to be
7307 * true if the file has the required_features tag "HistoricalInformation"
7308 * set.
7309 * </pre>
7310 *
7311 * <code>optional bool visible = 6;</code>
7312 * @return Whether the visible field is set.
7313 */
7314 boolean hasVisible();
7315 /**
7316 * <pre>
7317 * The visible flag is used to store history information. It indicates that
7318 * the current object version has been created by a delete operation on the
7319 * OSM API.
7320 * When a writer sets this flag, it MUST add a required_features tag with
7321 * value "HistoricalInformation" to the HeaderBlock.
7322 * If this flag is not available for some object it MUST be assumed to be
7323 * true if the file has the required_features tag "HistoricalInformation"
7324 * set.
7325 * </pre>
7326 *
7327 * <code>optional bool visible = 6;</code>
7328 * @return The visible.
7329 */
7330 boolean getVisible();
7331 }
7332 /**
7333 * <pre>
7334 * Optional metadata that may be included into each primitive.
7335 * </pre>
7336 *
7337 * Protobuf type {@code OSMPBF.Info}
7338 */
7339 public static final class Info extends
7340 com.google.protobuf.GeneratedMessageV3 implements
7341 // @@protoc_insertion_point(message_implements:OSMPBF.Info)
7342 InfoOrBuilder {
7343 private static final long serialVersionUID = 0L;
7344 // Use Info.newBuilder() to construct.
7345 private Info(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
7346 super(builder);
7347 }
7348 private Info() {
7349 version_ = -1;
7350 }
7351
7352 @java.lang.Override
7353 @SuppressWarnings({"unused"})
7354 protected java.lang.Object newInstance(
7355 UnusedPrivateParameter unused) {
7356 return new Info();
7357 }
7358
7359 @java.lang.Override
7360 public final com.google.protobuf.UnknownFieldSet
7361 getUnknownFields() {
7362 return this.unknownFields;
7363 }
7364 private Info(
7365 com.google.protobuf.CodedInputStream input,
7366 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
7367 throws com.google.protobuf.InvalidProtocolBufferException {
7368 this();
7369 if (extensionRegistry == null) {
7370 throw new java.lang.NullPointerException();
7371 }
7372 int mutable_bitField0_ = 0;
7373 com.google.protobuf.UnknownFieldSet.Builder unknownFields =
7374 com.google.protobuf.UnknownFieldSet.newBuilder();
7375 try {
7376 boolean done = false;
7377 while (!done) {
7378 int tag = input.readTag();
7379 switch (tag) {
7380 case 0:
7381 done = true;
7382 break;
7383 case 8: {
7384 bitField0_ |= 0x00000001;
7385 version_ = input.readInt32();
7386 break;
7387 }
7388 case 16: {
7389 bitField0_ |= 0x00000002;
7390 timestamp_ = input.readInt64();
7391 break;
7392 }
7393 case 24: {
7394 bitField0_ |= 0x00000004;
7395 changeset_ = input.readInt64();
7396 break;
7397 }
7398 case 32: {
7399 bitField0_ |= 0x00000008;
7400 uid_ = input.readInt32();
7401 break;
7402 }
7403 case 40: {
7404 bitField0_ |= 0x00000010;
7405 userSid_ = input.readUInt32();
7406 break;
7407 }
7408 case 48: {
7409 bitField0_ |= 0x00000020;
7410 visible_ = input.readBool();
7411 break;
7412 }
7413 default: {
7414 if (!parseUnknownField(
7415 input, unknownFields, extensionRegistry, tag)) {
7416 done = true;
7417 }
7418 break;
7419 }
7420 }
7421 }
7422 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
7423 throw e.setUnfinishedMessage(this);
7424 } catch (java.io.IOException e) {
7425 throw new com.google.protobuf.InvalidProtocolBufferException(
7426 e).setUnfinishedMessage(this);
7427 } finally {
7428 this.unknownFields = unknownFields.build();
7429 makeExtensionsImmutable();
7430 }
7431 }
7432 public static final com.google.protobuf.Descriptors.Descriptor
7433 getDescriptor() {
7434 return org.openstreetmap.osmosis.osmbinary.Osmformat.internal_static_OSMPBF_Info_descriptor;
7435 }
7436
7437 @java.lang.Override
7438 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
7439 internalGetFieldAccessorTable() {
7440 return org.openstreetmap.osmosis.osmbinary.Osmformat.internal_static_OSMPBF_Info_fieldAccessorTable
7441 .ensureFieldAccessorsInitialized(
7442 org.openstreetmap.osmosis.osmbinary.Osmformat.Info.class, org.openstreetmap.osmosis.osmbinary.Osmformat.Info.Builder.class);
7443 }
7444
7445 private int bitField0_;
7446 public static final int VERSION_FIELD_NUMBER = 1;
7447 private int version_;
7448 /**
7449 * <code>optional int32 version = 1 [default = -1];</code>
7450 * @return Whether the version field is set.
7451 */
7452 @java.lang.Override
7453 public boolean hasVersion() {
7454 return ((bitField0_ & 0x00000001) != 0);
7455 }
7456 /**
7457 * <code>optional int32 version = 1 [default = -1];</code>
7458 * @return The version.
7459 */
7460 @java.lang.Override
7461 public int getVersion() {
7462 return version_;
7463 }
7464
7465 public static final int TIMESTAMP_FIELD_NUMBER = 2;
7466 private long timestamp_;
7467 /**
7468 * <code>optional int64 timestamp = 2;</code>
7469 * @return Whether the timestamp field is set.
7470 */
7471 @java.lang.Override
7472 public boolean hasTimestamp() {
7473 return ((bitField0_ & 0x00000002) != 0);
7474 }
7475 /**
7476 * <code>optional int64 timestamp = 2;</code>
7477 * @return The timestamp.
7478 */
7479 @java.lang.Override
7480 public long getTimestamp() {
7481 return timestamp_;
7482 }
7483
7484 public static final int CHANGESET_FIELD_NUMBER = 3;
7485 private long changeset_;
7486 /**
7487 * <code>optional int64 changeset = 3;</code>
7488 * @return Whether the changeset field is set.
7489 */
7490 @java.lang.Override
7491 public boolean hasChangeset() {
7492 return ((bitField0_ & 0x00000004) != 0);
7493 }
7494 /**
7495 * <code>optional int64 changeset = 3;</code>
7496 * @return The changeset.
7497 */
7498 @java.lang.Override
7499 public long getChangeset() {
7500 return changeset_;
7501 }
7502
7503 public static final int UID_FIELD_NUMBER = 4;
7504 private int uid_;
7505 /**
7506 * <code>optional int32 uid = 4;</code>
7507 * @return Whether the uid field is set.
7508 */
7509 @java.lang.Override
7510 public boolean hasUid() {
7511 return ((bitField0_ & 0x00000008) != 0);
7512 }
7513 /**
7514 * <code>optional int32 uid = 4;</code>
7515 * @return The uid.
7516 */
7517 @java.lang.Override
7518 public int getUid() {
7519 return uid_;
7520 }
7521
7522 public static final int USER_SID_FIELD_NUMBER = 5;
7523 private int userSid_;
7524 /**
7525 * <pre>
7526 * String IDs
7527 * </pre>
7528 *
7529 * <code>optional uint32 user_sid = 5;</code>
7530 * @return Whether the userSid field is set.
7531 */
7532 @java.lang.Override
7533 public boolean hasUserSid() {
7534 return ((bitField0_ & 0x00000010) != 0);
7535 }
7536 /**
7537 * <pre>
7538 * String IDs
7539 * </pre>
7540 *
7541 * <code>optional uint32 user_sid = 5;</code>
7542 * @return The userSid.
7543 */
7544 @java.lang.Override
7545 public int getUserSid() {
7546 return userSid_;
7547 }
7548
7549 public static final int VISIBLE_FIELD_NUMBER = 6;
7550 private boolean visible_;
7551 /**
7552 * <pre>
7553 * The visible flag is used to store history information. It indicates that
7554 * the current object version has been created by a delete operation on the
7555 * OSM API.
7556 * When a writer sets this flag, it MUST add a required_features tag with
7557 * value "HistoricalInformation" to the HeaderBlock.
7558 * If this flag is not available for some object it MUST be assumed to be
7559 * true if the file has the required_features tag "HistoricalInformation"
7560 * set.
7561 * </pre>
7562 *
7563 * <code>optional bool visible = 6;</code>
7564 * @return Whether the visible field is set.
7565 */
7566 @java.lang.Override
7567 public boolean hasVisible() {
7568 return ((bitField0_ & 0x00000020) != 0);
7569 }
7570 /**
7571 * <pre>
7572 * The visible flag is used to store history information. It indicates that
7573 * the current object version has been created by a delete operation on the
7574 * OSM API.
7575 * When a writer sets this flag, it MUST add a required_features tag with
7576 * value "HistoricalInformation" to the HeaderBlock.
7577 * If this flag is not available for some object it MUST be assumed to be
7578 * true if the file has the required_features tag "HistoricalInformation"
7579 * set.
7580 * </pre>
7581 *
7582 * <code>optional bool visible = 6;</code>
7583 * @return The visible.
7584 */
7585 @java.lang.Override
7586 public boolean getVisible() {
7587 return visible_;
7588 }
7589
7590 private byte memoizedIsInitialized = -1;
7591 @java.lang.Override
7592 public final boolean isInitialized() {
7593 byte isInitialized = memoizedIsInitialized;
7594 if (isInitialized == 1) return true;
7595 if (isInitialized == 0) return false;
7596
7597 memoizedIsInitialized = 1;
7598 return true;
7599 }
7600
7601 @java.lang.Override
7602 public void writeTo(com.google.protobuf.CodedOutputStream output)
7603 throws java.io.IOException {
7604 if (((bitField0_ & 0x00000001) != 0)) {
7605 output.writeInt32(1, version_);
7606 }
7607 if (((bitField0_ & 0x00000002) != 0)) {
7608 output.writeInt64(2, timestamp_);
7609 }
7610 if (((bitField0_ & 0x00000004) != 0)) {
7611 output.writeInt64(3, changeset_);
7612 }
7613 if (((bitField0_ & 0x00000008) != 0)) {
7614 output.writeInt32(4, uid_);
7615 }
7616 if (((bitField0_ & 0x00000010) != 0)) {
7617 output.writeUInt32(5, userSid_);
7618 }
7619 if (((bitField0_ & 0x00000020) != 0)) {
7620 output.writeBool(6, visible_);
7621 }
7622 unknownFields.writeTo(output);
7623 }
7624
7625 @java.lang.Override
7626 public int getSerializedSize() {
7627 int size = memoizedSize;
7628 if (size != -1) return size;
7629
7630 size = 0;
7631 if (((bitField0_ & 0x00000001) != 0)) {
7632 size += com.google.protobuf.CodedOutputStream
7633 .computeInt32Size(1, version_);
7634 }
7635 if (((bitField0_ & 0x00000002) != 0)) {
7636 size += com.google.protobuf.CodedOutputStream
7637 .computeInt64Size(2, timestamp_);
7638 }
7639 if (((bitField0_ & 0x00000004) != 0)) {
7640 size += com.google.protobuf.CodedOutputStream
7641 .computeInt64Size(3, changeset_);
7642 }
7643 if (((bitField0_ & 0x00000008) != 0)) {
7644 size += com.google.protobuf.CodedOutputStream
7645 .computeInt32Size(4, uid_);
7646 }
7647 if (((bitField0_ & 0x00000010) != 0)) {
7648 size += com.google.protobuf.CodedOutputStream
7649 .computeUInt32Size(5, userSid_);
7650 }
7651 if (((bitField0_ & 0x00000020) != 0)) {
7652 size += com.google.protobuf.CodedOutputStream
7653 .computeBoolSize(6, visible_);
7654 }
7655 size += unknownFields.getSerializedSize();
7656 memoizedSize = size;
7657 return size;
7658 }
7659
7660 @java.lang.Override
7661 public boolean equals(final java.lang.Object obj) {
7662 if (obj == this) {
7663 return true;
7664 }
7665 if (!(obj instanceof org.openstreetmap.osmosis.osmbinary.Osmformat.Info)) {
7666 return super.equals(obj);
7667 }
7668 org.openstreetmap.osmosis.osmbinary.Osmformat.Info other = (org.openstreetmap.osmosis.osmbinary.Osmformat.Info) obj;
7669
7670 if (hasVersion() != other.hasVersion()) return false;
7671 if (hasVersion()) {
7672 if (getVersion()
7673 != other.getVersion()) return false;
7674 }
7675 if (hasTimestamp() != other.hasTimestamp()) return false;
7676 if (hasTimestamp()) {
7677 if (getTimestamp()
7678 != other.getTimestamp()) return false;
7679 }
7680 if (hasChangeset() != other.hasChangeset()) return false;
7681 if (hasChangeset()) {
7682 if (getChangeset()
7683 != other.getChangeset()) return false;
7684 }
7685 if (hasUid() != other.hasUid()) return false;
7686 if (hasUid()) {
7687 if (getUid()
7688 != other.getUid()) return false;
7689 }
7690 if (hasUserSid() != other.hasUserSid()) return false;
7691 if (hasUserSid()) {
7692 if (getUserSid()
7693 != other.getUserSid()) return false;
7694 }
7695 if (hasVisible() != other.hasVisible()) return false;
7696 if (hasVisible()) {
7697 if (getVisible()
7698 != other.getVisible()) return false;
7699 }
7700 if (!unknownFields.equals(other.unknownFields)) return false;
7701 return true;
7702 }
7703
7704 @java.lang.Override
7705 public int hashCode() {
7706 if (memoizedHashCode != 0) {
7707 return memoizedHashCode;
7708 }
7709 int hash = 41;
7710 hash = (19 * hash) + getDescriptor().hashCode();
7711 if (hasVersion()) {
7712 hash = (37 * hash) + VERSION_FIELD_NUMBER;
7713 hash = (53 * hash) + getVersion();
7714 }
7715 if (hasTimestamp()) {
7716 hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER;
7717 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
7718 getTimestamp());
7719 }
7720 if (hasChangeset()) {
7721 hash = (37 * hash) + CHANGESET_FIELD_NUMBER;
7722 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
7723 getChangeset());
7724 }
7725 if (hasUid()) {
7726 hash = (37 * hash) + UID_FIELD_NUMBER;
7727 hash = (53 * hash) + getUid();
7728 }
7729 if (hasUserSid()) {
7730 hash = (37 * hash) + USER_SID_FIELD_NUMBER;
7731 hash = (53 * hash) + getUserSid();
7732 }
7733 if (hasVisible()) {
7734 hash = (37 * hash) + VISIBLE_FIELD_NUMBER;
7735 hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
7736 getVisible());
7737 }
7738 hash = (29 * hash) + unknownFields.hashCode();
7739 memoizedHashCode = hash;
7740 return hash;
7741 }
7742
7743 public static org.openstreetmap.osmosis.osmbinary.Osmformat.Info parseFrom(
7744 java.nio.ByteBuffer data)
7745 throws com.google.protobuf.InvalidProtocolBufferException {
7746 return PARSER.parseFrom(data);
7747 }
7748 public static org.openstreetmap.osmosis.osmbinary.Osmformat.Info parseFrom(
7749 java.nio.ByteBuffer data,
7750 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
7751 throws com.google.protobuf.InvalidProtocolBufferException {
7752 return PARSER.parseFrom(data, extensionRegistry);
7753 }
7754 public static org.openstreetmap.osmosis.osmbinary.Osmformat.Info parseFrom(
7755 com.google.protobuf.ByteString data)
7756 throws com.google.protobuf.InvalidProtocolBufferException {
7757 return PARSER.parseFrom(data);
7758 }
7759 public static org.openstreetmap.osmosis.osmbinary.Osmformat.Info parseFrom(
7760 com.google.protobuf.ByteString data,
7761 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
7762 throws com.google.protobuf.InvalidProtocolBufferException {
7763 return PARSER.parseFrom(data, extensionRegistry);
7764 }
7765 public static org.openstreetmap.osmosis.osmbinary.Osmformat.Info parseFrom(byte[] data)
7766 throws com.google.protobuf.InvalidProtocolBufferException {
7767 return PARSER.parseFrom(data);
7768 }
7769 public static org.openstreetmap.osmosis.osmbinary.Osmformat.Info parseFrom(
7770 byte[] data,
7771 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
7772 throws com.google.protobuf.InvalidProtocolBufferException {
7773 return PARSER.parseFrom(data, extensionRegistry);
7774 }
7775 public static org.openstreetmap.osmosis.osmbinary.Osmformat.Info parseFrom(java.io.InputStream input)
7776 throws java.io.IOException {
7777 return com.google.protobuf.GeneratedMessageV3
7778 .parseWithIOException(PARSER, input);
7779 }
7780 public static org.openstreetmap.osmosis.osmbinary.Osmformat.Info parseFrom(
7781 java.io.InputStream input,
7782 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
7783 throws java.io.IOException {
7784 return com.google.protobuf.GeneratedMessageV3
7785 .parseWithIOException(PARSER, input, extensionRegistry);
7786 }
7787 public static org.openstreetmap.osmosis.osmbinary.Osmformat.Info parseDelimitedFrom(java.io.InputStream input)
7788 throws java.io.IOException {
7789 return com.google.protobuf.GeneratedMessageV3
7790 .parseDelimitedWithIOException(PARSER, input);
7791 }
7792 public static org.openstreetmap.osmosis.osmbinary.Osmformat.Info parseDelimitedFrom(
7793 java.io.InputStream input,
7794 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
7795 throws java.io.IOException {
7796 return com.google.protobuf.GeneratedMessageV3
7797 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
7798 }
7799 public static org.openstreetmap.osmosis.osmbinary.Osmformat.Info parseFrom(
7800 com.google.protobuf.CodedInputStream input)
7801 throws java.io.IOException {
7802 return com.google.protobuf.GeneratedMessageV3
7803 .parseWithIOException(PARSER, input);
7804 }
7805 public static org.openstreetmap.osmosis.osmbinary.Osmformat.Info parseFrom(
7806 com.google.protobuf.CodedInputStream input,
7807 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
7808 throws java.io.IOException {
7809 return com.google.protobuf.GeneratedMessageV3
7810 .parseWithIOException(PARSER, input, extensionRegistry);
7811 }
7812
7813 @java.lang.Override
7814 public Builder newBuilderForType() { return newBuilder(); }
7815 public static Builder newBuilder() {
7816 return DEFAULT_INSTANCE.toBuilder();
7817 }
7818 public static Builder newBuilder(org.openstreetmap.osmosis.osmbinary.Osmformat.Info prototype) {
7819 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
7820 }
7821 @java.lang.Override
7822 public Builder toBuilder() {
7823 return this == DEFAULT_INSTANCE
7824 ? new Builder() : new Builder().mergeFrom(this);
7825 }
7826
7827 @java.lang.Override
7828 protected Builder newBuilderForType(
7829 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
7830 Builder builder = new Builder(parent);
7831 return builder;
7832 }
7833 /**
7834 * <pre>
7835 * Optional metadata that may be included into each primitive.
7836 * </pre>
7837 *
7838 * Protobuf type {@code OSMPBF.Info}
7839 */
7840 public static final class Builder extends
7841 com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
7842 // @@protoc_insertion_point(builder_implements:OSMPBF.Info)
7843 org.openstreetmap.osmosis.osmbinary.Osmformat.InfoOrBuilder {
7844 public static final com.google.protobuf.Descriptors.Descriptor
7845 getDescriptor() {
7846 return org.openstreetmap.osmosis.osmbinary.Osmformat.internal_static_OSMPBF_Info_descriptor;
7847 }
7848
7849 @java.lang.Override
7850 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
7851 internalGetFieldAccessorTable() {
7852 return org.openstreetmap.osmosis.osmbinary.Osmformat.internal_static_OSMPBF_Info_fieldAccessorTable
7853 .ensureFieldAccessorsInitialized(
7854 org.openstreetmap.osmosis.osmbinary.Osmformat.Info.class, org.openstreetmap.osmosis.osmbinary.Osmformat.Info.Builder.class);
7855 }
7856
7857 // Construct using org.openstreetmap.osmosis.osmbinary.Osmformat.Info.newBuilder()
7858 private Builder() {
7859 maybeForceBuilderInitialization();
7860 }
7861
7862 private Builder(
7863 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
7864 super(parent);
7865 maybeForceBuilderInitialization();
7866 }
7867 private void maybeForceBuilderInitialization() {
7868 if (com.google.protobuf.GeneratedMessageV3
7869 .alwaysUseFieldBuilders) {
7870 }
7871 }
7872 @java.lang.Override
7873 public Builder clear() {
7874 super.clear();
7875 version_ = -1;
7876 bitField0_ = (bitField0_ & ~0x00000001);
7877 timestamp_ = 0L;
7878 bitField0_ = (bitField0_ & ~0x00000002);
7879 changeset_ = 0L;
7880 bitField0_ = (bitField0_ & ~0x00000004);
7881 uid_ = 0;
7882 bitField0_ = (bitField0_ & ~0x00000008);
7883 userSid_ = 0;
7884 bitField0_ = (bitField0_ & ~0x00000010);
7885 visible_ = false;
7886 bitField0_ = (bitField0_ & ~0x00000020);
7887 return this;
7888 }
7889
7890 @java.lang.Override
7891 public com.google.protobuf.Descriptors.Descriptor
7892 getDescriptorForType() {
7893 return org.openstreetmap.osmosis.osmbinary.Osmformat.internal_static_OSMPBF_Info_descriptor;
7894 }
7895
7896 @java.lang.Override
7897 public org.openstreetmap.osmosis.osmbinary.Osmformat.Info getDefaultInstanceForType() {
7898 return org.openstreetmap.osmosis.osmbinary.Osmformat.Info.getDefaultInstance();
7899 }
7900
7901 @java.lang.Override
7902 public org.openstreetmap.osmosis.osmbinary.Osmformat.Info build() {
7903 org.openstreetmap.osmosis.osmbinary.Osmformat.Info result = buildPartial();
7904 if (!result.isInitialized()) {
7905 throw newUninitializedMessageException(result);
7906 }
7907 return result;
7908 }
7909
7910 @java.lang.Override
7911 public org.openstreetmap.osmosis.osmbinary.Osmformat.Info buildPartial() {
7912 org.openstreetmap.osmosis.osmbinary.Osmformat.Info result = new org.openstreetmap.osmosis.osmbinary.Osmformat.Info(this);
7913 int from_bitField0_ = bitField0_;
7914 int to_bitField0_ = 0;
7915 if (((from_bitField0_ & 0x00000001) != 0)) {
7916 to_bitField0_ |= 0x00000001;
7917 }
7918 result.version_ = version_;
7919 if (((from_bitField0_ & 0x00000002) != 0)) {
7920 result.timestamp_ = timestamp_;
7921 to_bitField0_ |= 0x00000002;
7922 }
7923 if (((from_bitField0_ & 0x00000004) != 0)) {
7924 result.changeset_ = changeset_;
7925 to_bitField0_ |= 0x00000004;
7926 }
7927 if (((from_bitField0_ & 0x00000008) != 0)) {
7928 result.uid_ = uid_;
7929 to_bitField0_ |= 0x00000008;
7930 }
7931 if (((from_bitField0_ & 0x00000010) != 0)) {
7932 result.userSid_ = userSid_;
7933 to_bitField0_ |= 0x00000010;
7934 }
7935 if (((from_bitField0_ & 0x00000020) != 0)) {
7936 result.visible_ = visible_;
7937 to_bitField0_ |= 0x00000020;
7938 }
7939 result.bitField0_ = to_bitField0_;
7940 onBuilt();
7941 return result;
7942 }
7943
7944 @java.lang.Override
7945 public Builder clone() {
7946 return super.clone();
7947 }
7948 @java.lang.Override
7949 public Builder setField(
7950 com.google.protobuf.Descriptors.FieldDescriptor field,
7951 java.lang.Object value) {
7952 return super.setField(field, value);
7953 }
7954 @java.lang.Override
7955 public Builder clearField(
7956 com.google.protobuf.Descriptors.FieldDescriptor field) {
7957 return super.clearField(field);
7958 }
7959 @java.lang.Override
7960 public Builder clearOneof(
7961 com.google.protobuf.Descriptors.OneofDescriptor oneof) {
7962 return super.clearOneof(oneof);
7963 }
7964 @java.lang.Override
7965 public Builder setRepeatedField(
7966 com.google.protobuf.Descriptors.FieldDescriptor field,
7967 int index, java.lang.Object value) {
7968 return super.setRepeatedField(field, index, value);
7969 }
7970 @java.lang.Override
7971 public Builder addRepeatedField(
7972 com.google.protobuf.Descriptors.FieldDescriptor field,
7973 java.lang.Object value) {
7974 return super.addRepeatedField(field, value);
7975 }
7976 @java.lang.Override
7977 public Builder mergeFrom(com.google.protobuf.Message other) {
7978 if (other instanceof org.openstreetmap.osmosis.osmbinary.Osmformat.Info) {
7979 return mergeFrom((org.openstreetmap.osmosis.osmbinary.Osmformat.Info)other);
7980 } else {
7981 super.mergeFrom(other);
7982 return this;
7983 }
7984 }
7985
7986 public Builder mergeFrom(org.openstreetmap.osmosis.osmbinary.Osmformat.Info other) {
7987 if (other == org.openstreetmap.osmosis.osmbinary.Osmformat.Info.getDefaultInstance()) return this;
7988 if (other.hasVersion()) {
7989 setVersion(other.getVersion());
7990 }
7991 if (other.hasTimestamp()) {
7992 setTimestamp(other.getTimestamp());
7993 }
7994 if (other.hasChangeset()) {
7995 setChangeset(other.getChangeset());
7996 }
7997 if (other.hasUid()) {
7998 setUid(other.getUid());
7999 }
8000 if (other.hasUserSid()) {
8001 setUserSid(other.getUserSid());
8002 }
8003 if (other.hasVisible()) {
8004 setVisible(other.getVisible());
8005 }
8006 this.mergeUnknownFields(other.unknownFields);
8007 onChanged();
8008 return this;
8009 }
8010
8011 @java.lang.Override
8012 public final boolean isInitialized() {
8013 return true;
8014 }
8015
8016 @java.lang.Override
8017 public Builder mergeFrom(
8018 com.google.protobuf.CodedInputStream input,
8019 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
8020 throws java.io.IOException {
8021 org.openstreetmap.osmosis.osmbinary.Osmformat.Info parsedMessage = null;
8022 try {
8023 parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
8024 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
8025 parsedMessage = (org.openstreetmap.osmosis.osmbinary.Osmformat.Info) e.getUnfinishedMessage();
8026 throw e.unwrapIOException();
8027 } finally {
8028 if (parsedMessage != null) {
8029 mergeFrom(parsedMessage);
8030 }
8031 }
8032 return this;
8033 }
8034 private int bitField0_;
8035
8036 private int version_ = -1;
8037 /**
8038 * <code>optional int32 version = 1 [default = -1];</code>
8039 * @return Whether the version field is set.
8040 */
8041 @java.lang.Override
8042 public boolean hasVersion() {
8043 return ((bitField0_ & 0x00000001) != 0);
8044 }
8045 /**
8046 * <code>optional int32 version = 1 [default = -1];</code>
8047 * @return The version.
8048 */
8049 @java.lang.Override
8050 public int getVersion() {
8051 return version_;
8052 }
8053 /**
8054 * <code>optional int32 version = 1 [default = -1];</code>
8055 * @param value The version to set.
8056 * @return This builder for chaining.
8057 */
8058 public Builder setVersion(int value) {
8059 bitField0_ |= 0x00000001;
8060 version_ = value;
8061 onChanged();
8062 return this;
8063 }
8064 /**
8065 * <code>optional int32 version = 1 [default = -1];</code>
8066 * @return This builder for chaining.
8067 */
8068 public Builder clearVersion() {
8069 bitField0_ = (bitField0_ & ~0x00000001);
8070 version_ = -1;
8071 onChanged();
8072 return this;
8073 }
8074
8075 private long timestamp_ ;
8076 /**
8077 * <code>optional int64 timestamp = 2;</code>
8078 * @return Whether the timestamp field is set.
8079 */
8080 @java.lang.Override
8081 public boolean hasTimestamp() {
8082 return ((bitField0_ & 0x00000002) != 0);
8083 }
8084 /**
8085 * <code>optional int64 timestamp = 2;</code>
8086 * @return The timestamp.
8087 */
8088 @java.lang.Override
8089 public long getTimestamp() {
8090 return timestamp_;
8091 }
8092 /**
8093 * <code>optional int64 timestamp = 2;</code>
8094 * @param value The timestamp to set.
8095 * @return This builder for chaining.
8096 */
8097 public Builder setTimestamp(long value) {
8098 bitField0_ |= 0x00000002;
8099 timestamp_ = value;
8100 onChanged();
8101 return this;
8102 }
8103 /**
8104 * <code>optional int64 timestamp = 2;</code>
8105 * @return This builder for chaining.
8106 */
8107 public Builder clearTimestamp() {
8108 bitField0_ = (bitField0_ & ~0x00000002);
8109 timestamp_ = 0L;
8110 onChanged();
8111 return this;
8112 }
8113
8114 private long changeset_ ;
8115 /**
8116 * <code>optional int64 changeset = 3;</code>
8117 * @return Whether the changeset field is set.
8118 */
8119 @java.lang.Override
8120 public boolean hasChangeset() {
8121 return ((bitField0_ & 0x00000004) != 0);
8122 }
8123 /**
8124 * <code>optional int64 changeset = 3;</code>
8125 * @return The changeset.
8126 */
8127 @java.lang.Override
8128 public long getChangeset() {
8129 return changeset_;
8130 }
8131 /**
8132 * <code>optional int64 changeset = 3;</code>
8133 * @param value The changeset to set.
8134 * @return This builder for chaining.
8135 */
8136 public Builder setChangeset(long value) {
8137 bitField0_ |= 0x00000004;
8138 changeset_ = value;
8139 onChanged();
8140 return this;
8141 }
8142 /**
8143 * <code>optional int64 changeset = 3;</code>
8144 * @return This builder for chaining.
8145 */
8146 public Builder clearChangeset() {
8147 bitField0_ = (bitField0_ & ~0x00000004);
8148 changeset_ = 0L;
8149 onChanged();
8150 return this;
8151 }
8152
8153 private int uid_ ;
8154 /**
8155 * <code>optional int32 uid = 4;</code>
8156 * @return Whether the uid field is set.
8157 */
8158 @java.lang.Override
8159 public boolean hasUid() {
8160 return ((bitField0_ & 0x00000008) != 0);
8161 }
8162 /**
8163 * <code>optional int32 uid = 4;</code>
8164 * @return The uid.
8165 */
8166 @java.lang.Override
8167 public int getUid() {
8168 return uid_;
8169 }
8170 /**
8171 * <code>optional int32 uid = 4;</code>
8172 * @param value The uid to set.
8173 * @return This builder for chaining.
8174 */
8175 public Builder setUid(int value) {
8176 bitField0_ |= 0x00000008;
8177 uid_ = value;
8178 onChanged();
8179 return this;
8180 }
8181 /**
8182 * <code>optional int32 uid = 4;</code>
8183 * @return This builder for chaining.
8184 */
8185 public Builder clearUid() {
8186 bitField0_ = (bitField0_ & ~0x00000008);
8187 uid_ = 0;
8188 onChanged();
8189 return this;
8190 }
8191
8192 private int userSid_ ;
8193 /**
8194 * <pre>
8195 * String IDs
8196 * </pre>
8197 *
8198 * <code>optional uint32 user_sid = 5;</code>
8199 * @return Whether the userSid field is set.
8200 */
8201 @java.lang.Override
8202 public boolean hasUserSid() {
8203 return ((bitField0_ & 0x00000010) != 0);
8204 }
8205 /**
8206 * <pre>
8207 * String IDs
8208 * </pre>
8209 *
8210 * <code>optional uint32 user_sid = 5;</code>
8211 * @return The userSid.
8212 */
8213 @java.lang.Override
8214 public int getUserSid() {
8215 return userSid_;
8216 }
8217 /**
8218 * <pre>
8219 * String IDs
8220 * </pre>
8221 *
8222 * <code>optional uint32 user_sid = 5;</code>
8223 * @param value The userSid to set.
8224 * @return This builder for chaining.
8225 */
8226 public Builder setUserSid(int value) {
8227 bitField0_ |= 0x00000010;
8228 userSid_ = value;
8229 onChanged();
8230 return this;
8231 }
8232 /**
8233 * <pre>
8234 * String IDs
8235 * </pre>
8236 *
8237 * <code>optional uint32 user_sid = 5;</code>
8238 * @return This builder for chaining.
8239 */
8240 public Builder clearUserSid() {
8241 bitField0_ = (bitField0_ & ~0x00000010);
8242 userSid_ = 0;
8243 onChanged();
8244 return this;
8245 }
8246
8247 private boolean visible_ ;
8248 /**
8249 * <pre>
8250 * The visible flag is used to store history information. It indicates that
8251 * the current object version has been created by a delete operation on the
8252 * OSM API.
8253 * When a writer sets this flag, it MUST add a required_features tag with
8254 * value "HistoricalInformation" to the HeaderBlock.
8255 * If this flag is not available for some object it MUST be assumed to be
8256 * true if the file has the required_features tag "HistoricalInformation"
8257 * set.
8258 * </pre>
8259 *
8260 * <code>optional bool visible = 6;</code>
8261 * @return Whether the visible field is set.
8262 */
8263 @java.lang.Override
8264 public boolean hasVisible() {
8265 return ((bitField0_ & 0x00000020) != 0);
8266 }
8267 /**
8268 * <pre>
8269 * The visible flag is used to store history information. It indicates that
8270 * the current object version has been created by a delete operation on the
8271 * OSM API.
8272 * When a writer sets this flag, it MUST add a required_features tag with
8273 * value "HistoricalInformation" to the HeaderBlock.
8274 * If this flag is not available for some object it MUST be assumed to be
8275 * true if the file has the required_features tag "HistoricalInformation"
8276 * set.
8277 * </pre>
8278 *
8279 * <code>optional bool visible = 6;</code>
8280 * @return The visible.
8281 */
8282 @java.lang.Override
8283 public boolean getVisible() {
8284 return visible_;
8285 }
8286 /**
8287 * <pre>
8288 * The visible flag is used to store history information. It indicates that
8289 * the current object version has been created by a delete operation on the
8290 * OSM API.
8291 * When a writer sets this flag, it MUST add a required_features tag with
8292 * value "HistoricalInformation" to the HeaderBlock.
8293 * If this flag is not available for some object it MUST be assumed to be
8294 * true if the file has the required_features tag "HistoricalInformation"
8295 * set.
8296 * </pre>
8297 *
8298 * <code>optional bool visible = 6;</code>
8299 * @param value The visible to set.
8300 * @return This builder for chaining.
8301 */
8302 public Builder setVisible(boolean value) {
8303 bitField0_ |= 0x00000020;
8304 visible_ = value;
8305 onChanged();
8306 return this;
8307 }
8308 /**
8309 * <pre>
8310 * The visible flag is used to store history information. It indicates that
8311 * the current object version has been created by a delete operation on the
8312 * OSM API.
8313 * When a writer sets this flag, it MUST add a required_features tag with
8314 * value "HistoricalInformation" to the HeaderBlock.
8315 * If this flag is not available for some object it MUST be assumed to be
8316 * true if the file has the required_features tag "HistoricalInformation"
8317 * set.
8318 * </pre>
8319 *
8320 * <code>optional bool visible = 6;</code>
8321 * @return This builder for chaining.
8322 */
8323 public Builder clearVisible() {
8324 bitField0_ = (bitField0_ & ~0x00000020);
8325 visible_ = false;
8326 onChanged();
8327 return this;
8328 }
8329 @java.lang.Override
8330 public final Builder setUnknownFields(
8331 final com.google.protobuf.UnknownFieldSet unknownFields) {
8332 return super.setUnknownFields(unknownFields);
8333 }
8334
8335 @java.lang.Override
8336 public final Builder mergeUnknownFields(
8337 final com.google.protobuf.UnknownFieldSet unknownFields) {
8338 return super.mergeUnknownFields(unknownFields);
8339 }
8340
8341
8342 // @@protoc_insertion_point(builder_scope:OSMPBF.Info)
8343 }
8344
8345 // @@protoc_insertion_point(class_scope:OSMPBF.Info)
8346 private static final org.openstreetmap.osmosis.osmbinary.Osmformat.Info DEFAULT_INSTANCE;
8347 static {
8348 DEFAULT_INSTANCE = new org.openstreetmap.osmosis.osmbinary.Osmformat.Info();
8349 }
8350
8351 public static org.openstreetmap.osmosis.osmbinary.Osmformat.Info getDefaultInstance() {
8352 return DEFAULT_INSTANCE;
8353 }
8354
8355 @java.lang.Deprecated public static final com.google.protobuf.Parser<Info>
8356 PARSER = new com.google.protobuf.AbstractParser<Info>() {
8357 @java.lang.Override
8358 public Info parsePartialFrom(
8359 com.google.protobuf.CodedInputStream input,
8360 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
8361 throws com.google.protobuf.InvalidProtocolBufferException {
8362 return new Info(input, extensionRegistry);
8363 }
8364 };
8365
8366 public static com.google.protobuf.Parser<Info> parser() {
8367 return PARSER;
8368 }
8369
8370 @java.lang.Override
8371 public com.google.protobuf.Parser<Info> getParserForType() {
8372 return PARSER;
8373 }
8374
8375 @java.lang.Override
8376 public org.openstreetmap.osmosis.osmbinary.Osmformat.Info getDefaultInstanceForType() {
8377 return DEFAULT_INSTANCE;
8378 }
8379
8380 }
8381
8382 public interface DenseInfoOrBuilder extends
8383 // @@protoc_insertion_point(interface_extends:OSMPBF.DenseInfo)
8384 com.google.protobuf.MessageOrBuilder {
8385
8386 /**
8387 * <code>repeated int32 version = 1 [packed = true];</code>
8388 * @return A list containing the version.
8389 */
8390 java.util.List<java.lang.Integer> getVersionList();
8391 /**
8392 * <code>repeated int32 version = 1 [packed = true];</code>
8393 * @return The count of version.
8394 */
8395 int getVersionCount();
8396 /**
8397 * <code>repeated int32 version = 1 [packed = true];</code>
8398 * @param index The index of the element to return.
8399 * @return The version at the given index.
8400 */
8401 int getVersion(int index);
8402
8403 /**
8404 * <pre>
8405 * DELTA coded
8406 * </pre>
8407 *
8408 * <code>repeated sint64 timestamp = 2 [packed = true];</code>
8409 * @return A list containing the timestamp.
8410 */
8411 java.util.List<java.lang.Long> getTimestampList();
8412 /**
8413 * <pre>
8414 * DELTA coded
8415 * </pre>
8416 *
8417 * <code>repeated sint64 timestamp = 2 [packed = true];</code>
8418 * @return The count of timestamp.
8419 */
8420 int getTimestampCount();
8421 /**
8422 * <pre>
8423 * DELTA coded
8424 * </pre>
8425 *
8426 * <code>repeated sint64 timestamp = 2 [packed = true];</code>
8427 * @param index The index of the element to return.
8428 * @return The timestamp at the given index.
8429 */
8430 long getTimestamp(int index);
8431
8432 /**
8433 * <pre>
8434 * DELTA coded
8435 * </pre>
8436 *
8437 * <code>repeated sint64 changeset = 3 [packed = true];</code>
8438 * @return A list containing the changeset.
8439 */
8440 java.util.List<java.lang.Long> getChangesetList();
8441 /**
8442 * <pre>
8443 * DELTA coded
8444 * </pre>
8445 *
8446 * <code>repeated sint64 changeset = 3 [packed = true];</code>
8447 * @return The count of changeset.
8448 */
8449 int getChangesetCount();
8450 /**
8451 * <pre>
8452 * DELTA coded
8453 * </pre>
8454 *
8455 * <code>repeated sint64 changeset = 3 [packed = true];</code>
8456 * @param index The index of the element to return.
8457 * @return The changeset at the given index.
8458 */
8459 long getChangeset(int index);
8460
8461 /**
8462 * <pre>
8463 * DELTA coded
8464 * </pre>
8465 *
8466 * <code>repeated sint32 uid = 4 [packed = true];</code>
8467 * @return A list containing the uid.
8468 */
8469 java.util.List<java.lang.Integer> getUidList();
8470 /**
8471 * <pre>
8472 * DELTA coded
8473 * </pre>
8474 *
8475 * <code>repeated sint32 uid = 4 [packed = true];</code>
8476 * @return The count of uid.
8477 */
8478 int getUidCount();
8479 /**
8480 * <pre>
8481 * DELTA coded
8482 * </pre>
8483 *
8484 * <code>repeated sint32 uid = 4 [packed = true];</code>
8485 * @param index The index of the element to return.
8486 * @return The uid at the given index.
8487 */
8488 int getUid(int index);
8489
8490 /**
8491 * <pre>
8492 * String IDs for usernames. DELTA coded
8493 * </pre>
8494 *
8495 * <code>repeated sint32 user_sid = 5 [packed = true];</code>
8496 * @return A list containing the userSid.
8497 */
8498 java.util.List<java.lang.Integer> getUserSidList();
8499 /**
8500 * <pre>
8501 * String IDs for usernames. DELTA coded
8502 * </pre>
8503 *
8504 * <code>repeated sint32 user_sid = 5 [packed = true];</code>
8505 * @return The count of userSid.
8506 */
8507 int getUserSidCount();
8508 /**
8509 * <pre>
8510 * String IDs for usernames. DELTA coded
8511 * </pre>
8512 *
8513 * <code>repeated sint32 user_sid = 5 [packed = true];</code>
8514 * @param index The index of the element to return.
8515 * @return The userSid at the given index.
8516 */
8517 int getUserSid(int index);
8518
8519 /**
8520 * <pre>
8521 * The visible flag is used to store history information. It indicates that
8522 * the current object version has been created by a delete operation on the
8523 * OSM API.
8524 * When a writer sets this flag, it MUST add a required_features tag with
8525 * value "HistoricalInformation" to the HeaderBlock.
8526 * If this flag is not available for some object it MUST be assumed to be
8527 * true if the file has the required_features tag "HistoricalInformation"
8528 * set.
8529 * </pre>
8530 *
8531 * <code>repeated bool visible = 6 [packed = true];</code>
8532 * @return A list containing the visible.
8533 */
8534 java.util.List<java.lang.Boolean> getVisibleList();
8535 /**
8536 * <pre>
8537 * The visible flag is used to store history information. It indicates that
8538 * the current object version has been created by a delete operation on the
8539 * OSM API.
8540 * When a writer sets this flag, it MUST add a required_features tag with
8541 * value "HistoricalInformation" to the HeaderBlock.
8542 * If this flag is not available for some object it MUST be assumed to be
8543 * true if the file has the required_features tag "HistoricalInformation"
8544 * set.
8545 * </pre>
8546 *
8547 * <code>repeated bool visible = 6 [packed = true];</code>
8548 * @return The count of visible.
8549 */
8550 int getVisibleCount();
8551 /**
8552 * <pre>
8553 * The visible flag is used to store history information. It indicates that
8554 * the current object version has been created by a delete operation on the
8555 * OSM API.
8556 * When a writer sets this flag, it MUST add a required_features tag with
8557 * value "HistoricalInformation" to the HeaderBlock.
8558 * If this flag is not available for some object it MUST be assumed to be
8559 * true if the file has the required_features tag "HistoricalInformation"
8560 * set.
8561 * </pre>
8562 *
8563 * <code>repeated bool visible = 6 [packed = true];</code>
8564 * @param index The index of the element to return.
8565 * @return The visible at the given index.
8566 */
8567 boolean getVisible(int index);
8568 }
8569 /**
8570 * <pre>
8571 ** Optional metadata that may be included into each primitive. Special dense format used in DenseNodes.
8572 * </pre>
8573 *
8574 * Protobuf type {@code OSMPBF.DenseInfo}
8575 */
8576 public static final class DenseInfo extends
8577 com.google.protobuf.GeneratedMessageV3 implements
8578 // @@protoc_insertion_point(message_implements:OSMPBF.DenseInfo)
8579 DenseInfoOrBuilder {
8580 private static final long serialVersionUID = 0L;
8581 // Use DenseInfo.newBuilder() to construct.
8582 private DenseInfo(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
8583 super(builder);
8584 }
8585 private DenseInfo() {
8586 version_ = emptyIntList();
8587 timestamp_ = emptyLongList();
8588 changeset_ = emptyLongList();
8589 uid_ = emptyIntList();
8590 userSid_ = emptyIntList();
8591 visible_ = emptyBooleanList();
8592 }
8593
8594 @java.lang.Override
8595 @SuppressWarnings({"unused"})
8596 protected java.lang.Object newInstance(
8597 UnusedPrivateParameter unused) {
8598 return new DenseInfo();
8599 }
8600
8601 @java.lang.Override
8602 public final com.google.protobuf.UnknownFieldSet
8603 getUnknownFields() {
8604 return this.unknownFields;
8605 }
8606 private DenseInfo(
8607 com.google.protobuf.CodedInputStream input,
8608 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
8609 throws com.google.protobuf.InvalidProtocolBufferException {
8610 this();
8611 if (extensionRegistry == null) {
8612 throw new java.lang.NullPointerException();
8613 }
8614 int mutable_bitField0_ = 0;
8615 com.google.protobuf.UnknownFieldSet.Builder unknownFields =
8616 com.google.protobuf.UnknownFieldSet.newBuilder();
8617 try {
8618 boolean done = false;
8619 while (!done) {
8620 int tag = input.readTag();
8621 switch (tag) {
8622 case 0:
8623 done = true;
8624 break;
8625 case 8: {
8626 if (!((mutable_bitField0_ & 0x00000001) != 0)) {
8627 version_ = newIntList();
8628 mutable_bitField0_ |= 0x00000001;
8629 }
8630 version_.addInt(input.readInt32());
8631 break;
8632 }
8633 case 10: {
8634 int length = input.readRawVarint32();
8635 int limit = input.pushLimit(length);
8636 if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) {
8637 version_ = newIntList();
8638 mutable_bitField0_ |= 0x00000001;
8639 }
8640 while (input.getBytesUntilLimit() > 0) {
8641 version_.addInt(input.readInt32());
8642 }
8643 input.popLimit(limit);
8644 break;
8645 }
8646 case 16: {
8647 if (!((mutable_bitField0_ & 0x00000002) != 0)) {
8648 timestamp_ = newLongList();
8649 mutable_bitField0_ |= 0x00000002;
8650 }
8651 timestamp_.addLong(input.readSInt64());
8652 break;
8653 }
8654 case 18: {
8655 int length = input.readRawVarint32();
8656 int limit = input.pushLimit(length);
8657 if (!((mutable_bitField0_ & 0x00000002) != 0) && input.getBytesUntilLimit() > 0) {
8658 timestamp_ = newLongList();
8659 mutable_bitField0_ |= 0x00000002;
8660 }
8661 while (input.getBytesUntilLimit() > 0) {
8662 timestamp_.addLong(input.readSInt64());
8663 }
8664 input.popLimit(limit);
8665 break;
8666 }
8667 case 24: {
8668 if (!((mutable_bitField0_ & 0x00000004) != 0)) {
8669 changeset_ = newLongList();
8670 mutable_bitField0_ |= 0x00000004;
8671 }
8672 changeset_.addLong(input.readSInt64());
8673 break;
8674 }
8675 case 26: {
8676 int length = input.readRawVarint32();
8677 int limit = input.pushLimit(length);
8678 if (!((mutable_bitField0_ & 0x00000004) != 0) && input.getBytesUntilLimit() > 0) {
8679 changeset_ = newLongList();
8680 mutable_bitField0_ |= 0x00000004;
8681 }
8682 while (input.getBytesUntilLimit() > 0) {
8683 changeset_.addLong(input.readSInt64());
8684 }
8685 input.popLimit(limit);
8686 break;
8687 }
8688 case 32: {
8689 if (!((mutable_bitField0_ & 0x00000008) != 0)) {
8690 uid_ = newIntList();
8691 mutable_bitField0_ |= 0x00000008;
8692 }
8693 uid_.addInt(input.readSInt32());
8694 break;
8695 }
8696 case 34: {
8697 int length = input.readRawVarint32();
8698 int limit = input.pushLimit(length);
8699 if (!((mutable_bitField0_ & 0x00000008) != 0) && input.getBytesUntilLimit() > 0) {
8700 uid_ = newIntList();
8701 mutable_bitField0_ |= 0x00000008;
8702 }
8703 while (input.getBytesUntilLimit() > 0) {
8704 uid_.addInt(input.readSInt32());
8705 }
8706 input.popLimit(limit);
8707 break;
8708 }
8709 case 40: {
8710 if (!((mutable_bitField0_ & 0x00000010) != 0)) {
8711 userSid_ = newIntList();
8712 mutable_bitField0_ |= 0x00000010;
8713 }
8714 userSid_.addInt(input.readSInt32());
8715 break;
8716 }
8717 case 42: {
8718 int length = input.readRawVarint32();
8719 int limit = input.pushLimit(length);
8720 if (!((mutable_bitField0_ & 0x00000010) != 0) && input.getBytesUntilLimit() > 0) {
8721 userSid_ = newIntList();
8722 mutable_bitField0_ |= 0x00000010;
8723 }
8724 while (input.getBytesUntilLimit() > 0) {
8725 userSid_.addInt(input.readSInt32());
8726 }
8727 input.popLimit(limit);
8728 break;
8729 }
8730 case 48: {
8731 if (!((mutable_bitField0_ & 0x00000020) != 0)) {
8732 visible_ = newBooleanList();
8733 mutable_bitField0_ |= 0x00000020;
8734 }
8735 visible_.addBoolean(input.readBool());
8736 break;
8737 }
8738 case 50: {
8739 int length = input.readRawVarint32();
8740 int limit = input.pushLimit(length);
8741 if (!((mutable_bitField0_ & 0x00000020) != 0) && input.getBytesUntilLimit() > 0) {
8742 visible_ = newBooleanList();
8743 mutable_bitField0_ |= 0x00000020;
8744 }
8745 while (input.getBytesUntilLimit() > 0) {
8746 visible_.addBoolean(input.readBool());
8747 }
8748 input.popLimit(limit);
8749 break;
8750 }
8751 default: {
8752 if (!parseUnknownField(
8753 input, unknownFields, extensionRegistry, tag)) {
8754 done = true;
8755 }
8756 break;
8757 }
8758 }
8759 }
8760 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
8761 throw e.setUnfinishedMessage(this);
8762 } catch (java.io.IOException e) {
8763 throw new com.google.protobuf.InvalidProtocolBufferException(
8764 e).setUnfinishedMessage(this);
8765 } finally {
8766 if (((mutable_bitField0_ & 0x00000001) != 0)) {
8767 version_.makeImmutable(); // C
8768 }
8769 if (((mutable_bitField0_ & 0x00000002) != 0)) {
8770 timestamp_.makeImmutable(); // C
8771 }
8772 if (((mutable_bitField0_ & 0x00000004) != 0)) {
8773 changeset_.makeImmutable(); // C
8774 }
8775 if (((mutable_bitField0_ & 0x00000008) != 0)) {
8776 uid_.makeImmutable(); // C
8777 }
8778 if (((mutable_bitField0_ & 0x00000010) != 0)) {
8779 userSid_.makeImmutable(); // C
8780 }
8781 if (((mutable_bitField0_ & 0x00000020) != 0)) {
8782 visible_.makeImmutable(); // C
8783 }
8784 this.unknownFields = unknownFields.build();
8785 makeExtensionsImmutable();
8786 }
8787 }
8788 public static final com.google.protobuf.Descriptors.Descriptor
8789 getDescriptor() {
8790 return org.openstreetmap.osmosis.osmbinary.Osmformat.internal_static_OSMPBF_DenseInfo_descriptor;
8791 }
8792
8793 @java.lang.Override
8794 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
8795 internalGetFieldAccessorTable() {
8796 return org.openstreetmap.osmosis.osmbinary.Osmformat.internal_static_OSMPBF_DenseInfo_fieldAccessorTable
8797 .ensureFieldAccessorsInitialized(
8798 org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo.class, org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo.Builder.class);
8799 }
8800
8801 public static final int VERSION_FIELD_NUMBER = 1;
8802 private com.google.protobuf.Internal.IntList version_;
8803 /**
8804 * <code>repeated int32 version = 1 [packed = true];</code>
8805 * @return A list containing the version.
8806 */
8807 @java.lang.Override
8808 public java.util.List<java.lang.Integer>
8809 getVersionList() {
8810 return version_;
8811 }
8812 /**
8813 * <code>repeated int32 version = 1 [packed = true];</code>
8814 * @return The count of version.
8815 */
8816 public int getVersionCount() {
8817 return version_.size();
8818 }
8819 /**
8820 * <code>repeated int32 version = 1 [packed = true];</code>
8821 * @param index The index of the element to return.
8822 * @return The version at the given index.
8823 */
8824 public int getVersion(int index) {
8825 return version_.getInt(index);
8826 }
8827 private int versionMemoizedSerializedSize = -1;
8828
8829 public static final int TIMESTAMP_FIELD_NUMBER = 2;
8830 private com.google.protobuf.Internal.LongList timestamp_;
8831 /**
8832 * <pre>
8833 * DELTA coded
8834 * </pre>
8835 *
8836 * <code>repeated sint64 timestamp = 2 [packed = true];</code>
8837 * @return A list containing the timestamp.
8838 */
8839 @java.lang.Override
8840 public java.util.List<java.lang.Long>
8841 getTimestampList() {
8842 return timestamp_;
8843 }
8844 /**
8845 * <pre>
8846 * DELTA coded
8847 * </pre>
8848 *
8849 * <code>repeated sint64 timestamp = 2 [packed = true];</code>
8850 * @return The count of timestamp.
8851 */
8852 public int getTimestampCount() {
8853 return timestamp_.size();
8854 }
8855 /**
8856 * <pre>
8857 * DELTA coded
8858 * </pre>
8859 *
8860 * <code>repeated sint64 timestamp = 2 [packed = true];</code>
8861 * @param index The index of the element to return.
8862 * @return The timestamp at the given index.
8863 */
8864 public long getTimestamp(int index) {
8865 return timestamp_.getLong(index);
8866 }
8867 private int timestampMemoizedSerializedSize = -1;
8868
8869 public static final int CHANGESET_FIELD_NUMBER = 3;
8870 private com.google.protobuf.Internal.LongList changeset_;
8871 /**
8872 * <pre>
8873 * DELTA coded
8874 * </pre>
8875 *
8876 * <code>repeated sint64 changeset = 3 [packed = true];</code>
8877 * @return A list containing the changeset.
8878 */
8879 @java.lang.Override
8880 public java.util.List<java.lang.Long>
8881 getChangesetList() {
8882 return changeset_;
8883 }
8884 /**
8885 * <pre>
8886 * DELTA coded
8887 * </pre>
8888 *
8889 * <code>repeated sint64 changeset = 3 [packed = true];</code>
8890 * @return The count of changeset.
8891 */
8892 public int getChangesetCount() {
8893 return changeset_.size();
8894 }
8895 /**
8896 * <pre>
8897 * DELTA coded
8898 * </pre>
8899 *
8900 * <code>repeated sint64 changeset = 3 [packed = true];</code>
8901 * @param index The index of the element to return.
8902 * @return The changeset at the given index.
8903 */
8904 public long getChangeset(int index) {
8905 return changeset_.getLong(index);
8906 }
8907 private int changesetMemoizedSerializedSize = -1;
8908
8909 public static final int UID_FIELD_NUMBER = 4;
8910 private com.google.protobuf.Internal.IntList uid_;
8911 /**
8912 * <pre>
8913 * DELTA coded
8914 * </pre>
8915 *
8916 * <code>repeated sint32 uid = 4 [packed = true];</code>
8917 * @return A list containing the uid.
8918 */
8919 @java.lang.Override
8920 public java.util.List<java.lang.Integer>
8921 getUidList() {
8922 return uid_;
8923 }
8924 /**
8925 * <pre>
8926 * DELTA coded
8927 * </pre>
8928 *
8929 * <code>repeated sint32 uid = 4 [packed = true];</code>
8930 * @return The count of uid.
8931 */
8932 public int getUidCount() {
8933 return uid_.size();
8934 }
8935 /**
8936 * <pre>
8937 * DELTA coded
8938 * </pre>
8939 *
8940 * <code>repeated sint32 uid = 4 [packed = true];</code>
8941 * @param index The index of the element to return.
8942 * @return The uid at the given index.
8943 */
8944 public int getUid(int index) {
8945 return uid_.getInt(index);
8946 }
8947 private int uidMemoizedSerializedSize = -1;
8948
8949 public static final int USER_SID_FIELD_NUMBER = 5;
8950 private com.google.protobuf.Internal.IntList userSid_;
8951 /**
8952 * <pre>
8953 * String IDs for usernames. DELTA coded
8954 * </pre>
8955 *
8956 * <code>repeated sint32 user_sid = 5 [packed = true];</code>
8957 * @return A list containing the userSid.
8958 */
8959 @java.lang.Override
8960 public java.util.List<java.lang.Integer>
8961 getUserSidList() {
8962 return userSid_;
8963 }
8964 /**
8965 * <pre>
8966 * String IDs for usernames. DELTA coded
8967 * </pre>
8968 *
8969 * <code>repeated sint32 user_sid = 5 [packed = true];</code>
8970 * @return The count of userSid.
8971 */
8972 public int getUserSidCount() {
8973 return userSid_.size();
8974 }
8975 /**
8976 * <pre>
8977 * String IDs for usernames. DELTA coded
8978 * </pre>
8979 *
8980 * <code>repeated sint32 user_sid = 5 [packed = true];</code>
8981 * @param index The index of the element to return.
8982 * @return The userSid at the given index.
8983 */
8984 public int getUserSid(int index) {
8985 return userSid_.getInt(index);
8986 }
8987 private int userSidMemoizedSerializedSize = -1;
8988
8989 public static final int VISIBLE_FIELD_NUMBER = 6;
8990 private com.google.protobuf.Internal.BooleanList visible_;
8991 /**
8992 * <pre>
8993 * The visible flag is used to store history information. It indicates that
8994 * the current object version has been created by a delete operation on the
8995 * OSM API.
8996 * When a writer sets this flag, it MUST add a required_features tag with
8997 * value "HistoricalInformation" to the HeaderBlock.
8998 * If this flag is not available for some object it MUST be assumed to be
8999 * true if the file has the required_features tag "HistoricalInformation"
9000 * set.
9001 * </pre>
9002 *
9003 * <code>repeated bool visible = 6 [packed = true];</code>
9004 * @return A list containing the visible.
9005 */
9006 @java.lang.Override
9007 public java.util.List<java.lang.Boolean>
9008 getVisibleList() {
9009 return visible_;
9010 }
9011 /**
9012 * <pre>
9013 * The visible flag is used to store history information. It indicates that
9014 * the current object version has been created by a delete operation on the
9015 * OSM API.
9016 * When a writer sets this flag, it MUST add a required_features tag with
9017 * value "HistoricalInformation" to the HeaderBlock.
9018 * If this flag is not available for some object it MUST be assumed to be
9019 * true if the file has the required_features tag "HistoricalInformation"
9020 * set.
9021 * </pre>
9022 *
9023 * <code>repeated bool visible = 6 [packed = true];</code>
9024 * @return The count of visible.
9025 */
9026 public int getVisibleCount() {
9027 return visible_.size();
9028 }
9029 /**
9030 * <pre>
9031 * The visible flag is used to store history information. It indicates that
9032 * the current object version has been created by a delete operation on the
9033 * OSM API.
9034 * When a writer sets this flag, it MUST add a required_features tag with
9035 * value "HistoricalInformation" to the HeaderBlock.
9036 * If this flag is not available for some object it MUST be assumed to be
9037 * true if the file has the required_features tag "HistoricalInformation"
9038 * set.
9039 * </pre>
9040 *
9041 * <code>repeated bool visible = 6 [packed = true];</code>
9042 * @param index The index of the element to return.
9043 * @return The visible at the given index.
9044 */
9045 public boolean getVisible(int index) {
9046 return visible_.getBoolean(index);
9047 }
9048 private int visibleMemoizedSerializedSize = -1;
9049
9050 private byte memoizedIsInitialized = -1;
9051 @java.lang.Override
9052 public final boolean isInitialized() {
9053 byte isInitialized = memoizedIsInitialized;
9054 if (isInitialized == 1) return true;
9055 if (isInitialized == 0) return false;
9056
9057 memoizedIsInitialized = 1;
9058 return true;
9059 }
9060
9061 @java.lang.Override
9062 public void writeTo(com.google.protobuf.CodedOutputStream output)
9063 throws java.io.IOException {
9064 getSerializedSize();
9065 if (getVersionList().size() > 0) {
9066 output.writeUInt32NoTag(10);
9067 output.writeUInt32NoTag(versionMemoizedSerializedSize);
9068 }
9069 for (int i = 0; i < version_.size(); i++) {
9070 output.writeInt32NoTag(version_.getInt(i));
9071 }
9072 if (getTimestampList().size() > 0) {
9073 output.writeUInt32NoTag(18);
9074 output.writeUInt32NoTag(timestampMemoizedSerializedSize);
9075 }
9076 for (int i = 0; i < timestamp_.size(); i++) {
9077 output.writeSInt64NoTag(timestamp_.getLong(i));
9078 }
9079 if (getChangesetList().size() > 0) {
9080 output.writeUInt32NoTag(26);
9081 output.writeUInt32NoTag(changesetMemoizedSerializedSize);
9082 }
9083 for (int i = 0; i < changeset_.size(); i++) {
9084 output.writeSInt64NoTag(changeset_.getLong(i));
9085 }
9086 if (getUidList().size() > 0) {
9087 output.writeUInt32NoTag(34);
9088 output.writeUInt32NoTag(uidMemoizedSerializedSize);
9089 }
9090 for (int i = 0; i < uid_.size(); i++) {
9091 output.writeSInt32NoTag(uid_.getInt(i));
9092 }
9093 if (getUserSidList().size() > 0) {
9094 output.writeUInt32NoTag(42);
9095 output.writeUInt32NoTag(userSidMemoizedSerializedSize);
9096 }
9097 for (int i = 0; i < userSid_.size(); i++) {
9098 output.writeSInt32NoTag(userSid_.getInt(i));
9099 }
9100 if (getVisibleList().size() > 0) {
9101 output.writeUInt32NoTag(50);
9102 output.writeUInt32NoTag(visibleMemoizedSerializedSize);
9103 }
9104 for (int i = 0; i < visible_.size(); i++) {
9105 output.writeBoolNoTag(visible_.getBoolean(i));
9106 }
9107 unknownFields.writeTo(output);
9108 }
9109
9110 @java.lang.Override
9111 public int getSerializedSize() {
9112 int size = memoizedSize;
9113 if (size != -1) return size;
9114
9115 size = 0;
9116 {
9117 int dataSize = 0;
9118 for (int i = 0; i < version_.size(); i++) {
9119 dataSize += com.google.protobuf.CodedOutputStream
9120 .computeInt32SizeNoTag(version_.getInt(i));
9121 }
9122 size += dataSize;
9123 if (!getVersionList().isEmpty()) {
9124 size += 1;
9125 size += com.google.protobuf.CodedOutputStream
9126 .computeInt32SizeNoTag(dataSize);
9127 }
9128 versionMemoizedSerializedSize = dataSize;
9129 }
9130 {
9131 int dataSize = 0;
9132 for (int i = 0; i < timestamp_.size(); i++) {
9133 dataSize += com.google.protobuf.CodedOutputStream
9134 .computeSInt64SizeNoTag(timestamp_.getLong(i));
9135 }
9136 size += dataSize;
9137 if (!getTimestampList().isEmpty()) {
9138 size += 1;
9139 size += com.google.protobuf.CodedOutputStream
9140 .computeInt32SizeNoTag(dataSize);
9141 }
9142 timestampMemoizedSerializedSize = dataSize;
9143 }
9144 {
9145 int dataSize = 0;
9146 for (int i = 0; i < changeset_.size(); i++) {
9147 dataSize += com.google.protobuf.CodedOutputStream
9148 .computeSInt64SizeNoTag(changeset_.getLong(i));
9149 }
9150 size += dataSize;
9151 if (!getChangesetList().isEmpty()) {
9152 size += 1;
9153 size += com.google.protobuf.CodedOutputStream
9154 .computeInt32SizeNoTag(dataSize);
9155 }
9156 changesetMemoizedSerializedSize = dataSize;
9157 }
9158 {
9159 int dataSize = 0;
9160 for (int i = 0; i < uid_.size(); i++) {
9161 dataSize += com.google.protobuf.CodedOutputStream
9162 .computeSInt32SizeNoTag(uid_.getInt(i));
9163 }
9164 size += dataSize;
9165 if (!getUidList().isEmpty()) {
9166 size += 1;
9167 size += com.google.protobuf.CodedOutputStream
9168 .computeInt32SizeNoTag(dataSize);
9169 }
9170 uidMemoizedSerializedSize = dataSize;
9171 }
9172 {
9173 int dataSize = 0;
9174 for (int i = 0; i < userSid_.size(); i++) {
9175 dataSize += com.google.protobuf.CodedOutputStream
9176 .computeSInt32SizeNoTag(userSid_.getInt(i));
9177 }
9178 size += dataSize;
9179 if (!getUserSidList().isEmpty()) {
9180 size += 1;
9181 size += com.google.protobuf.CodedOutputStream
9182 .computeInt32SizeNoTag(dataSize);
9183 }
9184 userSidMemoizedSerializedSize = dataSize;
9185 }
9186 {
9187 int dataSize = 0;
9188 dataSize = 1 * getVisibleList().size();
9189 size += dataSize;
9190 if (!getVisibleList().isEmpty()) {
9191 size += 1;
9192 size += com.google.protobuf.CodedOutputStream
9193 .computeInt32SizeNoTag(dataSize);
9194 }
9195 visibleMemoizedSerializedSize = dataSize;
9196 }
9197 size += unknownFields.getSerializedSize();
9198 memoizedSize = size;
9199 return size;
9200 }
9201
9202 @java.lang.Override
9203 public boolean equals(final java.lang.Object obj) {
9204 if (obj == this) {
9205 return true;
9206 }
9207 if (!(obj instanceof org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo)) {
9208 return super.equals(obj);
9209 }
9210 org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo other = (org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo) obj;
9211
9212 if (!getVersionList()
9213 .equals(other.getVersionList())) return false;
9214 if (!getTimestampList()
9215 .equals(other.getTimestampList())) return false;
9216 if (!getChangesetList()
9217 .equals(other.getChangesetList())) return false;
9218 if (!getUidList()
9219 .equals(other.getUidList())) return false;
9220 if (!getUserSidList()
9221 .equals(other.getUserSidList())) return false;
9222 if (!getVisibleList()
9223 .equals(other.getVisibleList())) return false;
9224 if (!unknownFields.equals(other.unknownFields)) return false;
9225 return true;
9226 }
9227
9228 @java.lang.Override
9229 public int hashCode() {
9230 if (memoizedHashCode != 0) {
9231 return memoizedHashCode;
9232 }
9233 int hash = 41;
9234 hash = (19 * hash) + getDescriptor().hashCode();
9235 if (getVersionCount() > 0) {
9236 hash = (37 * hash) + VERSION_FIELD_NUMBER;
9237 hash = (53 * hash) + getVersionList().hashCode();
9238 }
9239 if (getTimestampCount() > 0) {
9240 hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER;
9241 hash = (53 * hash) + getTimestampList().hashCode();
9242 }
9243 if (getChangesetCount() > 0) {
9244 hash = (37 * hash) + CHANGESET_FIELD_NUMBER;
9245 hash = (53 * hash) + getChangesetList().hashCode();
9246 }
9247 if (getUidCount() > 0) {
9248 hash = (37 * hash) + UID_FIELD_NUMBER;
9249 hash = (53 * hash) + getUidList().hashCode();
9250 }
9251 if (getUserSidCount() > 0) {
9252 hash = (37 * hash) + USER_SID_FIELD_NUMBER;
9253 hash = (53 * hash) + getUserSidList().hashCode();
9254 }
9255 if (getVisibleCount() > 0) {
9256 hash = (37 * hash) + VISIBLE_FIELD_NUMBER;
9257 hash = (53 * hash) + getVisibleList().hashCode();
9258 }
9259 hash = (29 * hash) + unknownFields.hashCode();
9260 memoizedHashCode = hash;
9261 return hash;
9262 }
9263
9264 public static org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo parseFrom(
9265 java.nio.ByteBuffer data)
9266 throws com.google.protobuf.InvalidProtocolBufferException {
9267 return PARSER.parseFrom(data);
9268 }
9269 public static org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo parseFrom(
9270 java.nio.ByteBuffer data,
9271 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
9272 throws com.google.protobuf.InvalidProtocolBufferException {
9273 return PARSER.parseFrom(data, extensionRegistry);
9274 }
9275 public static org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo parseFrom(
9276 com.google.protobuf.ByteString data)
9277 throws com.google.protobuf.InvalidProtocolBufferException {
9278 return PARSER.parseFrom(data);
9279 }
9280 public static org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo parseFrom(
9281 com.google.protobuf.ByteString data,
9282 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
9283 throws com.google.protobuf.InvalidProtocolBufferException {
9284 return PARSER.parseFrom(data, extensionRegistry);
9285 }
9286 public static org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo parseFrom(byte[] data)
9287 throws com.google.protobuf.InvalidProtocolBufferException {
9288 return PARSER.parseFrom(data);
9289 }
9290 public static org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo parseFrom(
9291 byte[] data,
9292 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
9293 throws com.google.protobuf.InvalidProtocolBufferException {
9294 return PARSER.parseFrom(data, extensionRegistry);
9295 }
9296 public static org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo parseFrom(java.io.InputStream input)
9297 throws java.io.IOException {
9298 return com.google.protobuf.GeneratedMessageV3
9299 .parseWithIOException(PARSER, input);
9300 }
9301 public static org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo parseFrom(
9302 java.io.InputStream input,
9303 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
9304 throws java.io.IOException {
9305 return com.google.protobuf.GeneratedMessageV3
9306 .parseWithIOException(PARSER, input, extensionRegistry);
9307 }
9308 public static org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo parseDelimitedFrom(java.io.InputStream input)
9309 throws java.io.IOException {
9310 return com.google.protobuf.GeneratedMessageV3
9311 .parseDelimitedWithIOException(PARSER, input);
9312 }
9313 public static org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo parseDelimitedFrom(
9314 java.io.InputStream input,
9315 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
9316 throws java.io.IOException {
9317 return com.google.protobuf.GeneratedMessageV3
9318 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
9319 }
9320 public static org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo parseFrom(
9321 com.google.protobuf.CodedInputStream input)
9322 throws java.io.IOException {
9323 return com.google.protobuf.GeneratedMessageV3
9324 .parseWithIOException(PARSER, input);
9325 }
9326 public static org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo parseFrom(
9327 com.google.protobuf.CodedInputStream input,
9328 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
9329 throws java.io.IOException {
9330 return com.google.protobuf.GeneratedMessageV3
9331 .parseWithIOException(PARSER, input, extensionRegistry);
9332 }
9333
9334 @java.lang.Override
9335 public Builder newBuilderForType() { return newBuilder(); }
9336 public static Builder newBuilder() {
9337 return DEFAULT_INSTANCE.toBuilder();
9338 }
9339 public static Builder newBuilder(org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo prototype) {
9340 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
9341 }
9342 @java.lang.Override
9343 public Builder toBuilder() {
9344 return this == DEFAULT_INSTANCE
9345 ? new Builder() : new Builder().mergeFrom(this);
9346 }
9347
9348 @java.lang.Override
9349 protected Builder newBuilderForType(
9350 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
9351 Builder builder = new Builder(parent);
9352 return builder;
9353 }
9354 /**
9355 * <pre>
9356 ** Optional metadata that may be included into each primitive. Special dense format used in DenseNodes.
9357 * </pre>
9358 *
9359 * Protobuf type {@code OSMPBF.DenseInfo}
9360 */
9361 public static final class Builder extends
9362 com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
9363 // @@protoc_insertion_point(builder_implements:OSMPBF.DenseInfo)
9364 org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfoOrBuilder {
9365 public static final com.google.protobuf.Descriptors.Descriptor
9366 getDescriptor() {
9367 return org.openstreetmap.osmosis.osmbinary.Osmformat.internal_static_OSMPBF_DenseInfo_descriptor;
9368 }
9369
9370 @java.lang.Override
9371 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
9372 internalGetFieldAccessorTable() {
9373 return org.openstreetmap.osmosis.osmbinary.Osmformat.internal_static_OSMPBF_DenseInfo_fieldAccessorTable
9374 .ensureFieldAccessorsInitialized(
9375 org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo.class, org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo.Builder.class);
9376 }
9377
9378 // Construct using org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo.newBuilder()
9379 private Builder() {
9380 maybeForceBuilderInitialization();
9381 }
9382
9383 private Builder(
9384 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
9385 super(parent);
9386 maybeForceBuilderInitialization();
9387 }
9388 private void maybeForceBuilderInitialization() {
9389 if (com.google.protobuf.GeneratedMessageV3
9390 .alwaysUseFieldBuilders) {
9391 }
9392 }
9393 @java.lang.Override
9394 public Builder clear() {
9395 super.clear();
9396 version_ = emptyIntList();
9397 bitField0_ = (bitField0_ & ~0x00000001);
9398 timestamp_ = emptyLongList();
9399 bitField0_ = (bitField0_ & ~0x00000002);
9400 changeset_ = emptyLongList();
9401 bitField0_ = (bitField0_ & ~0x00000004);
9402 uid_ = emptyIntList();
9403 bitField0_ = (bitField0_ & ~0x00000008);
9404 userSid_ = emptyIntList();
9405 bitField0_ = (bitField0_ & ~0x00000010);
9406 visible_ = emptyBooleanList();
9407 bitField0_ = (bitField0_ & ~0x00000020);
9408 return this;
9409 }
9410
9411 @java.lang.Override
9412 public com.google.protobuf.Descriptors.Descriptor
9413 getDescriptorForType() {
9414 return org.openstreetmap.osmosis.osmbinary.Osmformat.internal_static_OSMPBF_DenseInfo_descriptor;
9415 }
9416
9417 @java.lang.Override
9418 public org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo getDefaultInstanceForType() {
9419 return org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo.getDefaultInstance();
9420 }
9421
9422 @java.lang.Override
9423 public org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo build() {
9424 org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo result = buildPartial();
9425 if (!result.isInitialized()) {
9426 throw newUninitializedMessageException(result);
9427 }
9428 return result;
9429 }
9430
9431 @java.lang.Override
9432 public org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo buildPartial() {
9433 org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo result = new org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo(this);
9434 int from_bitField0_ = bitField0_;
9435 if (((bitField0_ & 0x00000001) != 0)) {
9436 version_.makeImmutable();
9437 bitField0_ = (bitField0_ & ~0x00000001);
9438 }
9439 result.version_ = version_;
9440 if (((bitField0_ & 0x00000002) != 0)) {
9441 timestamp_.makeImmutable();
9442 bitField0_ = (bitField0_ & ~0x00000002);
9443 }
9444 result.timestamp_ = timestamp_;
9445 if (((bitField0_ & 0x00000004) != 0)) {
9446 changeset_.makeImmutable();
9447 bitField0_ = (bitField0_ & ~0x00000004);
9448 }
9449 result.changeset_ = changeset_;
9450 if (((bitField0_ & 0x00000008) != 0)) {
9451 uid_.makeImmutable();
9452 bitField0_ = (bitField0_ & ~0x00000008);
9453 }
9454 result.uid_ = uid_;
9455 if (((bitField0_ & 0x00000010) != 0)) {
9456 userSid_.makeImmutable();
9457 bitField0_ = (bitField0_ & ~0x00000010);
9458 }
9459 result.userSid_ = userSid_;
9460 if (((bitField0_ & 0x00000020) != 0)) {
9461 visible_.makeImmutable();
9462 bitField0_ = (bitField0_ & ~0x00000020);
9463 }
9464 result.visible_ = visible_;
9465 onBuilt();
9466 return result;
9467 }
9468
9469 @java.lang.Override
9470 public Builder clone() {
9471 return super.clone();
9472 }
9473 @java.lang.Override
9474 public Builder setField(
9475 com.google.protobuf.Descriptors.FieldDescriptor field,
9476 java.lang.Object value) {
9477 return super.setField(field, value);
9478 }
9479 @java.lang.Override
9480 public Builder clearField(
9481 com.google.protobuf.Descriptors.FieldDescriptor field) {
9482 return super.clearField(field);
9483 }
9484 @java.lang.Override
9485 public Builder clearOneof(
9486 com.google.protobuf.Descriptors.OneofDescriptor oneof) {
9487 return super.clearOneof(oneof);
9488 }
9489 @java.lang.Override
9490 public Builder setRepeatedField(
9491 com.google.protobuf.Descriptors.FieldDescriptor field,
9492 int index, java.lang.Object value) {
9493 return super.setRepeatedField(field, index, value);
9494 }
9495 @java.lang.Override
9496 public Builder addRepeatedField(
9497 com.google.protobuf.Descriptors.FieldDescriptor field,
9498 java.lang.Object value) {
9499 return super.addRepeatedField(field, value);
9500 }
9501 @java.lang.Override
9502 public Builder mergeFrom(com.google.protobuf.Message other) {
9503 if (other instanceof org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo) {
9504 return mergeFrom((org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo)other);
9505 } else {
9506 super.mergeFrom(other);
9507 return this;
9508 }
9509 }
9510
9511 public Builder mergeFrom(org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo other) {
9512 if (other == org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo.getDefaultInstance()) return this;
9513 if (!other.version_.isEmpty()) {
9514 if (version_.isEmpty()) {
9515 version_ = other.version_;
9516 bitField0_ = (bitField0_ & ~0x00000001);
9517 } else {
9518 ensureVersionIsMutable();
9519 version_.addAll(other.version_);
9520 }
9521 onChanged();
9522 }
9523 if (!other.timestamp_.isEmpty()) {
9524 if (timestamp_.isEmpty()) {
9525 timestamp_ = other.timestamp_;
9526 bitField0_ = (bitField0_ & ~0x00000002);
9527 } else {
9528 ensureTimestampIsMutable();
9529 timestamp_.addAll(other.timestamp_);
9530 }
9531 onChanged();
9532 }
9533 if (!other.changeset_.isEmpty()) {
9534 if (changeset_.isEmpty()) {
9535 changeset_ = other.changeset_;
9536 bitField0_ = (bitField0_ & ~0x00000004);
9537 } else {
9538 ensureChangesetIsMutable();
9539 changeset_.addAll(other.changeset_);
9540 }
9541 onChanged();
9542 }
9543 if (!other.uid_.isEmpty()) {
9544 if (uid_.isEmpty()) {
9545 uid_ = other.uid_;
9546 bitField0_ = (bitField0_ & ~0x00000008);
9547 } else {
9548 ensureUidIsMutable();
9549 uid_.addAll(other.uid_);
9550 }
9551 onChanged();
9552 }
9553 if (!other.userSid_.isEmpty()) {
9554 if (userSid_.isEmpty()) {
9555 userSid_ = other.userSid_;
9556 bitField0_ = (bitField0_ & ~0x00000010);
9557 } else {
9558 ensureUserSidIsMutable();
9559 userSid_.addAll(other.userSid_);
9560 }
9561 onChanged();
9562 }
9563 if (!other.visible_.isEmpty()) {
9564 if (visible_.isEmpty()) {
9565 visible_ = other.visible_;
9566 bitField0_ = (bitField0_ & ~0x00000020);
9567 } else {
9568 ensureVisibleIsMutable();
9569 visible_.addAll(other.visible_);
9570 }
9571 onChanged();
9572 }
9573 this.mergeUnknownFields(other.unknownFields);
9574 onChanged();
9575 return this;
9576 }
9577
9578 @java.lang.Override
9579 public final boolean isInitialized() {
9580 return true;
9581 }
9582
9583 @java.lang.Override
9584 public Builder mergeFrom(
9585 com.google.protobuf.CodedInputStream input,
9586 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
9587 throws java.io.IOException {
9588 org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo parsedMessage = null;
9589 try {
9590 parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
9591 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
9592 parsedMessage = (org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo) e.getUnfinishedMessage();
9593 throw e.unwrapIOException();
9594 } finally {
9595 if (parsedMessage != null) {
9596 mergeFrom(parsedMessage);
9597 }
9598 }
9599 return this;
9600 }
9601 private int bitField0_;
9602
9603 private com.google.protobuf.Internal.IntList version_ = emptyIntList();
9604 private void ensureVersionIsMutable() {
9605 if (!((bitField0_ & 0x00000001) != 0)) {
9606 version_ = mutableCopy(version_);
9607 bitField0_ |= 0x00000001;
9608 }
9609 }
9610 /**
9611 * <code>repeated int32 version = 1 [packed = true];</code>
9612 * @return A list containing the version.
9613 */
9614 public java.util.List<java.lang.Integer>
9615 getVersionList() {
9616 return ((bitField0_ & 0x00000001) != 0) ?
9617 java.util.Collections.unmodifiableList(version_) : version_;
9618 }
9619 /**
9620 * <code>repeated int32 version = 1 [packed = true];</code>
9621 * @return The count of version.
9622 */
9623 public int getVersionCount() {
9624 return version_.size();
9625 }
9626 /**
9627 * <code>repeated int32 version = 1 [packed = true];</code>
9628 * @param index The index of the element to return.
9629 * @return The version at the given index.
9630 */
9631 public int getVersion(int index) {
9632 return version_.getInt(index);
9633 }
9634 /**
9635 * <code>repeated int32 version = 1 [packed = true];</code>
9636 * @param index The index to set the value at.
9637 * @param value The version to set.
9638 * @return This builder for chaining.
9639 */
9640 public Builder setVersion(
9641 int index, int value) {
9642 ensureVersionIsMutable();
9643 version_.setInt(index, value);
9644 onChanged();
9645 return this;
9646 }
9647 /**
9648 * <code>repeated int32 version = 1 [packed = true];</code>
9649 * @param value The version to add.
9650 * @return This builder for chaining.
9651 */
9652 public Builder addVersion(int value) {
9653 ensureVersionIsMutable();
9654 version_.addInt(value);
9655 onChanged();
9656 return this;
9657 }
9658 /**
9659 * <code>repeated int32 version = 1 [packed = true];</code>
9660 * @param values The version to add.
9661 * @return This builder for chaining.
9662 */
9663 public Builder addAllVersion(
9664 java.lang.Iterable<? extends java.lang.Integer> values) {
9665 ensureVersionIsMutable();
9666 com.google.protobuf.AbstractMessageLite.Builder.addAll(
9667 values, version_);
9668 onChanged();
9669 return this;
9670 }
9671 /**
9672 * <code>repeated int32 version = 1 [packed = true];</code>
9673 * @return This builder for chaining.
9674 */
9675 public Builder clearVersion() {
9676 version_ = emptyIntList();
9677 bitField0_ = (bitField0_ & ~0x00000001);
9678 onChanged();
9679 return this;
9680 }
9681
9682 private com.google.protobuf.Internal.LongList timestamp_ = emptyLongList();
9683 private void ensureTimestampIsMutable() {
9684 if (!((bitField0_ & 0x00000002) != 0)) {
9685 timestamp_ = mutableCopy(timestamp_);
9686 bitField0_ |= 0x00000002;
9687 }
9688 }
9689 /**
9690 * <pre>
9691 * DELTA coded
9692 * </pre>
9693 *
9694 * <code>repeated sint64 timestamp = 2 [packed = true];</code>
9695 * @return A list containing the timestamp.
9696 */
9697 public java.util.List<java.lang.Long>
9698 getTimestampList() {
9699 return ((bitField0_ & 0x00000002) != 0) ?
9700 java.util.Collections.unmodifiableList(timestamp_) : timestamp_;
9701 }
9702 /**
9703 * <pre>
9704 * DELTA coded
9705 * </pre>
9706 *
9707 * <code>repeated sint64 timestamp = 2 [packed = true];</code>
9708 * @return The count of timestamp.
9709 */
9710 public int getTimestampCount() {
9711 return timestamp_.size();
9712 }
9713 /**
9714 * <pre>
9715 * DELTA coded
9716 * </pre>
9717 *
9718 * <code>repeated sint64 timestamp = 2 [packed = true];</code>
9719 * @param index The index of the element to return.
9720 * @return The timestamp at the given index.
9721 */
9722 public long getTimestamp(int index) {
9723 return timestamp_.getLong(index);
9724 }
9725 /**
9726 * <pre>
9727 * DELTA coded
9728 * </pre>
9729 *
9730 * <code>repeated sint64 timestamp = 2 [packed = true];</code>
9731 * @param index The index to set the value at.
9732 * @param value The timestamp to set.
9733 * @return This builder for chaining.
9734 */
9735 public Builder setTimestamp(
9736 int index, long value) {
9737 ensureTimestampIsMutable();
9738 timestamp_.setLong(index, value);
9739 onChanged();
9740 return this;
9741 }
9742 /**
9743 * <pre>
9744 * DELTA coded
9745 * </pre>
9746 *
9747 * <code>repeated sint64 timestamp = 2 [packed = true];</code>
9748 * @param value The timestamp to add.
9749 * @return This builder for chaining.
9750 */
9751 public Builder addTimestamp(long value) {
9752 ensureTimestampIsMutable();
9753 timestamp_.addLong(value);
9754 onChanged();
9755 return this;
9756 }
9757 /**
9758 * <pre>
9759 * DELTA coded
9760 * </pre>
9761 *
9762 * <code>repeated sint64 timestamp = 2 [packed = true];</code>
9763 * @param values The timestamp to add.
9764 * @return This builder for chaining.
9765 */
9766 public Builder addAllTimestamp(
9767 java.lang.Iterable<? extends java.lang.Long> values) {
9768 ensureTimestampIsMutable();
9769 com.google.protobuf.AbstractMessageLite.Builder.addAll(
9770 values, timestamp_);
9771 onChanged();
9772 return this;
9773 }
9774 /**
9775 * <pre>
9776 * DELTA coded
9777 * </pre>
9778 *
9779 * <code>repeated sint64 timestamp = 2 [packed = true];</code>
9780 * @return This builder for chaining.
9781 */
9782 public Builder clearTimestamp() {
9783 timestamp_ = emptyLongList();
9784 bitField0_ = (bitField0_ & ~0x00000002);
9785 onChanged();
9786 return this;
9787 }
9788
9789 private com.google.protobuf.Internal.LongList changeset_ = emptyLongList();
9790 private void ensureChangesetIsMutable() {
9791 if (!((bitField0_ & 0x00000004) != 0)) {
9792 changeset_ = mutableCopy(changeset_);
9793 bitField0_ |= 0x00000004;
9794 }
9795 }
9796 /**
9797 * <pre>
9798 * DELTA coded
9799 * </pre>
9800 *
9801 * <code>repeated sint64 changeset = 3 [packed = true];</code>
9802 * @return A list containing the changeset.
9803 */
9804 public java.util.List<java.lang.Long>
9805 getChangesetList() {
9806 return ((bitField0_ & 0x00000004) != 0) ?
9807 java.util.Collections.unmodifiableList(changeset_) : changeset_;
9808 }
9809 /**
9810 * <pre>
9811 * DELTA coded
9812 * </pre>
9813 *
9814 * <code>repeated sint64 changeset = 3 [packed = true];</code>
9815 * @return The count of changeset.
9816 */
9817 public int getChangesetCount() {
9818 return changeset_.size();
9819 }
9820 /**
9821 * <pre>
9822 * DELTA coded
9823 * </pre>
9824 *
9825 * <code>repeated sint64 changeset = 3 [packed = true];</code>
9826 * @param index The index of the element to return.
9827 * @return The changeset at the given index.
9828 */
9829 public long getChangeset(int index) {
9830 return changeset_.getLong(index);
9831 }
9832 /**
9833 * <pre>
9834 * DELTA coded
9835 * </pre>
9836 *
9837 * <code>repeated sint64 changeset = 3 [packed = true];</code>
9838 * @param index The index to set the value at.
9839 * @param value The changeset to set.
9840 * @return This builder for chaining.
9841 */
9842 public Builder setChangeset(
9843 int index, long value) {
9844 ensureChangesetIsMutable();
9845 changeset_.setLong(index, value);
9846 onChanged();
9847 return this;
9848 }
9849 /**
9850 * <pre>
9851 * DELTA coded
9852 * </pre>
9853 *
9854 * <code>repeated sint64 changeset = 3 [packed = true];</code>
9855 * @param value The changeset to add.
9856 * @return This builder for chaining.
9857 */
9858 public Builder addChangeset(long value) {
9859 ensureChangesetIsMutable();
9860 changeset_.addLong(value);
9861 onChanged();
9862 return this;
9863 }
9864 /**
9865 * <pre>
9866 * DELTA coded
9867 * </pre>
9868 *
9869 * <code>repeated sint64 changeset = 3 [packed = true];</code>
9870 * @param values The changeset to add.
9871 * @return This builder for chaining.
9872 */
9873 public Builder addAllChangeset(
9874 java.lang.Iterable<? extends java.lang.Long> values) {
9875 ensureChangesetIsMutable();
9876 com.google.protobuf.AbstractMessageLite.Builder.addAll(
9877 values, changeset_);
9878 onChanged();
9879 return this;
9880 }
9881 /**
9882 * <pre>
9883 * DELTA coded
9884 * </pre>
9885 *
9886 * <code>repeated sint64 changeset = 3 [packed = true];</code>
9887 * @return This builder for chaining.
9888 */
9889 public Builder clearChangeset() {
9890 changeset_ = emptyLongList();
9891 bitField0_ = (bitField0_ & ~0x00000004);
9892 onChanged();
9893 return this;
9894 }
9895
9896 private com.google.protobuf.Internal.IntList uid_ = emptyIntList();
9897 private void ensureUidIsMutable() {
9898 if (!((bitField0_ & 0x00000008) != 0)) {
9899 uid_ = mutableCopy(uid_);
9900 bitField0_ |= 0x00000008;
9901 }
9902 }
9903 /**
9904 * <pre>
9905 * DELTA coded
9906 * </pre>
9907 *
9908 * <code>repeated sint32 uid = 4 [packed = true];</code>
9909 * @return A list containing the uid.
9910 */
9911 public java.util.List<java.lang.Integer>
9912 getUidList() {
9913 return ((bitField0_ & 0x00000008) != 0) ?
9914 java.util.Collections.unmodifiableList(uid_) : uid_;
9915 }
9916 /**
9917 * <pre>
9918 * DELTA coded
9919 * </pre>
9920 *
9921 * <code>repeated sint32 uid = 4 [packed = true];</code>
9922 * @return The count of uid.
9923 */
9924 public int getUidCount() {
9925 return uid_.size();
9926 }
9927 /**
9928 * <pre>
9929 * DELTA coded
9930 * </pre>
9931 *
9932 * <code>repeated sint32 uid = 4 [packed = true];</code>
9933 * @param index The index of the element to return.
9934 * @return The uid at the given index.
9935 */
9936 public int getUid(int index) {
9937 return uid_.getInt(index);
9938 }
9939 /**
9940 * <pre>
9941 * DELTA coded
9942 * </pre>
9943 *
9944 * <code>repeated sint32 uid = 4 [packed = true];</code>
9945 * @param index The index to set the value at.
9946 * @param value The uid to set.
9947 * @return This builder for chaining.
9948 */
9949 public Builder setUid(
9950 int index, int value) {
9951 ensureUidIsMutable();
9952 uid_.setInt(index, value);
9953 onChanged();
9954 return this;
9955 }
9956 /**
9957 * <pre>
9958 * DELTA coded
9959 * </pre>
9960 *
9961 * <code>repeated sint32 uid = 4 [packed = true];</code>
9962 * @param value The uid to add.
9963 * @return This builder for chaining.
9964 */
9965 public Builder addUid(int value) {
9966 ensureUidIsMutable();
9967 uid_.addInt(value);
9968 onChanged();
9969 return this;
9970 }
9971 /**
9972 * <pre>
9973 * DELTA coded
9974 * </pre>
9975 *
9976 * <code>repeated sint32 uid = 4 [packed = true];</code>
9977 * @param values The uid to add.
9978 * @return This builder for chaining.
9979 */
9980 public Builder addAllUid(
9981 java.lang.Iterable<? extends java.lang.Integer> values) {
9982 ensureUidIsMutable();
9983 com.google.protobuf.AbstractMessageLite.Builder.addAll(
9984 values, uid_);
9985 onChanged();
9986 return this;
9987 }
9988 /**
9989 * <pre>
9990 * DELTA coded
9991 * </pre>
9992 *
9993 * <code>repeated sint32 uid = 4 [packed = true];</code>
9994 * @return This builder for chaining.
9995 */
9996 public Builder clearUid() {
9997 uid_ = emptyIntList();
9998 bitField0_ = (bitField0_ & ~0x00000008);
9999 onChanged();
10000 return this;
10001 }
10002
10003 private com.google.protobuf.Internal.IntList userSid_ = emptyIntList();
10004 private void ensureUserSidIsMutable() {
10005 if (!((bitField0_ & 0x00000010) != 0)) {
10006 userSid_ = mutableCopy(userSid_);
10007 bitField0_ |= 0x00000010;
10008 }
10009 }
10010 /**
10011 * <pre>
10012 * String IDs for usernames. DELTA coded
10013 * </pre>
10014 *
10015 * <code>repeated sint32 user_sid = 5 [packed = true];</code>
10016 * @return A list containing the userSid.
10017 */
10018 public java.util.List<java.lang.Integer>
10019 getUserSidList() {
10020 return ((bitField0_ & 0x00000010) != 0) ?
10021 java.util.Collections.unmodifiableList(userSid_) : userSid_;
10022 }
10023 /**
10024 * <pre>
10025 * String IDs for usernames. DELTA coded
10026 * </pre>
10027 *
10028 * <code>repeated sint32 user_sid = 5 [packed = true];</code>
10029 * @return The count of userSid.
10030 */
10031 public int getUserSidCount() {
10032 return userSid_.size();
10033 }
10034 /**
10035 * <pre>
10036 * String IDs for usernames. DELTA coded
10037 * </pre>
10038 *
10039 * <code>repeated sint32 user_sid = 5 [packed = true];</code>
10040 * @param index The index of the element to return.
10041 * @return The userSid at the given index.
10042 */
10043 public int getUserSid(int index) {
10044 return userSid_.getInt(index);
10045 }
10046 /**
10047 * <pre>
10048 * String IDs for usernames. DELTA coded
10049 * </pre>
10050 *
10051 * <code>repeated sint32 user_sid = 5 [packed = true];</code>
10052 * @param index The index to set the value at.
10053 * @param value The userSid to set.
10054 * @return This builder for chaining.
10055 */
10056 public Builder setUserSid(
10057 int index, int value) {
10058 ensureUserSidIsMutable();
10059 userSid_.setInt(index, value);
10060 onChanged();
10061 return this;
10062 }
10063 /**
10064 * <pre>
10065 * String IDs for usernames. DELTA coded
10066 * </pre>
10067 *
10068 * <code>repeated sint32 user_sid = 5 [packed = true];</code>
10069 * @param value The userSid to add.
10070 * @return This builder for chaining.
10071 */
10072 public Builder addUserSid(int value) {
10073 ensureUserSidIsMutable();
10074 userSid_.addInt(value);
10075 onChanged();
10076 return this;
10077 }
10078 /**
10079 * <pre>
10080 * String IDs for usernames. DELTA coded
10081 * </pre>
10082 *
10083 * <code>repeated sint32 user_sid = 5 [packed = true];</code>
10084 * @param values The userSid to add.
10085 * @return This builder for chaining.
10086 */
10087 public Builder addAllUserSid(
10088 java.lang.Iterable<? extends java.lang.Integer> values) {
10089 ensureUserSidIsMutable();
10090 com.google.protobuf.AbstractMessageLite.Builder.addAll(
10091 values, userSid_);
10092 onChanged();
10093 return this;
10094 }
10095 /**
10096 * <pre>
10097 * String IDs for usernames. DELTA coded
10098 * </pre>
10099 *
10100 * <code>repeated sint32 user_sid = 5 [packed = true];</code>
10101 * @return This builder for chaining.
10102 */
10103 public Builder clearUserSid() {
10104 userSid_ = emptyIntList();
10105 bitField0_ = (bitField0_ & ~0x00000010);
10106 onChanged();
10107 return this;
10108 }
10109
10110 private com.google.protobuf.Internal.BooleanList visible_ = emptyBooleanList();
10111 private void ensureVisibleIsMutable() {
10112 if (!((bitField0_ & 0x00000020) != 0)) {
10113 visible_ = mutableCopy(visible_);
10114 bitField0_ |= 0x00000020;
10115 }
10116 }
10117 /**
10118 * <pre>
10119 * The visible flag is used to store history information. It indicates that
10120 * the current object version has been created by a delete operation on the
10121 * OSM API.
10122 * When a writer sets this flag, it MUST add a required_features tag with
10123 * value "HistoricalInformation" to the HeaderBlock.
10124 * If this flag is not available for some object it MUST be assumed to be
10125 * true if the file has the required_features tag "HistoricalInformation"
10126 * set.
10127 * </pre>
10128 *
10129 * <code>repeated bool visible = 6 [packed = true];</code>
10130 * @return A list containing the visible.
10131 */
10132 public java.util.List<java.lang.Boolean>
10133 getVisibleList() {
10134 return ((bitField0_ & 0x00000020) != 0) ?
10135 java.util.Collections.unmodifiableList(visible_) : visible_;
10136 }
10137 /**
10138 * <pre>
10139 * The visible flag is used to store history information. It indicates that
10140 * the current object version has been created by a delete operation on the
10141 * OSM API.
10142 * When a writer sets this flag, it MUST add a required_features tag with
10143 * value "HistoricalInformation" to the HeaderBlock.
10144 * If this flag is not available for some object it MUST be assumed to be
10145 * true if the file has the required_features tag "HistoricalInformation"
10146 * set.
10147 * </pre>
10148 *
10149 * <code>repeated bool visible = 6 [packed = true];</code>
10150 * @return The count of visible.
10151 */
10152 public int getVisibleCount() {
10153 return visible_.size();
10154 }
10155 /**
10156 * <pre>
10157 * The visible flag is used to store history information. It indicates that
10158 * the current object version has been created by a delete operation on the
10159 * OSM API.
10160 * When a writer sets this flag, it MUST add a required_features tag with
10161 * value "HistoricalInformation" to the HeaderBlock.
10162 * If this flag is not available for some object it MUST be assumed to be
10163 * true if the file has the required_features tag "HistoricalInformation"
10164 * set.
10165 * </pre>
10166 *
10167 * <code>repeated bool visible = 6 [packed = true];</code>
10168 * @param index The index of the element to return.
10169 * @return The visible at the given index.
10170 */
10171 public boolean getVisible(int index) {
10172 return visible_.getBoolean(index);
10173 }
10174 /**
10175 * <pre>
10176 * The visible flag is used to store history information. It indicates that
10177 * the current object version has been created by a delete operation on the
10178 * OSM API.
10179 * When a writer sets this flag, it MUST add a required_features tag with
10180 * value "HistoricalInformation" to the HeaderBlock.
10181 * If this flag is not available for some object it MUST be assumed to be
10182 * true if the file has the required_features tag "HistoricalInformation"
10183 * set.
10184 * </pre>
10185 *
10186 * <code>repeated bool visible = 6 [packed = true];</code>
10187 * @param index The index to set the value at.
10188 * @param value The visible to set.
10189 * @return This builder for chaining.
10190 */
10191 public Builder setVisible(
10192 int index, boolean value) {
10193 ensureVisibleIsMutable();
10194 visible_.setBoolean(index, value);
10195 onChanged();
10196 return this;
10197 }
10198 /**
10199 * <pre>
10200 * The visible flag is used to store history information. It indicates that
10201 * the current object version has been created by a delete operation on the
10202 * OSM API.
10203 * When a writer sets this flag, it MUST add a required_features tag with
10204 * value "HistoricalInformation" to the HeaderBlock.
10205 * If this flag is not available for some object it MUST be assumed to be
10206 * true if the file has the required_features tag "HistoricalInformation"
10207 * set.
10208 * </pre>
10209 *
10210 * <code>repeated bool visible = 6 [packed = true];</code>
10211 * @param value The visible to add.
10212 * @return This builder for chaining.
10213 */
10214 public Builder addVisible(boolean value) {
10215 ensureVisibleIsMutable();
10216 visible_.addBoolean(value);
10217 onChanged();
10218 return this;
10219 }
10220 /**
10221 * <pre>
10222 * The visible flag is used to store history information. It indicates that
10223 * the current object version has been created by a delete operation on the
10224 * OSM API.
10225 * When a writer sets this flag, it MUST add a required_features tag with
10226 * value "HistoricalInformation" to the HeaderBlock.
10227 * If this flag is not available for some object it MUST be assumed to be
10228 * true if the file has the required_features tag "HistoricalInformation"
10229 * set.
10230 * </pre>
10231 *
10232 * <code>repeated bool visible = 6 [packed = true];</code>
10233 * @param values The visible to add.
10234 * @return This builder for chaining.
10235 */
10236 public Builder addAllVisible(
10237 java.lang.Iterable<? extends java.lang.Boolean> values) {
10238 ensureVisibleIsMutable();
10239 com.google.protobuf.AbstractMessageLite.Builder.addAll(
10240 values, visible_);
10241 onChanged();
10242 return this;
10243 }
10244 /**
10245 * <pre>
10246 * The visible flag is used to store history information. It indicates that
10247 * the current object version has been created by a delete operation on the
10248 * OSM API.
10249 * When a writer sets this flag, it MUST add a required_features tag with
10250 * value "HistoricalInformation" to the HeaderBlock.
10251 * If this flag is not available for some object it MUST be assumed to be
10252 * true if the file has the required_features tag "HistoricalInformation"
10253 * set.
10254 * </pre>
10255 *
10256 * <code>repeated bool visible = 6 [packed = true];</code>
10257 * @return This builder for chaining.
10258 */
10259 public Builder clearVisible() {
10260 visible_ = emptyBooleanList();
10261 bitField0_ = (bitField0_ & ~0x00000020);
10262 onChanged();
10263 return this;
10264 }
10265 @java.lang.Override
10266 public final Builder setUnknownFields(
10267 final com.google.protobuf.UnknownFieldSet unknownFields) {
10268 return super.setUnknownFields(unknownFields);
10269 }
10270
10271 @java.lang.Override
10272 public final Builder mergeUnknownFields(
10273 final com.google.protobuf.UnknownFieldSet unknownFields) {
10274 return super.mergeUnknownFields(unknownFields);
10275 }
10276
10277
10278 // @@protoc_insertion_point(builder_scope:OSMPBF.DenseInfo)
10279 }
10280
10281 // @@protoc_insertion_point(class_scope:OSMPBF.DenseInfo)
10282 private static final org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo DEFAULT_INSTANCE;
10283 static {
10284 DEFAULT_INSTANCE = new org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo();
10285 }
10286
10287 public static org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo getDefaultInstance() {
10288 return DEFAULT_INSTANCE;
10289 }
10290
10291 @java.lang.Deprecated public static final com.google.protobuf.Parser<DenseInfo>
10292 PARSER = new com.google.protobuf.AbstractParser<DenseInfo>() {
10293 @java.lang.Override
10294 public DenseInfo parsePartialFrom(
10295 com.google.protobuf.CodedInputStream input,
10296 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
10297 throws com.google.protobuf.InvalidProtocolBufferException {
10298 return new DenseInfo(input, extensionRegistry);
10299 }
10300 };
10301
10302 public static com.google.protobuf.Parser<DenseInfo> parser() {
10303 return PARSER;
10304 }
10305
10306 @java.lang.Override
10307 public com.google.protobuf.Parser<DenseInfo> getParserForType() {
10308 return PARSER;
10309 }
10310
10311 @java.lang.Override
10312 public org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo getDefaultInstanceForType() {
10313 return DEFAULT_INSTANCE;
10314 }
10315
10316 }
10317
10318 public interface ChangeSetOrBuilder extends
10319 // @@protoc_insertion_point(interface_extends:OSMPBF.ChangeSet)
10320 com.google.protobuf.MessageOrBuilder {
10321
10322 /**
10323 * <pre>
10324 *
10325 * // Parallel arrays.
10326 * repeated uint32 keys = 2 [packed = true]; // String IDs.
10327 * repeated uint32 vals = 3 [packed = true]; // String IDs.
10328 * optional Info info = 4;
10329 * </pre>
10330 *
10331 * <code>required int64 id = 1;</code>
10332 * @return Whether the id field is set.
10333 */
10334 boolean hasId();
10335 /**
10336 * <pre>
10337 *
10338 * // Parallel arrays.
10339 * repeated uint32 keys = 2 [packed = true]; // String IDs.
10340 * repeated uint32 vals = 3 [packed = true]; // String IDs.
10341 * optional Info info = 4;
10342 * </pre>
10343 *
10344 * <code>required int64 id = 1;</code>
10345 * @return The id.
10346 */
10347 long getId();
10348 }
10349 /**
10350 * <pre>
10351 * THIS IS STUB DESIGN FOR CHANGESETS. NOT USED RIGHT NOW.
10352 * TODO: REMOVE THIS?
10353 * </pre>
10354 *
10355 * Protobuf type {@code OSMPBF.ChangeSet}
10356 */
10357 public static final class ChangeSet extends
10358 com.google.protobuf.GeneratedMessageV3 implements
10359 // @@protoc_insertion_point(message_implements:OSMPBF.ChangeSet)
10360 ChangeSetOrBuilder {
10361 private static final long serialVersionUID = 0L;
10362 // Use ChangeSet.newBuilder() to construct.
10363 private ChangeSet(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
10364 super(builder);
10365 }
10366 private ChangeSet() {
10367 }
10368
10369 @java.lang.Override
10370 @SuppressWarnings({"unused"})
10371 protected java.lang.Object newInstance(
10372 UnusedPrivateParameter unused) {
10373 return new ChangeSet();
10374 }
10375
10376 @java.lang.Override
10377 public final com.google.protobuf.UnknownFieldSet
10378 getUnknownFields() {
10379 return this.unknownFields;
10380 }
10381 private ChangeSet(
10382 com.google.protobuf.CodedInputStream input,
10383 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
10384 throws com.google.protobuf.InvalidProtocolBufferException {
10385 this();
10386 if (extensionRegistry == null) {
10387 throw new java.lang.NullPointerException();
10388 }
10389 int mutable_bitField0_ = 0;
10390 com.google.protobuf.UnknownFieldSet.Builder unknownFields =
10391 com.google.protobuf.UnknownFieldSet.newBuilder();
10392 try {
10393 boolean done = false;
10394 while (!done) {
10395 int tag = input.readTag();
10396 switch (tag) {
10397 case 0:
10398 done = true;
10399 break;
10400 case 8: {
10401 bitField0_ |= 0x00000001;
10402 id_ = input.readInt64();
10403 break;
10404 }
10405 default: {
10406 if (!parseUnknownField(
10407 input, unknownFields, extensionRegistry, tag)) {
10408 done = true;
10409 }
10410 break;
10411 }
10412 }
10413 }
10414 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
10415 throw e.setUnfinishedMessage(this);
10416 } catch (java.io.IOException e) {
10417 throw new com.google.protobuf.InvalidProtocolBufferException(
10418 e).setUnfinishedMessage(this);
10419 } finally {
10420 this.unknownFields = unknownFields.build();
10421 makeExtensionsImmutable();
10422 }
10423 }
10424 public static final com.google.protobuf.Descriptors.Descriptor
10425 getDescriptor() {
10426 return org.openstreetmap.osmosis.osmbinary.Osmformat.internal_static_OSMPBF_ChangeSet_descriptor;
10427 }
10428
10429 @java.lang.Override
10430 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
10431 internalGetFieldAccessorTable() {
10432 return org.openstreetmap.osmosis.osmbinary.Osmformat.internal_static_OSMPBF_ChangeSet_fieldAccessorTable
10433 .ensureFieldAccessorsInitialized(
10434 org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet.class, org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet.Builder.class);
10435 }
10436
10437 private int bitField0_;
10438 public static final int ID_FIELD_NUMBER = 1;
10439 private long id_;
10440 /**
10441 * <pre>
10442 *
10443 * // Parallel arrays.
10444 * repeated uint32 keys = 2 [packed = true]; // String IDs.
10445 * repeated uint32 vals = 3 [packed = true]; // String IDs.
10446 * optional Info info = 4;
10447 * </pre>
10448 *
10449 * <code>required int64 id = 1;</code>
10450 * @return Whether the id field is set.
10451 */
10452 @java.lang.Override
10453 public boolean hasId() {
10454 return ((bitField0_ & 0x00000001) != 0);
10455 }
10456 /**
10457 * <pre>
10458 *
10459 * // Parallel arrays.
10460 * repeated uint32 keys = 2 [packed = true]; // String IDs.
10461 * repeated uint32 vals = 3 [packed = true]; // String IDs.
10462 * optional Info info = 4;
10463 * </pre>
10464 *
10465 * <code>required int64 id = 1;</code>
10466 * @return The id.
10467 */
10468 @java.lang.Override
10469 public long getId() {
10470 return id_;
10471 }
10472
10473 private byte memoizedIsInitialized = -1;
10474 @java.lang.Override
10475 public final boolean isInitialized() {
10476 byte isInitialized = memoizedIsInitialized;
10477 if (isInitialized == 1) return true;
10478 if (isInitialized == 0) return false;
10479
10480 if (!hasId()) {
10481 memoizedIsInitialized = 0;
10482 return false;
10483 }
10484 memoizedIsInitialized = 1;
10485 return true;
10486 }
10487
10488 @java.lang.Override
10489 public void writeTo(com.google.protobuf.CodedOutputStream output)
10490 throws java.io.IOException {
10491 if (((bitField0_ & 0x00000001) != 0)) {
10492 output.writeInt64(1, id_);
10493 }
10494 unknownFields.writeTo(output);
10495 }
10496
10497 @java.lang.Override
10498 public int getSerializedSize() {
10499 int size = memoizedSize;
10500 if (size != -1) return size;
10501
10502 size = 0;
10503 if (((bitField0_ & 0x00000001) != 0)) {
10504 size += com.google.protobuf.CodedOutputStream
10505 .computeInt64Size(1, id_);
10506 }
10507 size += unknownFields.getSerializedSize();
10508 memoizedSize = size;
10509 return size;
10510 }
10511
10512 @java.lang.Override
10513 public boolean equals(final java.lang.Object obj) {
10514 if (obj == this) {
10515 return true;
10516 }
10517 if (!(obj instanceof org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet)) {
10518 return super.equals(obj);
10519 }
10520 org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet other = (org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet) obj;
10521
10522 if (hasId() != other.hasId()) return false;
10523 if (hasId()) {
10524 if (getId()
10525 != other.getId()) return false;
10526 }
10527 if (!unknownFields.equals(other.unknownFields)) return false;
10528 return true;
10529 }
10530
10531 @java.lang.Override
10532 public int hashCode() {
10533 if (memoizedHashCode != 0) {
10534 return memoizedHashCode;
10535 }
10536 int hash = 41;
10537 hash = (19 * hash) + getDescriptor().hashCode();
10538 if (hasId()) {
10539 hash = (37 * hash) + ID_FIELD_NUMBER;
10540 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
10541 getId());
10542 }
10543 hash = (29 * hash) + unknownFields.hashCode();
10544 memoizedHashCode = hash;
10545 return hash;
10546 }
10547
10548 public static org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet parseFrom(
10549 java.nio.ByteBuffer data)
10550 throws com.google.protobuf.InvalidProtocolBufferException {
10551 return PARSER.parseFrom(data);
10552 }
10553 public static org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet parseFrom(
10554 java.nio.ByteBuffer data,
10555 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
10556 throws com.google.protobuf.InvalidProtocolBufferException {
10557 return PARSER.parseFrom(data, extensionRegistry);
10558 }
10559 public static org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet parseFrom(
10560 com.google.protobuf.ByteString data)
10561 throws com.google.protobuf.InvalidProtocolBufferException {
10562 return PARSER.parseFrom(data);
10563 }
10564 public static org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet parseFrom(
10565 com.google.protobuf.ByteString data,
10566 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
10567 throws com.google.protobuf.InvalidProtocolBufferException {
10568 return PARSER.parseFrom(data, extensionRegistry);
10569 }
10570 public static org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet parseFrom(byte[] data)
10571 throws com.google.protobuf.InvalidProtocolBufferException {
10572 return PARSER.parseFrom(data);
10573 }
10574 public static org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet parseFrom(
10575 byte[] data,
10576 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
10577 throws com.google.protobuf.InvalidProtocolBufferException {
10578 return PARSER.parseFrom(data, extensionRegistry);
10579 }
10580 public static org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet parseFrom(java.io.InputStream input)
10581 throws java.io.IOException {
10582 return com.google.protobuf.GeneratedMessageV3
10583 .parseWithIOException(PARSER, input);
10584 }
10585 public static org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet parseFrom(
10586 java.io.InputStream input,
10587 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
10588 throws java.io.IOException {
10589 return com.google.protobuf.GeneratedMessageV3
10590 .parseWithIOException(PARSER, input, extensionRegistry);
10591 }
10592 public static org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet parseDelimitedFrom(java.io.InputStream input)
10593 throws java.io.IOException {
10594 return com.google.protobuf.GeneratedMessageV3
10595 .parseDelimitedWithIOException(PARSER, input);
10596 }
10597 public static org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet parseDelimitedFrom(
10598 java.io.InputStream input,
10599 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
10600 throws java.io.IOException {
10601 return com.google.protobuf.GeneratedMessageV3
10602 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
10603 }
10604 public static org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet parseFrom(
10605 com.google.protobuf.CodedInputStream input)
10606 throws java.io.IOException {
10607 return com.google.protobuf.GeneratedMessageV3
10608 .parseWithIOException(PARSER, input);
10609 }
10610 public static org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet parseFrom(
10611 com.google.protobuf.CodedInputStream input,
10612 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
10613 throws java.io.IOException {
10614 return com.google.protobuf.GeneratedMessageV3
10615 .parseWithIOException(PARSER, input, extensionRegistry);
10616 }
10617
10618 @java.lang.Override
10619 public Builder newBuilderForType() { return newBuilder(); }
10620 public static Builder newBuilder() {
10621 return DEFAULT_INSTANCE.toBuilder();
10622 }
10623 public static Builder newBuilder(org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet prototype) {
10624 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
10625 }
10626 @java.lang.Override
10627 public Builder toBuilder() {
10628 return this == DEFAULT_INSTANCE
10629 ? new Builder() : new Builder().mergeFrom(this);
10630 }
10631
10632 @java.lang.Override
10633 protected Builder newBuilderForType(
10634 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
10635 Builder builder = new Builder(parent);
10636 return builder;
10637 }
10638 /**
10639 * <pre>
10640 * THIS IS STUB DESIGN FOR CHANGESETS. NOT USED RIGHT NOW.
10641 * TODO: REMOVE THIS?
10642 * </pre>
10643 *
10644 * Protobuf type {@code OSMPBF.ChangeSet}
10645 */
10646 public static final class Builder extends
10647 com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
10648 // @@protoc_insertion_point(builder_implements:OSMPBF.ChangeSet)
10649 org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSetOrBuilder {
10650 public static final com.google.protobuf.Descriptors.Descriptor
10651 getDescriptor() {
10652 return org.openstreetmap.osmosis.osmbinary.Osmformat.internal_static_OSMPBF_ChangeSet_descriptor;
10653 }
10654
10655 @java.lang.Override
10656 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
10657 internalGetFieldAccessorTable() {
10658 return org.openstreetmap.osmosis.osmbinary.Osmformat.internal_static_OSMPBF_ChangeSet_fieldAccessorTable
10659 .ensureFieldAccessorsInitialized(
10660 org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet.class, org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet.Builder.class);
10661 }
10662
10663 // Construct using org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet.newBuilder()
10664 private Builder() {
10665 maybeForceBuilderInitialization();
10666 }
10667
10668 private Builder(
10669 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
10670 super(parent);
10671 maybeForceBuilderInitialization();
10672 }
10673 private void maybeForceBuilderInitialization() {
10674 if (com.google.protobuf.GeneratedMessageV3
10675 .alwaysUseFieldBuilders) {
10676 }
10677 }
10678 @java.lang.Override
10679 public Builder clear() {
10680 super.clear();
10681 id_ = 0L;
10682 bitField0_ = (bitField0_ & ~0x00000001);
10683 return this;
10684 }
10685
10686 @java.lang.Override
10687 public com.google.protobuf.Descriptors.Descriptor
10688 getDescriptorForType() {
10689 return org.openstreetmap.osmosis.osmbinary.Osmformat.internal_static_OSMPBF_ChangeSet_descriptor;
10690 }
10691
10692 @java.lang.Override
10693 public org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet getDefaultInstanceForType() {
10694 return org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet.getDefaultInstance();
10695 }
10696
10697 @java.lang.Override
10698 public org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet build() {
10699 org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet result = buildPartial();
10700 if (!result.isInitialized()) {
10701 throw newUninitializedMessageException(result);
10702 }
10703 return result;
10704 }
10705
10706 @java.lang.Override
10707 public org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet buildPartial() {
10708 org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet result = new org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet(this);
10709 int from_bitField0_ = bitField0_;
10710 int to_bitField0_ = 0;
10711 if (((from_bitField0_ & 0x00000001) != 0)) {
10712 result.id_ = id_;
10713 to_bitField0_ |= 0x00000001;
10714 }
10715 result.bitField0_ = to_bitField0_;
10716 onBuilt();
10717 return result;
10718 }
10719
10720 @java.lang.Override
10721 public Builder clone() {
10722 return super.clone();
10723 }
10724 @java.lang.Override
10725 public Builder setField(
10726 com.google.protobuf.Descriptors.FieldDescriptor field,
10727 java.lang.Object value) {
10728 return super.setField(field, value);
10729 }
10730 @java.lang.Override
10731 public Builder clearField(
10732 com.google.protobuf.Descriptors.FieldDescriptor field) {
10733 return super.clearField(field);
10734 }
10735 @java.lang.Override
10736 public Builder clearOneof(
10737 com.google.protobuf.Descriptors.OneofDescriptor oneof) {
10738 return super.clearOneof(oneof);
10739 }
10740 @java.lang.Override
10741 public Builder setRepeatedField(
10742 com.google.protobuf.Descriptors.FieldDescriptor field,
10743 int index, java.lang.Object value) {
10744 return super.setRepeatedField(field, index, value);
10745 }
10746 @java.lang.Override
10747 public Builder addRepeatedField(
10748 com.google.protobuf.Descriptors.FieldDescriptor field,
10749 java.lang.Object value) {
10750 return super.addRepeatedField(field, value);
10751 }
10752 @java.lang.Override
10753 public Builder mergeFrom(com.google.protobuf.Message other) {
10754 if (other instanceof org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet) {
10755 return mergeFrom((org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet)other);
10756 } else {
10757 super.mergeFrom(other);
10758 return this;
10759 }
10760 }
10761
10762 public Builder mergeFrom(org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet other) {
10763 if (other == org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet.getDefaultInstance()) return this;
10764 if (other.hasId()) {
10765 setId(other.getId());
10766 }
10767 this.mergeUnknownFields(other.unknownFields);
10768 onChanged();
10769 return this;
10770 }
10771
10772 @java.lang.Override
10773 public final boolean isInitialized() {
10774 if (!hasId()) {
10775 return false;
10776 }
10777 return true;
10778 }
10779
10780 @java.lang.Override
10781 public Builder mergeFrom(
10782 com.google.protobuf.CodedInputStream input,
10783 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
10784 throws java.io.IOException {
10785 org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet parsedMessage = null;
10786 try {
10787 parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
10788 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
10789 parsedMessage = (org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet) e.getUnfinishedMessage();
10790 throw e.unwrapIOException();
10791 } finally {
10792 if (parsedMessage != null) {
10793 mergeFrom(parsedMessage);
10794 }
10795 }
10796 return this;
10797 }
10798 private int bitField0_;
10799
10800 private long id_ ;
10801 /**
10802 * <pre>
10803 *
10804 * // Parallel arrays.
10805 * repeated uint32 keys = 2 [packed = true]; // String IDs.
10806 * repeated uint32 vals = 3 [packed = true]; // String IDs.
10807 * optional Info info = 4;
10808 * </pre>
10809 *
10810 * <code>required int64 id = 1;</code>
10811 * @return Whether the id field is set.
10812 */
10813 @java.lang.Override
10814 public boolean hasId() {
10815 return ((bitField0_ & 0x00000001) != 0);
10816 }
10817 /**
10818 * <pre>
10819 *
10820 * // Parallel arrays.
10821 * repeated uint32 keys = 2 [packed = true]; // String IDs.
10822 * repeated uint32 vals = 3 [packed = true]; // String IDs.
10823 * optional Info info = 4;
10824 * </pre>
10825 *
10826 * <code>required int64 id = 1;</code>
10827 * @return The id.
10828 */
10829 @java.lang.Override
10830 public long getId() {
10831 return id_;
10832 }
10833 /**
10834 * <pre>
10835 *
10836 * // Parallel arrays.
10837 * repeated uint32 keys = 2 [packed = true]; // String IDs.
10838 * repeated uint32 vals = 3 [packed = true]; // String IDs.
10839 * optional Info info = 4;
10840 * </pre>
10841 *
10842 * <code>required int64 id = 1;</code>
10843 * @param value The id to set.
10844 * @return This builder for chaining.
10845 */
10846 public Builder setId(long value) {
10847 bitField0_ |= 0x00000001;
10848 id_ = value;
10849 onChanged();
10850 return this;
10851 }
10852 /**
10853 * <pre>
10854 *
10855 * // Parallel arrays.
10856 * repeated uint32 keys = 2 [packed = true]; // String IDs.
10857 * repeated uint32 vals = 3 [packed = true]; // String IDs.
10858 * optional Info info = 4;
10859 * </pre>
10860 *
10861 * <code>required int64 id = 1;</code>
10862 * @return This builder for chaining.
10863 */
10864 public Builder clearId() {
10865 bitField0_ = (bitField0_ & ~0x00000001);
10866 id_ = 0L;
10867 onChanged();
10868 return this;
10869 }
10870 @java.lang.Override
10871 public final Builder setUnknownFields(
10872 final com.google.protobuf.UnknownFieldSet unknownFields) {
10873 return super.setUnknownFields(unknownFields);
10874 }
10875
10876 @java.lang.Override
10877 public final Builder mergeUnknownFields(
10878 final com.google.protobuf.UnknownFieldSet unknownFields) {
10879 return super.mergeUnknownFields(unknownFields);
10880 }
10881
10882
10883 // @@protoc_insertion_point(builder_scope:OSMPBF.ChangeSet)
10884 }
10885
10886 // @@protoc_insertion_point(class_scope:OSMPBF.ChangeSet)
10887 private static final org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet DEFAULT_INSTANCE;
10888 static {
10889 DEFAULT_INSTANCE = new org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet();
10890 }
10891
10892 public static org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet getDefaultInstance() {
10893 return DEFAULT_INSTANCE;
10894 }
10895
10896 @java.lang.Deprecated public static final com.google.protobuf.Parser<ChangeSet>
10897 PARSER = new com.google.protobuf.AbstractParser<ChangeSet>() {
10898 @java.lang.Override
10899 public ChangeSet parsePartialFrom(
10900 com.google.protobuf.CodedInputStream input,
10901 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
10902 throws com.google.protobuf.InvalidProtocolBufferException {
10903 return new ChangeSet(input, extensionRegistry);
10904 }
10905 };
10906
10907 public static com.google.protobuf.Parser<ChangeSet> parser() {
10908 return PARSER;
10909 }
10910
10911 @java.lang.Override
10912 public com.google.protobuf.Parser<ChangeSet> getParserForType() {
10913 return PARSER;
10914 }
10915
10916 @java.lang.Override
10917 public org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet getDefaultInstanceForType() {
10918 return DEFAULT_INSTANCE;
10919 }
10920
10921 }
10922
10923 public interface NodeOrBuilder extends
10924 // @@protoc_insertion_point(interface_extends:OSMPBF.Node)
10925 com.google.protobuf.MessageOrBuilder {
10926
10927 /**
10928 * <code>required sint64 id = 1;</code>
10929 * @return Whether the id field is set.
10930 */
10931 boolean hasId();
10932 /**
10933 * <code>required sint64 id = 1;</code>
10934 * @return The id.
10935 */
10936 long getId();
10937
10938 /**
10939 * <pre>
10940 * Parallel arrays.
10941 * </pre>
10942 *
10943 * <code>repeated uint32 keys = 2 [packed = true];</code>
10944 * @return A list containing the keys.
10945 */
10946 java.util.List<java.lang.Integer> getKeysList();
10947 /**
10948 * <pre>
10949 * Parallel arrays.
10950 * </pre>
10951 *
10952 * <code>repeated uint32 keys = 2 [packed = true];</code>
10953 * @return The count of keys.
10954 */
10955 int getKeysCount();
10956 /**
10957 * <pre>
10958 * Parallel arrays.
10959 * </pre>
10960 *
10961 * <code>repeated uint32 keys = 2 [packed = true];</code>
10962 * @param index The index of the element to return.
10963 * @return The keys at the given index.
10964 */
10965 int getKeys(int index);
10966
10967 /**
10968 * <pre>
10969 * String IDs.
10970 * </pre>
10971 *
10972 * <code>repeated uint32 vals = 3 [packed = true];</code>
10973 * @return A list containing the vals.
10974 */
10975 java.util.List<java.lang.Integer> getValsList();
10976 /**
10977 * <pre>
10978 * String IDs.
10979 * </pre>
10980 *
10981 * <code>repeated uint32 vals = 3 [packed = true];</code>
10982 * @return The count of vals.
10983 */
10984 int getValsCount();
10985 /**
10986 * <pre>
10987 * String IDs.
10988 * </pre>
10989 *
10990 * <code>repeated uint32 vals = 3 [packed = true];</code>
10991 * @param index The index of the element to return.
10992 * @return The vals at the given index.
10993 */
10994 int getVals(int index);
10995
10996 /**
10997 * <pre>
10998 * May be omitted in omitmeta
10999 * </pre>
11000 *
11001 * <code>optional .OSMPBF.Info info = 4;</code>
11002 * @return Whether the info field is set.
11003 */
11004 boolean hasInfo();
11005 /**
11006 * <pre>
11007 * May be omitted in omitmeta
11008 * </pre>
11009 *
11010 * <code>optional .OSMPBF.Info info = 4;</code>
11011 * @return The info.
11012 */
11013 org.openstreetmap.osmosis.osmbinary.Osmformat.Info getInfo();
11014 /**
11015 * <pre>
11016 * May be omitted in omitmeta
11017 * </pre>
11018 *
11019 * <code>optional .OSMPBF.Info info = 4;</code>
11020 */
11021 org.openstreetmap.osmosis.osmbinary.Osmformat.InfoOrBuilder getInfoOrBuilder();
11022
11023 /**
11024 * <code>required sint64 lat = 8;</code>
11025 * @return Whether the lat field is set.
11026 */
11027 boolean hasLat();
11028 /**
11029 * <code>required sint64 lat = 8;</code>
11030 * @return The lat.
11031 */
11032 long getLat();
11033
11034 /**
11035 * <code>required sint64 lon = 9;</code>
11036 * @return Whether the lon field is set.
11037 */
11038 boolean hasLon();
11039 /**
11040 * <code>required sint64 lon = 9;</code>
11041 * @return The lon.
11042 */
11043 long getLon();
11044 }
11045 /**
11046 * Protobuf type {@code OSMPBF.Node}
11047 */
11048 public static final class Node extends
11049 com.google.protobuf.GeneratedMessageV3 implements
11050 // @@protoc_insertion_point(message_implements:OSMPBF.Node)
11051 NodeOrBuilder {
11052 private static final long serialVersionUID = 0L;
11053 // Use Node.newBuilder() to construct.
11054 private Node(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
11055 super(builder);
11056 }
11057 private Node() {
11058 keys_ = emptyIntList();
11059 vals_ = emptyIntList();
11060 }
11061
11062 @java.lang.Override
11063 @SuppressWarnings({"unused"})
11064 protected java.lang.Object newInstance(
11065 UnusedPrivateParameter unused) {
11066 return new Node();
11067 }
11068
11069 @java.lang.Override
11070 public final com.google.protobuf.UnknownFieldSet
11071 getUnknownFields() {
11072 return this.unknownFields;
11073 }
11074 private Node(
11075 com.google.protobuf.CodedInputStream input,
11076 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
11077 throws com.google.protobuf.InvalidProtocolBufferException {
11078 this();
11079 if (extensionRegistry == null) {
11080 throw new java.lang.NullPointerException();
11081 }
11082 int mutable_bitField0_ = 0;
11083 com.google.protobuf.UnknownFieldSet.Builder unknownFields =
11084 com.google.protobuf.UnknownFieldSet.newBuilder();
11085 try {
11086 boolean done = false;
11087 while (!done) {
11088 int tag = input.readTag();
11089 switch (tag) {
11090 case 0:
11091 done = true;
11092 break;
11093 case 8: {
11094 bitField0_ |= 0x00000001;
11095 id_ = input.readSInt64();
11096 break;
11097 }
11098 case 16: {
11099 if (!((mutable_bitField0_ & 0x00000002) != 0)) {
11100 keys_ = newIntList();
11101 mutable_bitField0_ |= 0x00000002;
11102 }
11103 keys_.addInt(input.readUInt32());
11104 break;
11105 }
11106 case 18: {
11107 int length = input.readRawVarint32();
11108 int limit = input.pushLimit(length);
11109 if (!((mutable_bitField0_ & 0x00000002) != 0) && input.getBytesUntilLimit() > 0) {
11110 keys_ = newIntList();
11111 mutable_bitField0_ |= 0x00000002;
11112 }
11113 while (input.getBytesUntilLimit() > 0) {
11114 keys_.addInt(input.readUInt32());
11115 }
11116 input.popLimit(limit);
11117 break;
11118 }
11119 case 24: {
11120 if (!((mutable_bitField0_ & 0x00000004) != 0)) {
11121 vals_ = newIntList();
11122 mutable_bitField0_ |= 0x00000004;
11123 }
11124 vals_.addInt(input.readUInt32());
11125 break;
11126 }
11127 case 26: {
11128 int length = input.readRawVarint32();
11129 int limit = input.pushLimit(length);
11130 if (!((mutable_bitField0_ & 0x00000004) != 0) && input.getBytesUntilLimit() > 0) {
11131 vals_ = newIntList();
11132 mutable_bitField0_ |= 0x00000004;
11133 }
11134 while (input.getBytesUntilLimit() > 0) {
11135 vals_.addInt(input.readUInt32());
11136 }
11137 input.popLimit(limit);
11138 break;
11139 }
11140 case 34: {
11141 org.openstreetmap.osmosis.osmbinary.Osmformat.Info.Builder subBuilder = null;
11142 if (((bitField0_ & 0x00000002) != 0)) {
11143 subBuilder = info_.toBuilder();
11144 }
11145 info_ = input.readMessage(org.openstreetmap.osmosis.osmbinary.Osmformat.Info.PARSER, extensionRegistry);
11146 if (subBuilder != null) {
11147 subBuilder.mergeFrom(info_);
11148 info_ = subBuilder.buildPartial();
11149 }
11150 bitField0_ |= 0x00000002;
11151 break;
11152 }
11153 case 64: {
11154 bitField0_ |= 0x00000004;
11155 lat_ = input.readSInt64();
11156 break;
11157 }
11158 case 72: {
11159 bitField0_ |= 0x00000008;
11160 lon_ = input.readSInt64();
11161 break;
11162 }
11163 default: {
11164 if (!parseUnknownField(
11165 input, unknownFields, extensionRegistry, tag)) {
11166 done = true;
11167 }
11168 break;
11169 }
11170 }
11171 }
11172 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
11173 throw e.setUnfinishedMessage(this);
11174 } catch (java.io.IOException e) {
11175 throw new com.google.protobuf.InvalidProtocolBufferException(
11176 e).setUnfinishedMessage(this);
11177 } finally {
11178 if (((mutable_bitField0_ & 0x00000002) != 0)) {
11179 keys_.makeImmutable(); // C
11180 }
11181 if (((mutable_bitField0_ & 0x00000004) != 0)) {
11182 vals_.makeImmutable(); // C
11183 }
11184 this.unknownFields = unknownFields.build();
11185 makeExtensionsImmutable();
11186 }
11187 }
11188 public static final com.google.protobuf.Descriptors.Descriptor
11189 getDescriptor() {
11190 return org.openstreetmap.osmosis.osmbinary.Osmformat.internal_static_OSMPBF_Node_descriptor;
11191 }
11192
11193 @java.lang.Override
11194 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
11195 internalGetFieldAccessorTable() {
11196 return org.openstreetmap.osmosis.osmbinary.Osmformat.internal_static_OSMPBF_Node_fieldAccessorTable
11197 .ensureFieldAccessorsInitialized(
11198 org.openstreetmap.osmosis.osmbinary.Osmformat.Node.class, org.openstreetmap.osmosis.osmbinary.Osmformat.Node.Builder.class);
11199 }
11200
11201 private int bitField0_;
11202 public static final int ID_FIELD_NUMBER = 1;
11203 private long id_;
11204 /**
11205 * <code>required sint64 id = 1;</code>
11206 * @return Whether the id field is set.
11207 */
11208 @java.lang.Override
11209 public boolean hasId() {
11210 return ((bitField0_ & 0x00000001) != 0);
11211 }
11212 /**
11213 * <code>required sint64 id = 1;</code>
11214 * @return The id.
11215 */
11216 @java.lang.Override
11217 public long getId() {
11218 return id_;
11219 }
11220
11221 public static final int KEYS_FIELD_NUMBER = 2;
11222 private com.google.protobuf.Internal.IntList keys_;
11223 /**
11224 * <pre>
11225 * Parallel arrays.
11226 * </pre>
11227 *
11228 * <code>repeated uint32 keys = 2 [packed = true];</code>
11229 * @return A list containing the keys.
11230 */
11231 @java.lang.Override
11232 public java.util.List<java.lang.Integer>
11233 getKeysList() {
11234 return keys_;
11235 }
11236 /**
11237 * <pre>
11238 * Parallel arrays.
11239 * </pre>
11240 *
11241 * <code>repeated uint32 keys = 2 [packed = true];</code>
11242 * @return The count of keys.
11243 */
11244 public int getKeysCount() {
11245 return keys_.size();
11246 }
11247 /**
11248 * <pre>
11249 * Parallel arrays.
11250 * </pre>
11251 *
11252 * <code>repeated uint32 keys = 2 [packed = true];</code>
11253 * @param index The index of the element to return.
11254 * @return The keys at the given index.
11255 */
11256 public int getKeys(int index) {
11257 return keys_.getInt(index);
11258 }
11259 private int keysMemoizedSerializedSize = -1;
11260
11261 public static final int VALS_FIELD_NUMBER = 3;
11262 private com.google.protobuf.Internal.IntList vals_;
11263 /**
11264 * <pre>
11265 * String IDs.
11266 * </pre>
11267 *
11268 * <code>repeated uint32 vals = 3 [packed = true];</code>
11269 * @return A list containing the vals.
11270 */
11271 @java.lang.Override
11272 public java.util.List<java.lang.Integer>
11273 getValsList() {
11274 return vals_;
11275 }
11276 /**
11277 * <pre>
11278 * String IDs.
11279 * </pre>
11280 *
11281 * <code>repeated uint32 vals = 3 [packed = true];</code>
11282 * @return The count of vals.
11283 */
11284 public int getValsCount() {
11285 return vals_.size();
11286 }
11287 /**
11288 * <pre>
11289 * String IDs.
11290 * </pre>
11291 *
11292 * <code>repeated uint32 vals = 3 [packed = true];</code>
11293 * @param index The index of the element to return.
11294 * @return The vals at the given index.
11295 */
11296 public int getVals(int index) {
11297 return vals_.getInt(index);
11298 }
11299 private int valsMemoizedSerializedSize = -1;
11300
11301 public static final int INFO_FIELD_NUMBER = 4;
11302 private org.openstreetmap.osmosis.osmbinary.Osmformat.Info info_;
11303 /**
11304 * <pre>
11305 * May be omitted in omitmeta
11306 * </pre>
11307 *
11308 * <code>optional .OSMPBF.Info info = 4;</code>
11309 * @return Whether the info field is set.
11310 */
11311 @java.lang.Override
11312 public boolean hasInfo() {
11313 return ((bitField0_ & 0x00000002) != 0);
11314 }
11315 /**
11316 * <pre>
11317 * May be omitted in omitmeta
11318 * </pre>
11319 *
11320 * <code>optional .OSMPBF.Info info = 4;</code>
11321 * @return The info.
11322 */
11323 @java.lang.Override
11324 public org.openstreetmap.osmosis.osmbinary.Osmformat.Info getInfo() {
11325 return info_ == null ? org.openstreetmap.osmosis.osmbinary.Osmformat.Info.getDefaultInstance() : info_;
11326 }
11327 /**
11328 * <pre>
11329 * May be omitted in omitmeta
11330 * </pre>
11331 *
11332 * <code>optional .OSMPBF.Info info = 4;</code>
11333 */
11334 @java.lang.Override
11335 public org.openstreetmap.osmosis.osmbinary.Osmformat.InfoOrBuilder getInfoOrBuilder() {
11336 return info_ == null ? org.openstreetmap.osmosis.osmbinary.Osmformat.Info.getDefaultInstance() : info_;
11337 }
11338
11339 public static final int LAT_FIELD_NUMBER = 8;
11340 private long lat_;
11341 /**
11342 * <code>required sint64 lat = 8;</code>
11343 * @return Whether the lat field is set.
11344 */
11345 @java.lang.Override
11346 public boolean hasLat() {
11347 return ((bitField0_ & 0x00000004) != 0);
11348 }
11349 /**
11350 * <code>required sint64 lat = 8;</code>
11351 * @return The lat.
11352 */
11353 @java.lang.Override
11354 public long getLat() {
11355 return lat_;
11356 }
11357
11358 public static final int LON_FIELD_NUMBER = 9;
11359 private long lon_;
11360 /**
11361 * <code>required sint64 lon = 9;</code>
11362 * @return Whether the lon field is set.
11363 */
11364 @java.lang.Override
11365 public boolean hasLon() {
11366 return ((bitField0_ & 0x00000008) != 0);
11367 }
11368 /**
11369 * <code>required sint64 lon = 9;</code>
11370 * @return The lon.
11371 */
11372 @java.lang.Override
11373 public long getLon() {
11374 return lon_;
11375 }
11376
11377 private byte memoizedIsInitialized = -1;
11378 @java.lang.Override
11379 public final boolean isInitialized() {
11380 byte isInitialized = memoizedIsInitialized;
11381 if (isInitialized == 1) return true;
11382 if (isInitialized == 0) return false;
11383
11384 if (!hasId()) {
11385 memoizedIsInitialized = 0;
11386 return false;
11387 }
11388 if (!hasLat()) {
11389 memoizedIsInitialized = 0;
11390 return false;
11391 }
11392 if (!hasLon()) {
11393 memoizedIsInitialized = 0;
11394 return false;
11395 }
11396 memoizedIsInitialized = 1;
11397 return true;
11398 }
11399
11400 @java.lang.Override
11401 public void writeTo(com.google.protobuf.CodedOutputStream output)
11402 throws java.io.IOException {
11403 getSerializedSize();
11404 if (((bitField0_ & 0x00000001) != 0)) {
11405 output.writeSInt64(1, id_);
11406 }
11407 if (getKeysList().size() > 0) {
11408 output.writeUInt32NoTag(18);
11409 output.writeUInt32NoTag(keysMemoizedSerializedSize);
11410 }
11411 for (int i = 0; i < keys_.size(); i++) {
11412 output.writeUInt32NoTag(keys_.getInt(i));
11413 }
11414 if (getValsList().size() > 0) {
11415 output.writeUInt32NoTag(26);
11416 output.writeUInt32NoTag(valsMemoizedSerializedSize);
11417 }
11418 for (int i = 0; i < vals_.size(); i++) {
11419 output.writeUInt32NoTag(vals_.getInt(i));
11420 }
11421 if (((bitField0_ & 0x00000002) != 0)) {
11422 output.writeMessage(4, getInfo());
11423 }
11424 if (((bitField0_ & 0x00000004) != 0)) {
11425 output.writeSInt64(8, lat_);
11426 }
11427 if (((bitField0_ & 0x00000008) != 0)) {
11428 output.writeSInt64(9, lon_);
11429 }
11430 unknownFields.writeTo(output);
11431 }
11432
11433 @java.lang.Override
11434 public int getSerializedSize() {
11435 int size = memoizedSize;
11436 if (size != -1) return size;
11437
11438 size = 0;
11439 if (((bitField0_ & 0x00000001) != 0)) {
11440 size += com.google.protobuf.CodedOutputStream
11441 .computeSInt64Size(1, id_);
11442 }
11443 {
11444 int dataSize = 0;
11445 for (int i = 0; i < keys_.size(); i++) {
11446 dataSize += com.google.protobuf.CodedOutputStream
11447 .computeUInt32SizeNoTag(keys_.getInt(i));
11448 }
11449 size += dataSize;
11450 if (!getKeysList().isEmpty()) {
11451 size += 1;
11452 size += com.google.protobuf.CodedOutputStream
11453 .computeInt32SizeNoTag(dataSize);
11454 }
11455 keysMemoizedSerializedSize = dataSize;
11456 }
11457 {
11458 int dataSize = 0;
11459 for (int i = 0; i < vals_.size(); i++) {
11460 dataSize += com.google.protobuf.CodedOutputStream
11461 .computeUInt32SizeNoTag(vals_.getInt(i));
11462 }
11463 size += dataSize;
11464 if (!getValsList().isEmpty()) {
11465 size += 1;
11466 size += com.google.protobuf.CodedOutputStream
11467 .computeInt32SizeNoTag(dataSize);
11468 }
11469 valsMemoizedSerializedSize = dataSize;
11470 }
11471 if (((bitField0_ & 0x00000002) != 0)) {
11472 size += com.google.protobuf.CodedOutputStream
11473 .computeMessageSize(4, getInfo());
11474 }
11475 if (((bitField0_ & 0x00000004) != 0)) {
11476 size += com.google.protobuf.CodedOutputStream
11477 .computeSInt64Size(8, lat_);
11478 }
11479 if (((bitField0_ & 0x00000008) != 0)) {
11480 size += com.google.protobuf.CodedOutputStream
11481 .computeSInt64Size(9, lon_);
11482 }
11483 size += unknownFields.getSerializedSize();
11484 memoizedSize = size;
11485 return size;
11486 }
11487
11488 @java.lang.Override
11489 public boolean equals(final java.lang.Object obj) {
11490 if (obj == this) {
11491 return true;
11492 }
11493 if (!(obj instanceof org.openstreetmap.osmosis.osmbinary.Osmformat.Node)) {
11494 return super.equals(obj);
11495 }
11496 org.openstreetmap.osmosis.osmbinary.Osmformat.Node other = (org.openstreetmap.osmosis.osmbinary.Osmformat.Node) obj;
11497
11498 if (hasId() != other.hasId()) return false;
11499 if (hasId()) {
11500 if (getId()
11501 != other.getId()) return false;
11502 }
11503 if (!getKeysList()
11504 .equals(other.getKeysList())) return false;
11505 if (!getValsList()
11506 .equals(other.getValsList())) return false;
11507 if (hasInfo() != other.hasInfo()) return false;
11508 if (hasInfo()) {
11509 if (!getInfo()
11510 .equals(other.getInfo())) return false;
11511 }
11512 if (hasLat() != other.hasLat()) return false;
11513 if (hasLat()) {
11514 if (getLat()
11515 != other.getLat()) return false;
11516 }
11517 if (hasLon() != other.hasLon()) return false;
11518 if (hasLon()) {
11519 if (getLon()
11520 != other.getLon()) return false;
11521 }
11522 if (!unknownFields.equals(other.unknownFields)) return false;
11523 return true;
11524 }
11525
11526 @java.lang.Override
11527 public int hashCode() {
11528 if (memoizedHashCode != 0) {
11529 return memoizedHashCode;
11530 }
11531 int hash = 41;
11532 hash = (19 * hash) + getDescriptor().hashCode();
11533 if (hasId()) {
11534 hash = (37 * hash) + ID_FIELD_NUMBER;
11535 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
11536 getId());
11537 }
11538 if (getKeysCount() > 0) {
11539 hash = (37 * hash) + KEYS_FIELD_NUMBER;
11540 hash = (53 * hash) + getKeysList().hashCode();
11541 }
11542 if (getValsCount() > 0) {
11543 hash = (37 * hash) + VALS_FIELD_NUMBER;
11544 hash = (53 * hash) + getValsList().hashCode();
11545 }
11546 if (hasInfo()) {
11547 hash = (37 * hash) + INFO_FIELD_NUMBER;
11548 hash = (53 * hash) + getInfo().hashCode();
11549 }
11550 if (hasLat()) {
11551 hash = (37 * hash) + LAT_FIELD_NUMBER;
11552 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
11553 getLat());
11554 }
11555 if (hasLon()) {
11556 hash = (37 * hash) + LON_FIELD_NUMBER;
11557 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
11558 getLon());
11559 }
11560 hash = (29 * hash) + unknownFields.hashCode();
11561 memoizedHashCode = hash;
11562 return hash;
11563 }
11564
11565 public static org.openstreetmap.osmosis.osmbinary.Osmformat.Node parseFrom(
11566 java.nio.ByteBuffer data)
11567 throws com.google.protobuf.InvalidProtocolBufferException {
11568 return PARSER.parseFrom(data);
11569 }
11570 public static org.openstreetmap.osmosis.osmbinary.Osmformat.Node parseFrom(
11571 java.nio.ByteBuffer data,
11572 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
11573 throws com.google.protobuf.InvalidProtocolBufferException {
11574 return PARSER.parseFrom(data, extensionRegistry);
11575 }
11576 public static org.openstreetmap.osmosis.osmbinary.Osmformat.Node parseFrom(
11577 com.google.protobuf.ByteString data)
11578 throws com.google.protobuf.InvalidProtocolBufferException {
11579 return PARSER.parseFrom(data);
11580 }
11581 public static org.openstreetmap.osmosis.osmbinary.Osmformat.Node parseFrom(
11582 com.google.protobuf.ByteString data,
11583 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
11584 throws com.google.protobuf.InvalidProtocolBufferException {
11585 return PARSER.parseFrom(data, extensionRegistry);
11586 }
11587 public static org.openstreetmap.osmosis.osmbinary.Osmformat.Node parseFrom(byte[] data)
11588 throws com.google.protobuf.InvalidProtocolBufferException {
11589 return PARSER.parseFrom(data);
11590 }
11591 public static org.openstreetmap.osmosis.osmbinary.Osmformat.Node parseFrom(
11592 byte[] data,
11593 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
11594 throws com.google.protobuf.InvalidProtocolBufferException {
11595 return PARSER.parseFrom(data, extensionRegistry);
11596 }
11597 public static org.openstreetmap.osmosis.osmbinary.Osmformat.Node parseFrom(java.io.InputStream input)
11598 throws java.io.IOException {
11599 return com.google.protobuf.GeneratedMessageV3
11600 .parseWithIOException(PARSER, input);
11601 }
11602 public static org.openstreetmap.osmosis.osmbinary.Osmformat.Node parseFrom(
11603 java.io.InputStream input,
11604 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
11605 throws java.io.IOException {
11606 return com.google.protobuf.GeneratedMessageV3
11607 .parseWithIOException(PARSER, input, extensionRegistry);
11608 }
11609 public static org.openstreetmap.osmosis.osmbinary.Osmformat.Node parseDelimitedFrom(java.io.InputStream input)
11610 throws java.io.IOException {
11611 return com.google.protobuf.GeneratedMessageV3
11612 .parseDelimitedWithIOException(PARSER, input);
11613 }
11614 public static org.openstreetmap.osmosis.osmbinary.Osmformat.Node parseDelimitedFrom(
11615 java.io.InputStream input,
11616 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
11617 throws java.io.IOException {
11618 return com.google.protobuf.GeneratedMessageV3
11619 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
11620 }
11621 public static org.openstreetmap.osmosis.osmbinary.Osmformat.Node parseFrom(
11622 com.google.protobuf.CodedInputStream input)
11623 throws java.io.IOException {
11624 return com.google.protobuf.GeneratedMessageV3
11625 .parseWithIOException(PARSER, input);
11626 }
11627 public static org.openstreetmap.osmosis.osmbinary.Osmformat.Node parseFrom(
11628 com.google.protobuf.CodedInputStream input,
11629 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
11630 throws java.io.IOException {
11631 return com.google.protobuf.GeneratedMessageV3
11632 .parseWithIOException(PARSER, input, extensionRegistry);
11633 }
11634
11635 @java.lang.Override
11636 public Builder newBuilderForType() { return newBuilder(); }
11637 public static Builder newBuilder() {
11638 return DEFAULT_INSTANCE.toBuilder();
11639 }
11640 public static Builder newBuilder(org.openstreetmap.osmosis.osmbinary.Osmformat.Node prototype) {
11641 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
11642 }
11643 @java.lang.Override
11644 public Builder toBuilder() {
11645 return this == DEFAULT_INSTANCE
11646 ? new Builder() : new Builder().mergeFrom(this);
11647 }
11648
11649 @java.lang.Override
11650 protected Builder newBuilderForType(
11651 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
11652 Builder builder = new Builder(parent);
11653 return builder;
11654 }
11655 /**
11656 * Protobuf type {@code OSMPBF.Node}
11657 */
11658 public static final class Builder extends
11659 com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
11660 // @@protoc_insertion_point(builder_implements:OSMPBF.Node)
11661 org.openstreetmap.osmosis.osmbinary.Osmformat.NodeOrBuilder {
11662 public static final com.google.protobuf.Descriptors.Descriptor
11663 getDescriptor() {
11664 return org.openstreetmap.osmosis.osmbinary.Osmformat.internal_static_OSMPBF_Node_descriptor;
11665 }
11666
11667 @java.lang.Override
11668 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
11669 internalGetFieldAccessorTable() {
11670 return org.openstreetmap.osmosis.osmbinary.Osmformat.internal_static_OSMPBF_Node_fieldAccessorTable
11671 .ensureFieldAccessorsInitialized(
11672 org.openstreetmap.osmosis.osmbinary.Osmformat.Node.class, org.openstreetmap.osmosis.osmbinary.Osmformat.Node.Builder.class);
11673 }
11674
11675 // Construct using org.openstreetmap.osmosis.osmbinary.Osmformat.Node.newBuilder()
11676 private Builder() {
11677 maybeForceBuilderInitialization();
11678 }
11679
11680 private Builder(
11681 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
11682 super(parent);
11683 maybeForceBuilderInitialization();
11684 }
11685 private void maybeForceBuilderInitialization() {
11686 if (com.google.protobuf.GeneratedMessageV3
11687 .alwaysUseFieldBuilders) {
11688 getInfoFieldBuilder();
11689 }
11690 }
11691 @java.lang.Override
11692 public Builder clear() {
11693 super.clear();
11694 id_ = 0L;
11695 bitField0_ = (bitField0_ & ~0x00000001);
11696 keys_ = emptyIntList();
11697 bitField0_ = (bitField0_ & ~0x00000002);
11698 vals_ = emptyIntList();
11699 bitField0_ = (bitField0_ & ~0x00000004);
11700 if (infoBuilder_ == null) {
11701 info_ = null;
11702 } else {
11703 infoBuilder_.clear();
11704 }
11705 bitField0_ = (bitField0_ & ~0x00000008);
11706 lat_ = 0L;
11707 bitField0_ = (bitField0_ & ~0x00000010);
11708 lon_ = 0L;
11709 bitField0_ = (bitField0_ & ~0x00000020);
11710 return this;
11711 }
11712
11713 @java.lang.Override
11714 public com.google.protobuf.Descriptors.Descriptor
11715 getDescriptorForType() {
11716 return org.openstreetmap.osmosis.osmbinary.Osmformat.internal_static_OSMPBF_Node_descriptor;
11717 }
11718
11719 @java.lang.Override
11720 public org.openstreetmap.osmosis.osmbinary.Osmformat.Node getDefaultInstanceForType() {
11721 return org.openstreetmap.osmosis.osmbinary.Osmformat.Node.getDefaultInstance();
11722 }
11723
11724 @java.lang.Override
11725 public org.openstreetmap.osmosis.osmbinary.Osmformat.Node build() {
11726 org.openstreetmap.osmosis.osmbinary.Osmformat.Node result = buildPartial();
11727 if (!result.isInitialized()) {
11728 throw newUninitializedMessageException(result);
11729 }
11730 return result;
11731 }
11732
11733 @java.lang.Override
11734 public org.openstreetmap.osmosis.osmbinary.Osmformat.Node buildPartial() {
11735 org.openstreetmap.osmosis.osmbinary.Osmformat.Node result = new org.openstreetmap.osmosis.osmbinary.Osmformat.Node(this);
11736 int from_bitField0_ = bitField0_;
11737 int to_bitField0_ = 0;
11738 if (((from_bitField0_ & 0x00000001) != 0)) {
11739 result.id_ = id_;
11740 to_bitField0_ |= 0x00000001;
11741 }
11742 if (((bitField0_ & 0x00000002) != 0)) {
11743 keys_.makeImmutable();
11744 bitField0_ = (bitField0_ & ~0x00000002);
11745 }
11746 result.keys_ = keys_;
11747 if (((bitField0_ & 0x00000004) != 0)) {
11748 vals_.makeImmutable();
11749 bitField0_ = (bitField0_ & ~0x00000004);
11750 }
11751 result.vals_ = vals_;
11752 if (((from_bitField0_ & 0x00000008) != 0)) {
11753 if (infoBuilder_ == null) {
11754 result.info_ = info_;
11755 } else {
11756 result.info_ = infoBuilder_.build();
11757 }
11758 to_bitField0_ |= 0x00000002;
11759 }
11760 if (((from_bitField0_ & 0x00000010) != 0)) {
11761 result.lat_ = lat_;
11762 to_bitField0_ |= 0x00000004;
11763 }
11764 if (((from_bitField0_ & 0x00000020) != 0)) {
11765 result.lon_ = lon_;
11766 to_bitField0_ |= 0x00000008;
11767 }
11768 result.bitField0_ = to_bitField0_;
11769 onBuilt();
11770 return result;
11771 }
11772
11773 @java.lang.Override
11774 public Builder clone() {
11775 return super.clone();
11776 }
11777 @java.lang.Override
11778 public Builder setField(
11779 com.google.protobuf.Descriptors.FieldDescriptor field,
11780 java.lang.Object value) {
11781 return super.setField(field, value);
11782 }
11783 @java.lang.Override
11784 public Builder clearField(
11785 com.google.protobuf.Descriptors.FieldDescriptor field) {
11786 return super.clearField(field);
11787 }
11788 @java.lang.Override
11789 public Builder clearOneof(
11790 com.google.protobuf.Descriptors.OneofDescriptor oneof) {
11791 return super.clearOneof(oneof);
11792 }
11793 @java.lang.Override
11794 public Builder setRepeatedField(
11795 com.google.protobuf.Descriptors.FieldDescriptor field,
11796 int index, java.lang.Object value) {
11797 return super.setRepeatedField(field, index, value);
11798 }
11799 @java.lang.Override
11800 public Builder addRepeatedField(
11801 com.google.protobuf.Descriptors.FieldDescriptor field,
11802 java.lang.Object value) {
11803 return super.addRepeatedField(field, value);
11804 }
11805 @java.lang.Override
11806 public Builder mergeFrom(com.google.protobuf.Message other) {
11807 if (other instanceof org.openstreetmap.osmosis.osmbinary.Osmformat.Node) {
11808 return mergeFrom((org.openstreetmap.osmosis.osmbinary.Osmformat.Node)other);
11809 } else {
11810 super.mergeFrom(other);
11811 return this;
11812 }
11813 }
11814
11815 public Builder mergeFrom(org.openstreetmap.osmosis.osmbinary.Osmformat.Node other) {
11816 if (other == org.openstreetmap.osmosis.osmbinary.Osmformat.Node.getDefaultInstance()) return this;
11817 if (other.hasId()) {
11818 setId(other.getId());
11819 }
11820 if (!other.keys_.isEmpty()) {
11821 if (keys_.isEmpty()) {
11822 keys_ = other.keys_;
11823 bitField0_ = (bitField0_ & ~0x00000002);
11824 } else {
11825 ensureKeysIsMutable();
11826 keys_.addAll(other.keys_);
11827 }
11828 onChanged();
11829 }
11830 if (!other.vals_.isEmpty()) {
11831 if (vals_.isEmpty()) {
11832 vals_ = other.vals_;
11833 bitField0_ = (bitField0_ & ~0x00000004);
11834 } else {
11835 ensureValsIsMutable();
11836 vals_.addAll(other.vals_);
11837 }
11838 onChanged();
11839 }
11840 if (other.hasInfo()) {
11841 mergeInfo(other.getInfo());
11842 }
11843 if (other.hasLat()) {
11844 setLat(other.getLat());
11845 }
11846 if (other.hasLon()) {
11847 setLon(other.getLon());
11848 }
11849 this.mergeUnknownFields(other.unknownFields);
11850 onChanged();
11851 return this;
11852 }
11853
11854 @java.lang.Override
11855 public final boolean isInitialized() {
11856 if (!hasId()) {
11857 return false;
11858 }
11859 if (!hasLat()) {
11860 return false;
11861 }
11862 if (!hasLon()) {
11863 return false;
11864 }
11865 return true;
11866 }
11867
11868 @java.lang.Override
11869 public Builder mergeFrom(
11870 com.google.protobuf.CodedInputStream input,
11871 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
11872 throws java.io.IOException {
11873 org.openstreetmap.osmosis.osmbinary.Osmformat.Node parsedMessage = null;
11874 try {
11875 parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
11876 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
11877 parsedMessage = (org.openstreetmap.osmosis.osmbinary.Osmformat.Node) e.getUnfinishedMessage();
11878 throw e.unwrapIOException();
11879 } finally {
11880 if (parsedMessage != null) {
11881 mergeFrom(parsedMessage);
11882 }
11883 }
11884 return this;
11885 }
11886 private int bitField0_;
11887
11888 private long id_ ;
11889 /**
11890 * <code>required sint64 id = 1;</code>
11891 * @return Whether the id field is set.
11892 */
11893 @java.lang.Override
11894 public boolean hasId() {
11895 return ((bitField0_ & 0x00000001) != 0);
11896 }
11897 /**
11898 * <code>required sint64 id = 1;</code>
11899 * @return The id.
11900 */
11901 @java.lang.Override
11902 public long getId() {
11903 return id_;
11904 }
11905 /**
11906 * <code>required sint64 id = 1;</code>
11907 * @param value The id to set.
11908 * @return This builder for chaining.
11909 */
11910 public Builder setId(long value) {
11911 bitField0_ |= 0x00000001;
11912 id_ = value;
11913 onChanged();
11914 return this;
11915 }
11916 /**
11917 * <code>required sint64 id = 1;</code>
11918 * @return This builder for chaining.
11919 */
11920 public Builder clearId() {
11921 bitField0_ = (bitField0_ & ~0x00000001);
11922 id_ = 0L;
11923 onChanged();
11924 return this;
11925 }
11926
11927 private com.google.protobuf.Internal.IntList keys_ = emptyIntList();
11928 private void ensureKeysIsMutable() {
11929 if (!((bitField0_ & 0x00000002) != 0)) {
11930 keys_ = mutableCopy(keys_);
11931 bitField0_ |= 0x00000002;
11932 }
11933 }
11934 /**
11935 * <pre>
11936 * Parallel arrays.
11937 * </pre>
11938 *
11939 * <code>repeated uint32 keys = 2 [packed = true];</code>
11940 * @return A list containing the keys.
11941 */
11942 public java.util.List<java.lang.Integer>
11943 getKeysList() {
11944 return ((bitField0_ & 0x00000002) != 0) ?
11945 java.util.Collections.unmodifiableList(keys_) : keys_;
11946 }
11947 /**
11948 * <pre>
11949 * Parallel arrays.
11950 * </pre>
11951 *
11952 * <code>repeated uint32 keys = 2 [packed = true];</code>
11953 * @return The count of keys.
11954 */
11955 public int getKeysCount() {
11956 return keys_.size();
11957 }
11958 /**
11959 * <pre>
11960 * Parallel arrays.
11961 * </pre>
11962 *
11963 * <code>repeated uint32 keys = 2 [packed = true];</code>
11964 * @param index The index of the element to return.
11965 * @return The keys at the given index.
11966 */
11967 public int getKeys(int index) {
11968 return keys_.getInt(index);
11969 }
11970 /**
11971 * <pre>
11972 * Parallel arrays.
11973 * </pre>
11974 *
11975 * <code>repeated uint32 keys = 2 [packed = true];</code>
11976 * @param index The index to set the value at.
11977 * @param value The keys to set.
11978 * @return This builder for chaining.
11979 */
11980 public Builder setKeys(
11981 int index, int value) {
11982 ensureKeysIsMutable();
11983 keys_.setInt(index, value);
11984 onChanged();
11985 return this;
11986 }
11987 /**
11988 * <pre>
11989 * Parallel arrays.
11990 * </pre>
11991 *
11992 * <code>repeated uint32 keys = 2 [packed = true];</code>
11993 * @param value The keys to add.
11994 * @return This builder for chaining.
11995 */
11996 public Builder addKeys(int value) {
11997 ensureKeysIsMutable();
11998 keys_.addInt(value);
11999 onChanged();
12000 return this;
12001 }
12002 /**
12003 * <pre>
12004 * Parallel arrays.
12005 * </pre>
12006 *
12007 * <code>repeated uint32 keys = 2 [packed = true];</code>
12008 * @param values The keys to add.
12009 * @return This builder for chaining.
12010 */
12011 public Builder addAllKeys(
12012 java.lang.Iterable<? extends java.lang.Integer> values) {
12013 ensureKeysIsMutable();
12014 com.google.protobuf.AbstractMessageLite.Builder.addAll(
12015 values, keys_);
12016 onChanged();
12017 return this;
12018 }
12019 /**
12020 * <pre>
12021 * Parallel arrays.
12022 * </pre>
12023 *
12024 * <code>repeated uint32 keys = 2 [packed = true];</code>
12025 * @return This builder for chaining.
12026 */
12027 public Builder clearKeys() {
12028 keys_ = emptyIntList();
12029 bitField0_ = (bitField0_ & ~0x00000002);
12030 onChanged();
12031 return this;
12032 }
12033
12034 private com.google.protobuf.Internal.IntList vals_ = emptyIntList();
12035 private void ensureValsIsMutable() {
12036 if (!((bitField0_ & 0x00000004) != 0)) {
12037 vals_ = mutableCopy(vals_);
12038 bitField0_ |= 0x00000004;
12039 }
12040 }
12041 /**
12042 * <pre>
12043 * String IDs.
12044 * </pre>
12045 *
12046 * <code>repeated uint32 vals = 3 [packed = true];</code>
12047 * @return A list containing the vals.
12048 */
12049 public java.util.List<java.lang.Integer>
12050 getValsList() {
12051 return ((bitField0_ & 0x00000004) != 0) ?
12052 java.util.Collections.unmodifiableList(vals_) : vals_;
12053 }
12054 /**
12055 * <pre>
12056 * String IDs.
12057 * </pre>
12058 *
12059 * <code>repeated uint32 vals = 3 [packed = true];</code>
12060 * @return The count of vals.
12061 */
12062 public int getValsCount() {
12063 return vals_.size();
12064 }
12065 /**
12066 * <pre>
12067 * String IDs.
12068 * </pre>
12069 *
12070 * <code>repeated uint32 vals = 3 [packed = true];</code>
12071 * @param index The index of the element to return.
12072 * @return The vals at the given index.
12073 */
12074 public int getVals(int index) {
12075 return vals_.getInt(index);
12076 }
12077 /**
12078 * <pre>
12079 * String IDs.
12080 * </pre>
12081 *
12082 * <code>repeated uint32 vals = 3 [packed = true];</code>
12083 * @param index The index to set the value at.
12084 * @param value The vals to set.
12085 * @return This builder for chaining.
12086 */
12087 public Builder setVals(
12088 int index, int value) {
12089 ensureValsIsMutable();
12090 vals_.setInt(index, value);
12091 onChanged();
12092 return this;
12093 }
12094 /**
12095 * <pre>
12096 * String IDs.
12097 * </pre>
12098 *
12099 * <code>repeated uint32 vals = 3 [packed = true];</code>
12100 * @param value The vals to add.
12101 * @return This builder for chaining.
12102 */
12103 public Builder addVals(int value) {
12104 ensureValsIsMutable();
12105 vals_.addInt(value);
12106 onChanged();
12107 return this;
12108 }
12109 /**
12110 * <pre>
12111 * String IDs.
12112 * </pre>
12113 *
12114 * <code>repeated uint32 vals = 3 [packed = true];</code>
12115 * @param values The vals to add.
12116 * @return This builder for chaining.
12117 */
12118 public Builder addAllVals(
12119 java.lang.Iterable<? extends java.lang.Integer> values) {
12120 ensureValsIsMutable();
12121 com.google.protobuf.AbstractMessageLite.Builder.addAll(
12122 values, vals_);
12123 onChanged();
12124 return this;
12125 }
12126 /**
12127 * <pre>
12128 * String IDs.
12129 * </pre>
12130 *
12131 * <code>repeated uint32 vals = 3 [packed = true];</code>
12132 * @return This builder for chaining.
12133 */
12134 public Builder clearVals() {
12135 vals_ = emptyIntList();
12136 bitField0_ = (bitField0_ & ~0x00000004);
12137 onChanged();
12138 return this;
12139 }
12140
12141 private org.openstreetmap.osmosis.osmbinary.Osmformat.Info info_;
12142 private com.google.protobuf.SingleFieldBuilderV3<
12143 org.openstreetmap.osmosis.osmbinary.Osmformat.Info, org.openstreetmap.osmosis.osmbinary.Osmformat.Info.Builder, org.openstreetmap.osmosis.osmbinary.Osmformat.InfoOrBuilder> infoBuilder_;
12144 /**
12145 * <pre>
12146 * May be omitted in omitmeta
12147 * </pre>
12148 *
12149 * <code>optional .OSMPBF.Info info = 4;</code>
12150 * @return Whether the info field is set.
12151 */
12152 public boolean hasInfo() {
12153 return ((bitField0_ & 0x00000008) != 0);
12154 }
12155 /**
12156 * <pre>
12157 * May be omitted in omitmeta
12158 * </pre>
12159 *
12160 * <code>optional .OSMPBF.Info info = 4;</code>
12161 * @return The info.
12162 */
12163 public org.openstreetmap.osmosis.osmbinary.Osmformat.Info getInfo() {
12164 if (infoBuilder_ == null) {
12165 return info_ == null ? org.openstreetmap.osmosis.osmbinary.Osmformat.Info.getDefaultInstance() : info_;
12166 } else {
12167 return infoBuilder_.getMessage();
12168 }
12169 }
12170 /**
12171 * <pre>
12172 * May be omitted in omitmeta
12173 * </pre>
12174 *
12175 * <code>optional .OSMPBF.Info info = 4;</code>
12176 */
12177 public Builder setInfo(org.openstreetmap.osmosis.osmbinary.Osmformat.Info value) {
12178 if (infoBuilder_ == null) {
12179 if (value == null) {
12180 throw new NullPointerException();
12181 }
12182 info_ = value;
12183 onChanged();
12184 } else {
12185 infoBuilder_.setMessage(value);
12186 }
12187 bitField0_ |= 0x00000008;
12188 return this;
12189 }
12190 /**
12191 * <pre>
12192 * May be omitted in omitmeta
12193 * </pre>
12194 *
12195 * <code>optional .OSMPBF.Info info = 4;</code>
12196 */
12197 public Builder setInfo(
12198 org.openstreetmap.osmosis.osmbinary.Osmformat.Info.Builder builderForValue) {
12199 if (infoBuilder_ == null) {
12200 info_ = builderForValue.build();
12201 onChanged();
12202 } else {
12203 infoBuilder_.setMessage(builderForValue.build());
12204 }
12205 bitField0_ |= 0x00000008;
12206 return this;
12207 }
12208 /**
12209 * <pre>
12210 * May be omitted in omitmeta
12211 * </pre>
12212 *
12213 * <code>optional .OSMPBF.Info info = 4;</code>
12214 */
12215 public Builder mergeInfo(org.openstreetmap.osmosis.osmbinary.Osmformat.Info value) {
12216 if (infoBuilder_ == null) {
12217 if (((bitField0_ & 0x00000008) != 0) &&
12218 info_ != null &&
12219 info_ != org.openstreetmap.osmosis.osmbinary.Osmformat.Info.getDefaultInstance()) {
12220 info_ =
12221 org.openstreetmap.osmosis.osmbinary.Osmformat.Info.newBuilder(info_).mergeFrom(value).buildPartial();
12222 } else {
12223 info_ = value;
12224 }
12225 onChanged();
12226 } else {
12227 infoBuilder_.mergeFrom(value);
12228 }
12229 bitField0_ |= 0x00000008;
12230 return this;
12231 }
12232 /**
12233 * <pre>
12234 * May be omitted in omitmeta
12235 * </pre>
12236 *
12237 * <code>optional .OSMPBF.Info info = 4;</code>
12238 */
12239 public Builder clearInfo() {
12240 if (infoBuilder_ == null) {
12241 info_ = null;
12242 onChanged();
12243 } else {
12244 infoBuilder_.clear();
12245 }
12246 bitField0_ = (bitField0_ & ~0x00000008);
12247 return this;
12248 }
12249 /**
12250 * <pre>
12251 * May be omitted in omitmeta
12252 * </pre>
12253 *
12254 * <code>optional .OSMPBF.Info info = 4;</code>
12255 */
12256 public org.openstreetmap.osmosis.osmbinary.Osmformat.Info.Builder getInfoBuilder() {
12257 bitField0_ |= 0x00000008;
12258 onChanged();
12259 return getInfoFieldBuilder().getBuilder();
12260 }
12261 /**
12262 * <pre>
12263 * May be omitted in omitmeta
12264 * </pre>
12265 *
12266 * <code>optional .OSMPBF.Info info = 4;</code>
12267 */
12268 public org.openstreetmap.osmosis.osmbinary.Osmformat.InfoOrBuilder getInfoOrBuilder() {
12269 if (infoBuilder_ != null) {
12270 return infoBuilder_.getMessageOrBuilder();
12271 } else {
12272 return info_ == null ?
12273 org.openstreetmap.osmosis.osmbinary.Osmformat.Info.getDefaultInstance() : info_;
12274 }
12275 }
12276 /**
12277 * <pre>
12278 * May be omitted in omitmeta
12279 * </pre>
12280 *
12281 * <code>optional .OSMPBF.Info info = 4;</code>
12282 */
12283 private com.google.protobuf.SingleFieldBuilderV3<
12284 org.openstreetmap.osmosis.osmbinary.Osmformat.Info, org.openstreetmap.osmosis.osmbinary.Osmformat.Info.Builder, org.openstreetmap.osmosis.osmbinary.Osmformat.InfoOrBuilder>
12285 getInfoFieldBuilder() {
12286 if (infoBuilder_ == null) {
12287 infoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
12288 org.openstreetmap.osmosis.osmbinary.Osmformat.Info, org.openstreetmap.osmosis.osmbinary.Osmformat.Info.Builder, org.openstreetmap.osmosis.osmbinary.Osmformat.InfoOrBuilder>(
12289 getInfo(),
12290 getParentForChildren(),
12291 isClean());
12292 info_ = null;
12293 }
12294 return infoBuilder_;
12295 }
12296
12297 private long lat_ ;
12298 /**
12299 * <code>required sint64 lat = 8;</code>
12300 * @return Whether the lat field is set.
12301 */
12302 @java.lang.Override
12303 public boolean hasLat() {
12304 return ((bitField0_ & 0x00000010) != 0);
12305 }
12306 /**
12307 * <code>required sint64 lat = 8;</code>
12308 * @return The lat.
12309 */
12310 @java.lang.Override
12311 public long getLat() {
12312 return lat_;
12313 }
12314 /**
12315 * <code>required sint64 lat = 8;</code>
12316 * @param value The lat to set.
12317 * @return This builder for chaining.
12318 */
12319 public Builder setLat(long value) {
12320 bitField0_ |= 0x00000010;
12321 lat_ = value;
12322 onChanged();
12323 return this;
12324 }
12325 /**
12326 * <code>required sint64 lat = 8;</code>
12327 * @return This builder for chaining.
12328 */
12329 public Builder clearLat() {
12330 bitField0_ = (bitField0_ & ~0x00000010);
12331 lat_ = 0L;
12332 onChanged();
12333 return this;
12334 }
12335
12336 private long lon_ ;
12337 /**
12338 * <code>required sint64 lon = 9;</code>
12339 * @return Whether the lon field is set.
12340 */
12341 @java.lang.Override
12342 public boolean hasLon() {
12343 return ((bitField0_ & 0x00000020) != 0);
12344 }
12345 /**
12346 * <code>required sint64 lon = 9;</code>
12347 * @return The lon.
12348 */
12349 @java.lang.Override
12350 public long getLon() {
12351 return lon_;
12352 }
12353 /**
12354 * <code>required sint64 lon = 9;</code>
12355 * @param value The lon to set.
12356 * @return This builder for chaining.
12357 */
12358 public Builder setLon(long value) {
12359 bitField0_ |= 0x00000020;
12360 lon_ = value;
12361 onChanged();
12362 return this;
12363 }
12364 /**
12365 * <code>required sint64 lon = 9;</code>
12366 * @return This builder for chaining.
12367 */
12368 public Builder clearLon() {
12369 bitField0_ = (bitField0_ & ~0x00000020);
12370 lon_ = 0L;
12371 onChanged();
12372 return this;
12373 }
12374 @java.lang.Override
12375 public final Builder setUnknownFields(
12376 final com.google.protobuf.UnknownFieldSet unknownFields) {
12377 return super.setUnknownFields(unknownFields);
12378 }
12379
12380 @java.lang.Override
12381 public final Builder mergeUnknownFields(
12382 final com.google.protobuf.UnknownFieldSet unknownFields) {
12383 return super.mergeUnknownFields(unknownFields);
12384 }
12385
12386
12387 // @@protoc_insertion_point(builder_scope:OSMPBF.Node)
12388 }
12389
12390 // @@protoc_insertion_point(class_scope:OSMPBF.Node)
12391 private static final org.openstreetmap.osmosis.osmbinary.Osmformat.Node DEFAULT_INSTANCE;
12392 static {
12393 DEFAULT_INSTANCE = new org.openstreetmap.osmosis.osmbinary.Osmformat.Node();
12394 }
12395
12396 public static org.openstreetmap.osmosis.osmbinary.Osmformat.Node getDefaultInstance() {
12397 return DEFAULT_INSTANCE;
12398 }
12399
12400 @java.lang.Deprecated public static final com.google.protobuf.Parser<Node>
12401 PARSER = new com.google.protobuf.AbstractParser<Node>() {
12402 @java.lang.Override
12403 public Node parsePartialFrom(
12404 com.google.protobuf.CodedInputStream input,
12405 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
12406 throws com.google.protobuf.InvalidProtocolBufferException {
12407 return new Node(input, extensionRegistry);
12408 }
12409 };
12410
12411 public static com.google.protobuf.Parser<Node> parser() {
12412 return PARSER;
12413 }
12414
12415 @java.lang.Override
12416 public com.google.protobuf.Parser<Node> getParserForType() {
12417 return PARSER;
12418 }
12419
12420 @java.lang.Override
12421 public org.openstreetmap.osmosis.osmbinary.Osmformat.Node getDefaultInstanceForType() {
12422 return DEFAULT_INSTANCE;
12423 }
12424
12425 }
12426
12427 public interface DenseNodesOrBuilder extends
12428 // @@protoc_insertion_point(interface_extends:OSMPBF.DenseNodes)
12429 com.google.protobuf.MessageOrBuilder {
12430
12431 /**
12432 * <pre>
12433 * DELTA coded
12434 * </pre>
12435 *
12436 * <code>repeated sint64 id = 1 [packed = true];</code>
12437 * @return A list containing the id.
12438 */
12439 java.util.List<java.lang.Long> getIdList();
12440 /**
12441 * <pre>
12442 * DELTA coded
12443 * </pre>
12444 *
12445 * <code>repeated sint64 id = 1 [packed = true];</code>
12446 * @return The count of id.
12447 */
12448 int getIdCount();
12449 /**
12450 * <pre>
12451 * DELTA coded
12452 * </pre>
12453 *
12454 * <code>repeated sint64 id = 1 [packed = true];</code>
12455 * @param index The index of the element to return.
12456 * @return The id at the given index.
12457 */
12458 long getId(int index);
12459
12460 /**
12461 * <pre>
12462 *repeated Info info = 4;
12463 * </pre>
12464 *
12465 * <code>optional .OSMPBF.DenseInfo denseinfo = 5;</code>
12466 * @return Whether the denseinfo field is set.
12467 */
12468 boolean hasDenseinfo();
12469 /**
12470 * <pre>
12471 *repeated Info info = 4;
12472 * </pre>
12473 *
12474 * <code>optional .OSMPBF.DenseInfo denseinfo = 5;</code>
12475 * @return The denseinfo.
12476 */
12477 org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo getDenseinfo();
12478 /**
12479 * <pre>
12480 *repeated Info info = 4;
12481 * </pre>
12482 *
12483 * <code>optional .OSMPBF.DenseInfo denseinfo = 5;</code>
12484 */
12485 org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfoOrBuilder getDenseinfoOrBuilder();
12486
12487 /**
12488 * <pre>
12489 * DELTA coded
12490 * </pre>
12491 *
12492 * <code>repeated sint64 lat = 8 [packed = true];</code>
12493 * @return A list containing the lat.
12494 */
12495 java.util.List<java.lang.Long> getLatList();
12496 /**
12497 * <pre>
12498 * DELTA coded
12499 * </pre>
12500 *
12501 * <code>repeated sint64 lat = 8 [packed = true];</code>
12502 * @return The count of lat.
12503 */
12504 int getLatCount();
12505 /**
12506 * <pre>
12507 * DELTA coded
12508 * </pre>
12509 *
12510 * <code>repeated sint64 lat = 8 [packed = true];</code>
12511 * @param index The index of the element to return.
12512 * @return The lat at the given index.
12513 */
12514 long getLat(int index);
12515
12516 /**
12517 * <pre>
12518 * DELTA coded
12519 * </pre>
12520 *
12521 * <code>repeated sint64 lon = 9 [packed = true];</code>
12522 * @return A list containing the lon.
12523 */
12524 java.util.List<java.lang.Long> getLonList();
12525 /**
12526 * <pre>
12527 * DELTA coded
12528 * </pre>
12529 *
12530 * <code>repeated sint64 lon = 9 [packed = true];</code>
12531 * @return The count of lon.
12532 */
12533 int getLonCount();
12534 /**
12535 * <pre>
12536 * DELTA coded
12537 * </pre>
12538 *
12539 * <code>repeated sint64 lon = 9 [packed = true];</code>
12540 * @param index The index of the element to return.
12541 * @return The lon at the given index.
12542 */
12543 long getLon(int index);
12544
12545 /**
12546 * <pre>
12547 * Special packing of keys and vals into one array. May be empty if all nodes in this block are tagless.
12548 * </pre>
12549 *
12550 * <code>repeated int32 keys_vals = 10 [packed = true];</code>
12551 * @return A list containing the keysVals.
12552 */
12553 java.util.List<java.lang.Integer> getKeysValsList();
12554 /**
12555 * <pre>
12556 * Special packing of keys and vals into one array. May be empty if all nodes in this block are tagless.
12557 * </pre>
12558 *
12559 * <code>repeated int32 keys_vals = 10 [packed = true];</code>
12560 * @return The count of keysVals.
12561 */
12562 int getKeysValsCount();
12563 /**
12564 * <pre>
12565 * Special packing of keys and vals into one array. May be empty if all nodes in this block are tagless.
12566 * </pre>
12567 *
12568 * <code>repeated int32 keys_vals = 10 [packed = true];</code>
12569 * @param index The index of the element to return.
12570 * @return The keysVals at the given index.
12571 */
12572 int getKeysVals(int index);
12573 }
12574 /**
12575 * Protobuf type {@code OSMPBF.DenseNodes}
12576 */
12577 public static final class DenseNodes extends
12578 com.google.protobuf.GeneratedMessageV3 implements
12579 // @@protoc_insertion_point(message_implements:OSMPBF.DenseNodes)
12580 DenseNodesOrBuilder {
12581 private static final long serialVersionUID = 0L;
12582 // Use DenseNodes.newBuilder() to construct.
12583 private DenseNodes(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
12584 super(builder);
12585 }
12586 private DenseNodes() {
12587 id_ = emptyLongList();
12588 lat_ = emptyLongList();
12589 lon_ = emptyLongList();
12590 keysVals_ = emptyIntList();
12591 }
12592
12593 @java.lang.Override
12594 @SuppressWarnings({"unused"})
12595 protected java.lang.Object newInstance(
12596 UnusedPrivateParameter unused) {
12597 return new DenseNodes();
12598 }
12599
12600 @java.lang.Override
12601 public final com.google.protobuf.UnknownFieldSet
12602 getUnknownFields() {
12603 return this.unknownFields;
12604 }
12605 private DenseNodes(
12606 com.google.protobuf.CodedInputStream input,
12607 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
12608 throws com.google.protobuf.InvalidProtocolBufferException {
12609 this();
12610 if (extensionRegistry == null) {
12611 throw new java.lang.NullPointerException();
12612 }
12613 int mutable_bitField0_ = 0;
12614 com.google.protobuf.UnknownFieldSet.Builder unknownFields =
12615 com.google.protobuf.UnknownFieldSet.newBuilder();
12616 try {
12617 boolean done = false;
12618 while (!done) {
12619 int tag = input.readTag();
12620 switch (tag) {
12621 case 0:
12622 done = true;
12623 break;
12624 case 8: {
12625 if (!((mutable_bitField0_ & 0x00000001) != 0)) {
12626 id_ = newLongList();
12627 mutable_bitField0_ |= 0x00000001;
12628 }
12629 id_.addLong(input.readSInt64());
12630 break;
12631 }
12632 case 10: {
12633 int length = input.readRawVarint32();
12634 int limit = input.pushLimit(length);
12635 if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) {
12636 id_ = newLongList();
12637 mutable_bitField0_ |= 0x00000001;
12638 }
12639 while (input.getBytesUntilLimit() > 0) {
12640 id_.addLong(input.readSInt64());
12641 }
12642 input.popLimit(limit);
12643 break;
12644 }
12645 case 42: {
12646 org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo.Builder subBuilder = null;
12647 if (((bitField0_ & 0x00000001) != 0)) {
12648 subBuilder = denseinfo_.toBuilder();
12649 }
12650 denseinfo_ = input.readMessage(org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo.PARSER, extensionRegistry);
12651 if (subBuilder != null) {
12652 subBuilder.mergeFrom(denseinfo_);
12653 denseinfo_ = subBuilder.buildPartial();
12654 }
12655 bitField0_ |= 0x00000001;
12656 break;
12657 }
12658 case 64: {
12659 if (!((mutable_bitField0_ & 0x00000004) != 0)) {
12660 lat_ = newLongList();
12661 mutable_bitField0_ |= 0x00000004;
12662 }
12663 lat_.addLong(input.readSInt64());
12664 break;
12665 }
12666 case 66: {
12667 int length = input.readRawVarint32();
12668 int limit = input.pushLimit(length);
12669 if (!((mutable_bitField0_ & 0x00000004) != 0) && input.getBytesUntilLimit() > 0) {
12670 lat_ = newLongList();
12671 mutable_bitField0_ |= 0x00000004;
12672 }
12673 while (input.getBytesUntilLimit() > 0) {
12674 lat_.addLong(input.readSInt64());
12675 }
12676 input.popLimit(limit);
12677 break;
12678 }
12679 case 72: {
12680 if (!((mutable_bitField0_ & 0x00000008) != 0)) {
12681 lon_ = newLongList();
12682 mutable_bitField0_ |= 0x00000008;
12683 }
12684 lon_.addLong(input.readSInt64());
12685 break;
12686 }
12687 case 74: {
12688 int length = input.readRawVarint32();
12689 int limit = input.pushLimit(length);
12690 if (!((mutable_bitField0_ & 0x00000008) != 0) && input.getBytesUntilLimit() > 0) {
12691 lon_ = newLongList();
12692 mutable_bitField0_ |= 0x00000008;
12693 }
12694 while (input.getBytesUntilLimit() > 0) {
12695 lon_.addLong(input.readSInt64());
12696 }
12697 input.popLimit(limit);
12698 break;
12699 }
12700 case 80: {
12701 if (!((mutable_bitField0_ & 0x00000010) != 0)) {
12702 keysVals_ = newIntList();
12703 mutable_bitField0_ |= 0x00000010;
12704 }
12705 keysVals_.addInt(input.readInt32());
12706 break;
12707 }
12708 case 82: {
12709 int length = input.readRawVarint32();
12710 int limit = input.pushLimit(length);
12711 if (!((mutable_bitField0_ & 0x00000010) != 0) && input.getBytesUntilLimit() > 0) {
12712 keysVals_ = newIntList();
12713 mutable_bitField0_ |= 0x00000010;
12714 }
12715 while (input.getBytesUntilLimit() > 0) {
12716 keysVals_.addInt(input.readInt32());
12717 }
12718 input.popLimit(limit);
12719 break;
12720 }
12721 default: {
12722 if (!parseUnknownField(
12723 input, unknownFields, extensionRegistry, tag)) {
12724 done = true;
12725 }
12726 break;
12727 }
12728 }
12729 }
12730 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
12731 throw e.setUnfinishedMessage(this);
12732 } catch (java.io.IOException e) {
12733 throw new com.google.protobuf.InvalidProtocolBufferException(
12734 e).setUnfinishedMessage(this);
12735 } finally {
12736 if (((mutable_bitField0_ & 0x00000001) != 0)) {
12737 id_.makeImmutable(); // C
12738 }
12739 if (((mutable_bitField0_ & 0x00000004) != 0)) {
12740 lat_.makeImmutable(); // C
12741 }
12742 if (((mutable_bitField0_ & 0x00000008) != 0)) {
12743 lon_.makeImmutable(); // C
12744 }
12745 if (((mutable_bitField0_ & 0x00000010) != 0)) {
12746 keysVals_.makeImmutable(); // C
12747 }
12748 this.unknownFields = unknownFields.build();
12749 makeExtensionsImmutable();
12750 }
12751 }
12752 public static final com.google.protobuf.Descriptors.Descriptor
12753 getDescriptor() {
12754 return org.openstreetmap.osmosis.osmbinary.Osmformat.internal_static_OSMPBF_DenseNodes_descriptor;
12755 }
12756
12757 @java.lang.Override
12758 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
12759 internalGetFieldAccessorTable() {
12760 return org.openstreetmap.osmosis.osmbinary.Osmformat.internal_static_OSMPBF_DenseNodes_fieldAccessorTable
12761 .ensureFieldAccessorsInitialized(
12762 org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes.class, org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes.Builder.class);
12763 }
12764
12765 private int bitField0_;
12766 public static final int ID_FIELD_NUMBER = 1;
12767 private com.google.protobuf.Internal.LongList id_;
12768 /**
12769 * <pre>
12770 * DELTA coded
12771 * </pre>
12772 *
12773 * <code>repeated sint64 id = 1 [packed = true];</code>
12774 * @return A list containing the id.
12775 */
12776 @java.lang.Override
12777 public java.util.List<java.lang.Long>
12778 getIdList() {
12779 return id_;
12780 }
12781 /**
12782 * <pre>
12783 * DELTA coded
12784 * </pre>
12785 *
12786 * <code>repeated sint64 id = 1 [packed = true];</code>
12787 * @return The count of id.
12788 */
12789 public int getIdCount() {
12790 return id_.size();
12791 }
12792 /**
12793 * <pre>
12794 * DELTA coded
12795 * </pre>
12796 *
12797 * <code>repeated sint64 id = 1 [packed = true];</code>
12798 * @param index The index of the element to return.
12799 * @return The id at the given index.
12800 */
12801 public long getId(int index) {
12802 return id_.getLong(index);
12803 }
12804 private int idMemoizedSerializedSize = -1;
12805
12806 public static final int DENSEINFO_FIELD_NUMBER = 5;
12807 private org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo denseinfo_;
12808 /**
12809 * <pre>
12810 *repeated Info info = 4;
12811 * </pre>
12812 *
12813 * <code>optional .OSMPBF.DenseInfo denseinfo = 5;</code>
12814 * @return Whether the denseinfo field is set.
12815 */
12816 @java.lang.Override
12817 public boolean hasDenseinfo() {
12818 return ((bitField0_ & 0x00000001) != 0);
12819 }
12820 /**
12821 * <pre>
12822 *repeated Info info = 4;
12823 * </pre>
12824 *
12825 * <code>optional .OSMPBF.DenseInfo denseinfo = 5;</code>
12826 * @return The denseinfo.
12827 */
12828 @java.lang.Override
12829 public org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo getDenseinfo() {
12830 return denseinfo_ == null ? org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo.getDefaultInstance() : denseinfo_;
12831 }
12832 /**
12833 * <pre>
12834 *repeated Info info = 4;
12835 * </pre>
12836 *
12837 * <code>optional .OSMPBF.DenseInfo denseinfo = 5;</code>
12838 */
12839 @java.lang.Override
12840 public org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfoOrBuilder getDenseinfoOrBuilder() {
12841 return denseinfo_ == null ? org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo.getDefaultInstance() : denseinfo_;
12842 }
12843
12844 public static final int LAT_FIELD_NUMBER = 8;
12845 private com.google.protobuf.Internal.LongList lat_;
12846 /**
12847 * <pre>
12848 * DELTA coded
12849 * </pre>
12850 *
12851 * <code>repeated sint64 lat = 8 [packed = true];</code>
12852 * @return A list containing the lat.
12853 */
12854 @java.lang.Override
12855 public java.util.List<java.lang.Long>
12856 getLatList() {
12857 return lat_;
12858 }
12859 /**
12860 * <pre>
12861 * DELTA coded
12862 * </pre>
12863 *
12864 * <code>repeated sint64 lat = 8 [packed = true];</code>
12865 * @return The count of lat.
12866 */
12867 public int getLatCount() {
12868 return lat_.size();
12869 }
12870 /**
12871 * <pre>
12872 * DELTA coded
12873 * </pre>
12874 *
12875 * <code>repeated sint64 lat = 8 [packed = true];</code>
12876 * @param index The index of the element to return.
12877 * @return The lat at the given index.
12878 */
12879 public long getLat(int index) {
12880 return lat_.getLong(index);
12881 }
12882 private int latMemoizedSerializedSize = -1;
12883
12884 public static final int LON_FIELD_NUMBER = 9;
12885 private com.google.protobuf.Internal.LongList lon_;
12886 /**
12887 * <pre>
12888 * DELTA coded
12889 * </pre>
12890 *
12891 * <code>repeated sint64 lon = 9 [packed = true];</code>
12892 * @return A list containing the lon.
12893 */
12894 @java.lang.Override
12895 public java.util.List<java.lang.Long>
12896 getLonList() {
12897 return lon_;
12898 }
12899 /**
12900 * <pre>
12901 * DELTA coded
12902 * </pre>
12903 *
12904 * <code>repeated sint64 lon = 9 [packed = true];</code>
12905 * @return The count of lon.
12906 */
12907 public int getLonCount() {
12908 return lon_.size();
12909 }
12910 /**
12911 * <pre>
12912 * DELTA coded
12913 * </pre>
12914 *
12915 * <code>repeated sint64 lon = 9 [packed = true];</code>
12916 * @param index The index of the element to return.
12917 * @return The lon at the given index.
12918 */
12919 public long getLon(int index) {
12920 return lon_.getLong(index);
12921 }
12922 private int lonMemoizedSerializedSize = -1;
12923
12924 public static final int KEYS_VALS_FIELD_NUMBER = 10;
12925 private com.google.protobuf.Internal.IntList keysVals_;
12926 /**
12927 * <pre>
12928 * Special packing of keys and vals into one array. May be empty if all nodes in this block are tagless.
12929 * </pre>
12930 *
12931 * <code>repeated int32 keys_vals = 10 [packed = true];</code>
12932 * @return A list containing the keysVals.
12933 */
12934 @java.lang.Override
12935 public java.util.List<java.lang.Integer>
12936 getKeysValsList() {
12937 return keysVals_;
12938 }
12939 /**
12940 * <pre>
12941 * Special packing of keys and vals into one array. May be empty if all nodes in this block are tagless.
12942 * </pre>
12943 *
12944 * <code>repeated int32 keys_vals = 10 [packed = true];</code>
12945 * @return The count of keysVals.
12946 */
12947 public int getKeysValsCount() {
12948 return keysVals_.size();
12949 }
12950 /**
12951 * <pre>
12952 * Special packing of keys and vals into one array. May be empty if all nodes in this block are tagless.
12953 * </pre>
12954 *
12955 * <code>repeated int32 keys_vals = 10 [packed = true];</code>
12956 * @param index The index of the element to return.
12957 * @return The keysVals at the given index.
12958 */
12959 public int getKeysVals(int index) {
12960 return keysVals_.getInt(index);
12961 }
12962 private int keysValsMemoizedSerializedSize = -1;
12963
12964 private byte memoizedIsInitialized = -1;
12965 @java.lang.Override
12966 public final boolean isInitialized() {
12967 byte isInitialized = memoizedIsInitialized;
12968 if (isInitialized == 1) return true;
12969 if (isInitialized == 0) return false;
12970
12971 memoizedIsInitialized = 1;
12972 return true;
12973 }
12974
12975 @java.lang.Override
12976 public void writeTo(com.google.protobuf.CodedOutputStream output)
12977 throws java.io.IOException {
12978 getSerializedSize();
12979 if (getIdList().size() > 0) {
12980 output.writeUInt32NoTag(10);
12981 output.writeUInt32NoTag(idMemoizedSerializedSize);
12982 }
12983 for (int i = 0; i < id_.size(); i++) {
12984 output.writeSInt64NoTag(id_.getLong(i));
12985 }
12986 if (((bitField0_ & 0x00000001) != 0)) {
12987 output.writeMessage(5, getDenseinfo());
12988 }
12989 if (getLatList().size() > 0) {
12990 output.writeUInt32NoTag(66);
12991 output.writeUInt32NoTag(latMemoizedSerializedSize);
12992 }
12993 for (int i = 0; i < lat_.size(); i++) {
12994 output.writeSInt64NoTag(lat_.getLong(i));
12995 }
12996 if (getLonList().size() > 0) {
12997 output.writeUInt32NoTag(74);
12998 output.writeUInt32NoTag(lonMemoizedSerializedSize);
12999 }
13000 for (int i = 0; i < lon_.size(); i++) {
13001 output.writeSInt64NoTag(lon_.getLong(i));
13002 }
13003 if (getKeysValsList().size() > 0) {
13004 output.writeUInt32NoTag(82);
13005 output.writeUInt32NoTag(keysValsMemoizedSerializedSize);
13006 }
13007 for (int i = 0; i < keysVals_.size(); i++) {
13008 output.writeInt32NoTag(keysVals_.getInt(i));
13009 }
13010 unknownFields.writeTo(output);
13011 }
13012
13013 @java.lang.Override
13014 public int getSerializedSize() {
13015 int size = memoizedSize;
13016 if (size != -1) return size;
13017
13018 size = 0;
13019 {
13020 int dataSize = 0;
13021 for (int i = 0; i < id_.size(); i++) {
13022 dataSize += com.google.protobuf.CodedOutputStream
13023 .computeSInt64SizeNoTag(id_.getLong(i));
13024 }
13025 size += dataSize;
13026 if (!getIdList().isEmpty()) {
13027 size += 1;
13028 size += com.google.protobuf.CodedOutputStream
13029 .computeInt32SizeNoTag(dataSize);
13030 }
13031 idMemoizedSerializedSize = dataSize;
13032 }
13033 if (((bitField0_ & 0x00000001) != 0)) {
13034 size += com.google.protobuf.CodedOutputStream
13035 .computeMessageSize(5, getDenseinfo());
13036 }
13037 {
13038 int dataSize = 0;
13039 for (int i = 0; i < lat_.size(); i++) {
13040 dataSize += com.google.protobuf.CodedOutputStream
13041 .computeSInt64SizeNoTag(lat_.getLong(i));
13042 }
13043 size += dataSize;
13044 if (!getLatList().isEmpty()) {
13045 size += 1;
13046 size += com.google.protobuf.CodedOutputStream
13047 .computeInt32SizeNoTag(dataSize);
13048 }
13049 latMemoizedSerializedSize = dataSize;
13050 }
13051 {
13052 int dataSize = 0;
13053 for (int i = 0; i < lon_.size(); i++) {
13054 dataSize += com.google.protobuf.CodedOutputStream
13055 .computeSInt64SizeNoTag(lon_.getLong(i));
13056 }
13057 size += dataSize;
13058 if (!getLonList().isEmpty()) {
13059 size += 1;
13060 size += com.google.protobuf.CodedOutputStream
13061 .computeInt32SizeNoTag(dataSize);
13062 }
13063 lonMemoizedSerializedSize = dataSize;
13064 }
13065 {
13066 int dataSize = 0;
13067 for (int i = 0; i < keysVals_.size(); i++) {
13068 dataSize += com.google.protobuf.CodedOutputStream
13069 .computeInt32SizeNoTag(keysVals_.getInt(i));
13070 }
13071 size += dataSize;
13072 if (!getKeysValsList().isEmpty()) {
13073 size += 1;
13074 size += com.google.protobuf.CodedOutputStream
13075 .computeInt32SizeNoTag(dataSize);
13076 }
13077 keysValsMemoizedSerializedSize = dataSize;
13078 }
13079 size += unknownFields.getSerializedSize();
13080 memoizedSize = size;
13081 return size;
13082 }
13083
13084 @java.lang.Override
13085 public boolean equals(final java.lang.Object obj) {
13086 if (obj == this) {
13087 return true;
13088 }
13089 if (!(obj instanceof org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes)) {
13090 return super.equals(obj);
13091 }
13092 org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes other = (org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes) obj;
13093
13094 if (!getIdList()
13095 .equals(other.getIdList())) return false;
13096 if (hasDenseinfo() != other.hasDenseinfo()) return false;
13097 if (hasDenseinfo()) {
13098 if (!getDenseinfo()
13099 .equals(other.getDenseinfo())) return false;
13100 }
13101 if (!getLatList()
13102 .equals(other.getLatList())) return false;
13103 if (!getLonList()
13104 .equals(other.getLonList())) return false;
13105 if (!getKeysValsList()
13106 .equals(other.getKeysValsList())) return false;
13107 if (!unknownFields.equals(other.unknownFields)) return false;
13108 return true;
13109 }
13110
13111 @java.lang.Override
13112 public int hashCode() {
13113 if (memoizedHashCode != 0) {
13114 return memoizedHashCode;
13115 }
13116 int hash = 41;
13117 hash = (19 * hash) + getDescriptor().hashCode();
13118 if (getIdCount() > 0) {
13119 hash = (37 * hash) + ID_FIELD_NUMBER;
13120 hash = (53 * hash) + getIdList().hashCode();
13121 }
13122 if (hasDenseinfo()) {
13123 hash = (37 * hash) + DENSEINFO_FIELD_NUMBER;
13124 hash = (53 * hash) + getDenseinfo().hashCode();
13125 }
13126 if (getLatCount() > 0) {
13127 hash = (37 * hash) + LAT_FIELD_NUMBER;
13128 hash = (53 * hash) + getLatList().hashCode();
13129 }
13130 if (getLonCount() > 0) {
13131 hash = (37 * hash) + LON_FIELD_NUMBER;
13132 hash = (53 * hash) + getLonList().hashCode();
13133 }
13134 if (getKeysValsCount() > 0) {
13135 hash = (37 * hash) + KEYS_VALS_FIELD_NUMBER;
13136 hash = (53 * hash) + getKeysValsList().hashCode();
13137 }
13138 hash = (29 * hash) + unknownFields.hashCode();
13139 memoizedHashCode = hash;
13140 return hash;
13141 }
13142
13143 public static org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes parseFrom(
13144 java.nio.ByteBuffer data)
13145 throws com.google.protobuf.InvalidProtocolBufferException {
13146 return PARSER.parseFrom(data);
13147 }
13148 public static org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes parseFrom(
13149 java.nio.ByteBuffer data,
13150 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
13151 throws com.google.protobuf.InvalidProtocolBufferException {
13152 return PARSER.parseFrom(data, extensionRegistry);
13153 }
13154 public static org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes parseFrom(
13155 com.google.protobuf.ByteString data)
13156 throws com.google.protobuf.InvalidProtocolBufferException {
13157 return PARSER.parseFrom(data);
13158 }
13159 public static org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes parseFrom(
13160 com.google.protobuf.ByteString data,
13161 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
13162 throws com.google.protobuf.InvalidProtocolBufferException {
13163 return PARSER.parseFrom(data, extensionRegistry);
13164 }
13165 public static org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes parseFrom(byte[] data)
13166 throws com.google.protobuf.InvalidProtocolBufferException {
13167 return PARSER.parseFrom(data);
13168 }
13169 public static org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes parseFrom(
13170 byte[] data,
13171 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
13172 throws com.google.protobuf.InvalidProtocolBufferException {
13173 return PARSER.parseFrom(data, extensionRegistry);
13174 }
13175 public static org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes parseFrom(java.io.InputStream input)
13176 throws java.io.IOException {
13177 return com.google.protobuf.GeneratedMessageV3
13178 .parseWithIOException(PARSER, input);
13179 }
13180 public static org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes parseFrom(
13181 java.io.InputStream input,
13182 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
13183 throws java.io.IOException {
13184 return com.google.protobuf.GeneratedMessageV3
13185 .parseWithIOException(PARSER, input, extensionRegistry);
13186 }
13187 public static org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes parseDelimitedFrom(java.io.InputStream input)
13188 throws java.io.IOException {
13189 return com.google.protobuf.GeneratedMessageV3
13190 .parseDelimitedWithIOException(PARSER, input);
13191 }
13192 public static org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes parseDelimitedFrom(
13193 java.io.InputStream input,
13194 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
13195 throws java.io.IOException {
13196 return com.google.protobuf.GeneratedMessageV3
13197 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
13198 }
13199 public static org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes parseFrom(
13200 com.google.protobuf.CodedInputStream input)
13201 throws java.io.IOException {
13202 return com.google.protobuf.GeneratedMessageV3
13203 .parseWithIOException(PARSER, input);
13204 }
13205 public static org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes parseFrom(
13206 com.google.protobuf.CodedInputStream input,
13207 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
13208 throws java.io.IOException {
13209 return com.google.protobuf.GeneratedMessageV3
13210 .parseWithIOException(PARSER, input, extensionRegistry);
13211 }
13212
13213 @java.lang.Override
13214 public Builder newBuilderForType() { return newBuilder(); }
13215 public static Builder newBuilder() {
13216 return DEFAULT_INSTANCE.toBuilder();
13217 }
13218 public static Builder newBuilder(org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes prototype) {
13219 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
13220 }
13221 @java.lang.Override
13222 public Builder toBuilder() {
13223 return this == DEFAULT_INSTANCE
13224 ? new Builder() : new Builder().mergeFrom(this);
13225 }
13226
13227 @java.lang.Override
13228 protected Builder newBuilderForType(
13229 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
13230 Builder builder = new Builder(parent);
13231 return builder;
13232 }
13233 /**
13234 * Protobuf type {@code OSMPBF.DenseNodes}
13235 */
13236 public static final class Builder extends
13237 com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
13238 // @@protoc_insertion_point(builder_implements:OSMPBF.DenseNodes)
13239 org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodesOrBuilder {
13240 public static final com.google.protobuf.Descriptors.Descriptor
13241 getDescriptor() {
13242 return org.openstreetmap.osmosis.osmbinary.Osmformat.internal_static_OSMPBF_DenseNodes_descriptor;
13243 }
13244
13245 @java.lang.Override
13246 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
13247 internalGetFieldAccessorTable() {
13248 return org.openstreetmap.osmosis.osmbinary.Osmformat.internal_static_OSMPBF_DenseNodes_fieldAccessorTable
13249 .ensureFieldAccessorsInitialized(
13250 org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes.class, org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes.Builder.class);
13251 }
13252
13253 // Construct using org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes.newBuilder()
13254 private Builder() {
13255 maybeForceBuilderInitialization();
13256 }
13257
13258 private Builder(
13259 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
13260 super(parent);
13261 maybeForceBuilderInitialization();
13262 }
13263 private void maybeForceBuilderInitialization() {
13264 if (com.google.protobuf.GeneratedMessageV3
13265 .alwaysUseFieldBuilders) {
13266 getDenseinfoFieldBuilder();
13267 }
13268 }
13269 @java.lang.Override
13270 public Builder clear() {
13271 super.clear();
13272 id_ = emptyLongList();
13273 bitField0_ = (bitField0_ & ~0x00000001);
13274 if (denseinfoBuilder_ == null) {
13275 denseinfo_ = null;
13276 } else {
13277 denseinfoBuilder_.clear();
13278 }
13279 bitField0_ = (bitField0_ & ~0x00000002);
13280 lat_ = emptyLongList();
13281 bitField0_ = (bitField0_ & ~0x00000004);
13282 lon_ = emptyLongList();
13283 bitField0_ = (bitField0_ & ~0x00000008);
13284 keysVals_ = emptyIntList();
13285 bitField0_ = (bitField0_ & ~0x00000010);
13286 return this;
13287 }
13288
13289 @java.lang.Override
13290 public com.google.protobuf.Descriptors.Descriptor
13291 getDescriptorForType() {
13292 return org.openstreetmap.osmosis.osmbinary.Osmformat.internal_static_OSMPBF_DenseNodes_descriptor;
13293 }
13294
13295 @java.lang.Override
13296 public org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes getDefaultInstanceForType() {
13297 return org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes.getDefaultInstance();
13298 }
13299
13300 @java.lang.Override
13301 public org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes build() {
13302 org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes result = buildPartial();
13303 if (!result.isInitialized()) {
13304 throw newUninitializedMessageException(result);
13305 }
13306 return result;
13307 }
13308
13309 @java.lang.Override
13310 public org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes buildPartial() {
13311 org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes result = new org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes(this);
13312 int from_bitField0_ = bitField0_;
13313 int to_bitField0_ = 0;
13314 if (((bitField0_ & 0x00000001) != 0)) {
13315 id_.makeImmutable();
13316 bitField0_ = (bitField0_ & ~0x00000001);
13317 }
13318 result.id_ = id_;
13319 if (((from_bitField0_ & 0x00000002) != 0)) {
13320 if (denseinfoBuilder_ == null) {
13321 result.denseinfo_ = denseinfo_;
13322 } else {
13323 result.denseinfo_ = denseinfoBuilder_.build();
13324 }
13325 to_bitField0_ |= 0x00000001;
13326 }
13327 if (((bitField0_ & 0x00000004) != 0)) {
13328 lat_.makeImmutable();
13329 bitField0_ = (bitField0_ & ~0x00000004);
13330 }
13331 result.lat_ = lat_;
13332 if (((bitField0_ & 0x00000008) != 0)) {
13333 lon_.makeImmutable();
13334 bitField0_ = (bitField0_ & ~0x00000008);
13335 }
13336 result.lon_ = lon_;
13337 if (((bitField0_ & 0x00000010) != 0)) {
13338 keysVals_.makeImmutable();
13339 bitField0_ = (bitField0_ & ~0x00000010);
13340 }
13341 result.keysVals_ = keysVals_;
13342 result.bitField0_ = to_bitField0_;
13343 onBuilt();
13344 return result;
13345 }
13346
13347 @java.lang.Override
13348 public Builder clone() {
13349 return super.clone();
13350 }
13351 @java.lang.Override
13352 public Builder setField(
13353 com.google.protobuf.Descriptors.FieldDescriptor field,
13354 java.lang.Object value) {
13355 return super.setField(field, value);
13356 }
13357 @java.lang.Override
13358 public Builder clearField(
13359 com.google.protobuf.Descriptors.FieldDescriptor field) {
13360 return super.clearField(field);
13361 }
13362 @java.lang.Override
13363 public Builder clearOneof(
13364 com.google.protobuf.Descriptors.OneofDescriptor oneof) {
13365 return super.clearOneof(oneof);
13366 }
13367 @java.lang.Override
13368 public Builder setRepeatedField(
13369 com.google.protobuf.Descriptors.FieldDescriptor field,
13370 int index, java.lang.Object value) {
13371 return super.setRepeatedField(field, index, value);
13372 }
13373 @java.lang.Override
13374 public Builder addRepeatedField(
13375 com.google.protobuf.Descriptors.FieldDescriptor field,
13376 java.lang.Object value) {
13377 return super.addRepeatedField(field, value);
13378 }
13379 @java.lang.Override
13380 public Builder mergeFrom(com.google.protobuf.Message other) {
13381 if (other instanceof org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes) {
13382 return mergeFrom((org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes)other);
13383 } else {
13384 super.mergeFrom(other);
13385 return this;
13386 }
13387 }
13388
13389 public Builder mergeFrom(org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes other) {
13390 if (other == org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes.getDefaultInstance()) return this;
13391 if (!other.id_.isEmpty()) {
13392 if (id_.isEmpty()) {
13393 id_ = other.id_;
13394 bitField0_ = (bitField0_ & ~0x00000001);
13395 } else {
13396 ensureIdIsMutable();
13397 id_.addAll(other.id_);
13398 }
13399 onChanged();
13400 }
13401 if (other.hasDenseinfo()) {
13402 mergeDenseinfo(other.getDenseinfo());
13403 }
13404 if (!other.lat_.isEmpty()) {
13405 if (lat_.isEmpty()) {
13406 lat_ = other.lat_;
13407 bitField0_ = (bitField0_ & ~0x00000004);
13408 } else {
13409 ensureLatIsMutable();
13410 lat_.addAll(other.lat_);
13411 }
13412 onChanged();
13413 }
13414 if (!other.lon_.isEmpty()) {
13415 if (lon_.isEmpty()) {
13416 lon_ = other.lon_;
13417 bitField0_ = (bitField0_ & ~0x00000008);
13418 } else {
13419 ensureLonIsMutable();
13420 lon_.addAll(other.lon_);
13421 }
13422 onChanged();
13423 }
13424 if (!other.keysVals_.isEmpty()) {
13425 if (keysVals_.isEmpty()) {
13426 keysVals_ = other.keysVals_;
13427 bitField0_ = (bitField0_ & ~0x00000010);
13428 } else {
13429 ensureKeysValsIsMutable();
13430 keysVals_.addAll(other.keysVals_);
13431 }
13432 onChanged();
13433 }
13434 this.mergeUnknownFields(other.unknownFields);
13435 onChanged();
13436 return this;
13437 }
13438
13439 @java.lang.Override
13440 public final boolean isInitialized() {
13441 return true;
13442 }
13443
13444 @java.lang.Override
13445 public Builder mergeFrom(
13446 com.google.protobuf.CodedInputStream input,
13447 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
13448 throws java.io.IOException {
13449 org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes parsedMessage = null;
13450 try {
13451 parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
13452 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
13453 parsedMessage = (org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes) e.getUnfinishedMessage();
13454 throw e.unwrapIOException();
13455 } finally {
13456 if (parsedMessage != null) {
13457 mergeFrom(parsedMessage);
13458 }
13459 }
13460 return this;
13461 }
13462 private int bitField0_;
13463
13464 private com.google.protobuf.Internal.LongList id_ = emptyLongList();
13465 private void ensureIdIsMutable() {
13466 if (!((bitField0_ & 0x00000001) != 0)) {
13467 id_ = mutableCopy(id_);
13468 bitField0_ |= 0x00000001;
13469 }
13470 }
13471 /**
13472 * <pre>
13473 * DELTA coded
13474 * </pre>
13475 *
13476 * <code>repeated sint64 id = 1 [packed = true];</code>
13477 * @return A list containing the id.
13478 */
13479 public java.util.List<java.lang.Long>
13480 getIdList() {
13481 return ((bitField0_ & 0x00000001) != 0) ?
13482 java.util.Collections.unmodifiableList(id_) : id_;
13483 }
13484 /**
13485 * <pre>
13486 * DELTA coded
13487 * </pre>
13488 *
13489 * <code>repeated sint64 id = 1 [packed = true];</code>
13490 * @return The count of id.
13491 */
13492 public int getIdCount() {
13493 return id_.size();
13494 }
13495 /**
13496 * <pre>
13497 * DELTA coded
13498 * </pre>
13499 *
13500 * <code>repeated sint64 id = 1 [packed = true];</code>
13501 * @param index The index of the element to return.
13502 * @return The id at the given index.
13503 */
13504 public long getId(int index) {
13505 return id_.getLong(index);
13506 }
13507 /**
13508 * <pre>
13509 * DELTA coded
13510 * </pre>
13511 *
13512 * <code>repeated sint64 id = 1 [packed = true];</code>
13513 * @param index The index to set the value at.
13514 * @param value The id to set.
13515 * @return This builder for chaining.
13516 */
13517 public Builder setId(
13518 int index, long value) {
13519 ensureIdIsMutable();
13520 id_.setLong(index, value);
13521 onChanged();
13522 return this;
13523 }
13524 /**
13525 * <pre>
13526 * DELTA coded
13527 * </pre>
13528 *
13529 * <code>repeated sint64 id = 1 [packed = true];</code>
13530 * @param value The id to add.
13531 * @return This builder for chaining.
13532 */
13533 public Builder addId(long value) {
13534 ensureIdIsMutable();
13535 id_.addLong(value);
13536 onChanged();
13537 return this;
13538 }
13539 /**
13540 * <pre>
13541 * DELTA coded
13542 * </pre>
13543 *
13544 * <code>repeated sint64 id = 1 [packed = true];</code>
13545 * @param values The id to add.
13546 * @return This builder for chaining.
13547 */
13548 public Builder addAllId(
13549 java.lang.Iterable<? extends java.lang.Long> values) {
13550 ensureIdIsMutable();
13551 com.google.protobuf.AbstractMessageLite.Builder.addAll(
13552 values, id_);
13553 onChanged();
13554 return this;
13555 }
13556 /**
13557 * <pre>
13558 * DELTA coded
13559 * </pre>
13560 *
13561 * <code>repeated sint64 id = 1 [packed = true];</code>
13562 * @return This builder for chaining.
13563 */
13564 public Builder clearId() {
13565 id_ = emptyLongList();
13566 bitField0_ = (bitField0_ & ~0x00000001);
13567 onChanged();
13568 return this;
13569 }
13570
13571 private org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo denseinfo_;
13572 private com.google.protobuf.SingleFieldBuilderV3<
13573 org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo, org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo.Builder, org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfoOrBuilder> denseinfoBuilder_;
13574 /**
13575 * <pre>
13576 *repeated Info info = 4;
13577 * </pre>
13578 *
13579 * <code>optional .OSMPBF.DenseInfo denseinfo = 5;</code>
13580 * @return Whether the denseinfo field is set.
13581 */
13582 public boolean hasDenseinfo() {
13583 return ((bitField0_ & 0x00000002) != 0);
13584 }
13585 /**
13586 * <pre>
13587 *repeated Info info = 4;
13588 * </pre>
13589 *
13590 * <code>optional .OSMPBF.DenseInfo denseinfo = 5;</code>
13591 * @return The denseinfo.
13592 */
13593 public org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo getDenseinfo() {
13594 if (denseinfoBuilder_ == null) {
13595 return denseinfo_ == null ? org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo.getDefaultInstance() : denseinfo_;
13596 } else {
13597 return denseinfoBuilder_.getMessage();
13598 }
13599 }
13600 /**
13601 * <pre>
13602 *repeated Info info = 4;
13603 * </pre>
13604 *
13605 * <code>optional .OSMPBF.DenseInfo denseinfo = 5;</code>
13606 */
13607 public Builder setDenseinfo(org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo value) {
13608 if (denseinfoBuilder_ == null) {
13609 if (value == null) {
13610 throw new NullPointerException();
13611 }
13612 denseinfo_ = value;
13613 onChanged();
13614 } else {
13615 denseinfoBuilder_.setMessage(value);
13616 }
13617 bitField0_ |= 0x00000002;
13618 return this;
13619 }
13620 /**
13621 * <pre>
13622 *repeated Info info = 4;
13623 * </pre>
13624 *
13625 * <code>optional .OSMPBF.DenseInfo denseinfo = 5;</code>
13626 */
13627 public Builder setDenseinfo(
13628 org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo.Builder builderForValue) {
13629 if (denseinfoBuilder_ == null) {
13630 denseinfo_ = builderForValue.build();
13631 onChanged();
13632 } else {
13633 denseinfoBuilder_.setMessage(builderForValue.build());
13634 }
13635 bitField0_ |= 0x00000002;
13636 return this;
13637 }
13638 /**
13639 * <pre>
13640 *repeated Info info = 4;
13641 * </pre>
13642 *
13643 * <code>optional .OSMPBF.DenseInfo denseinfo = 5;</code>
13644 */
13645 public Builder mergeDenseinfo(org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo value) {
13646 if (denseinfoBuilder_ == null) {
13647 if (((bitField0_ & 0x00000002) != 0) &&
13648 denseinfo_ != null &&
13649 denseinfo_ != org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo.getDefaultInstance()) {
13650 denseinfo_ =
13651 org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo.newBuilder(denseinfo_).mergeFrom(value).buildPartial();
13652 } else {
13653 denseinfo_ = value;
13654 }
13655 onChanged();
13656 } else {
13657 denseinfoBuilder_.mergeFrom(value);
13658 }
13659 bitField0_ |= 0x00000002;
13660 return this;
13661 }
13662 /**
13663 * <pre>
13664 *repeated Info info = 4;
13665 * </pre>
13666 *
13667 * <code>optional .OSMPBF.DenseInfo denseinfo = 5;</code>
13668 */
13669 public Builder clearDenseinfo() {
13670 if (denseinfoBuilder_ == null) {
13671 denseinfo_ = null;
13672 onChanged();
13673 } else {
13674 denseinfoBuilder_.clear();
13675 }
13676 bitField0_ = (bitField0_ & ~0x00000002);
13677 return this;
13678 }
13679 /**
13680 * <pre>
13681 *repeated Info info = 4;
13682 * </pre>
13683 *
13684 * <code>optional .OSMPBF.DenseInfo denseinfo = 5;</code>
13685 */
13686 public org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo.Builder getDenseinfoBuilder() {
13687 bitField0_ |= 0x00000002;
13688 onChanged();
13689 return getDenseinfoFieldBuilder().getBuilder();
13690 }
13691 /**
13692 * <pre>
13693 *repeated Info info = 4;
13694 * </pre>
13695 *
13696 * <code>optional .OSMPBF.DenseInfo denseinfo = 5;</code>
13697 */
13698 public org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfoOrBuilder getDenseinfoOrBuilder() {
13699 if (denseinfoBuilder_ != null) {
13700 return denseinfoBuilder_.getMessageOrBuilder();
13701 } else {
13702 return denseinfo_ == null ?
13703 org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo.getDefaultInstance() : denseinfo_;
13704 }
13705 }
13706 /**
13707 * <pre>
13708 *repeated Info info = 4;
13709 * </pre>
13710 *
13711 * <code>optional .OSMPBF.DenseInfo denseinfo = 5;</code>
13712 */
13713 private com.google.protobuf.SingleFieldBuilderV3<
13714 org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo, org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo.Builder, org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfoOrBuilder>
13715 getDenseinfoFieldBuilder() {
13716 if (denseinfoBuilder_ == null) {
13717 denseinfoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
13718 org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo, org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo.Builder, org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfoOrBuilder>(
13719 getDenseinfo(),
13720 getParentForChildren(),
13721 isClean());
13722 denseinfo_ = null;
13723 }
13724 return denseinfoBuilder_;
13725 }
13726
13727 private com.google.protobuf.Internal.LongList lat_ = emptyLongList();
13728 private void ensureLatIsMutable() {
13729 if (!((bitField0_ & 0x00000004) != 0)) {
13730 lat_ = mutableCopy(lat_);
13731 bitField0_ |= 0x00000004;
13732 }
13733 }
13734 /**
13735 * <pre>
13736 * DELTA coded
13737 * </pre>
13738 *
13739 * <code>repeated sint64 lat = 8 [packed = true];</code>
13740 * @return A list containing the lat.
13741 */
13742 public java.util.List<java.lang.Long>
13743 getLatList() {
13744 return ((bitField0_ & 0x00000004) != 0) ?
13745 java.util.Collections.unmodifiableList(lat_) : lat_;
13746 }
13747 /**
13748 * <pre>
13749 * DELTA coded
13750 * </pre>
13751 *
13752 * <code>repeated sint64 lat = 8 [packed = true];</code>
13753 * @return The count of lat.
13754 */
13755 public int getLatCount() {
13756 return lat_.size();
13757 }
13758 /**
13759 * <pre>
13760 * DELTA coded
13761 * </pre>
13762 *
13763 * <code>repeated sint64 lat = 8 [packed = true];</code>
13764 * @param index The index of the element to return.
13765 * @return The lat at the given index.
13766 */
13767 public long getLat(int index) {
13768 return lat_.getLong(index);
13769 }
13770 /**
13771 * <pre>
13772 * DELTA coded
13773 * </pre>
13774 *
13775 * <code>repeated sint64 lat = 8 [packed = true];</code>
13776 * @param index The index to set the value at.
13777 * @param value The lat to set.
13778 * @return This builder for chaining.
13779 */
13780 public Builder setLat(
13781 int index, long value) {
13782 ensureLatIsMutable();
13783 lat_.setLong(index, value);
13784 onChanged();
13785 return this;
13786 }
13787 /**
13788 * <pre>
13789 * DELTA coded
13790 * </pre>
13791 *
13792 * <code>repeated sint64 lat = 8 [packed = true];</code>
13793 * @param value The lat to add.
13794 * @return This builder for chaining.
13795 */
13796 public Builder addLat(long value) {
13797 ensureLatIsMutable();
13798 lat_.addLong(value);
13799 onChanged();
13800 return this;
13801 }
13802 /**
13803 * <pre>
13804 * DELTA coded
13805 * </pre>
13806 *
13807 * <code>repeated sint64 lat = 8 [packed = true];</code>
13808 * @param values The lat to add.
13809 * @return This builder for chaining.
13810 */
13811 public Builder addAllLat(
13812 java.lang.Iterable<? extends java.lang.Long> values) {
13813 ensureLatIsMutable();
13814 com.google.protobuf.AbstractMessageLite.Builder.addAll(
13815 values, lat_);
13816 onChanged();
13817 return this;
13818 }
13819 /**
13820 * <pre>
13821 * DELTA coded
13822 * </pre>
13823 *
13824 * <code>repeated sint64 lat = 8 [packed = true];</code>
13825 * @return This builder for chaining.
13826 */
13827 public Builder clearLat() {
13828 lat_ = emptyLongList();
13829 bitField0_ = (bitField0_ & ~0x00000004);
13830 onChanged();
13831 return this;
13832 }
13833
13834 private com.google.protobuf.Internal.LongList lon_ = emptyLongList();
13835 private void ensureLonIsMutable() {
13836 if (!((bitField0_ & 0x00000008) != 0)) {
13837 lon_ = mutableCopy(lon_);
13838 bitField0_ |= 0x00000008;
13839 }
13840 }
13841 /**
13842 * <pre>
13843 * DELTA coded
13844 * </pre>
13845 *
13846 * <code>repeated sint64 lon = 9 [packed = true];</code>
13847 * @return A list containing the lon.
13848 */
13849 public java.util.List<java.lang.Long>
13850 getLonList() {
13851 return ((bitField0_ & 0x00000008) != 0) ?
13852 java.util.Collections.unmodifiableList(lon_) : lon_;
13853 }
13854 /**
13855 * <pre>
13856 * DELTA coded
13857 * </pre>
13858 *
13859 * <code>repeated sint64 lon = 9 [packed = true];</code>
13860 * @return The count of lon.
13861 */
13862 public int getLonCount() {
13863 return lon_.size();
13864 }
13865 /**
13866 * <pre>
13867 * DELTA coded
13868 * </pre>
13869 *
13870 * <code>repeated sint64 lon = 9 [packed = true];</code>
13871 * @param index The index of the element to return.
13872 * @return The lon at the given index.
13873 */
13874 public long getLon(int index) {
13875 return lon_.getLong(index);
13876 }
13877 /**
13878 * <pre>
13879 * DELTA coded
13880 * </pre>
13881 *
13882 * <code>repeated sint64 lon = 9 [packed = true];</code>
13883 * @param index The index to set the value at.
13884 * @param value The lon to set.
13885 * @return This builder for chaining.
13886 */
13887 public Builder setLon(
13888 int index, long value) {
13889 ensureLonIsMutable();
13890 lon_.setLong(index, value);
13891 onChanged();
13892 return this;
13893 }
13894 /**
13895 * <pre>
13896 * DELTA coded
13897 * </pre>
13898 *
13899 * <code>repeated sint64 lon = 9 [packed = true];</code>
13900 * @param value The lon to add.
13901 * @return This builder for chaining.
13902 */
13903 public Builder addLon(long value) {
13904 ensureLonIsMutable();
13905 lon_.addLong(value);
13906 onChanged();
13907 return this;
13908 }
13909 /**
13910 * <pre>
13911 * DELTA coded
13912 * </pre>
13913 *
13914 * <code>repeated sint64 lon = 9 [packed = true];</code>
13915 * @param values The lon to add.
13916 * @return This builder for chaining.
13917 */
13918 public Builder addAllLon(
13919 java.lang.Iterable<? extends java.lang.Long> values) {
13920 ensureLonIsMutable();
13921 com.google.protobuf.AbstractMessageLite.Builder.addAll(
13922 values, lon_);
13923 onChanged();
13924 return this;
13925 }
13926 /**
13927 * <pre>
13928 * DELTA coded
13929 * </pre>
13930 *
13931 * <code>repeated sint64 lon = 9 [packed = true];</code>
13932 * @return This builder for chaining.
13933 */
13934 public Builder clearLon() {
13935 lon_ = emptyLongList();
13936 bitField0_ = (bitField0_ & ~0x00000008);
13937 onChanged();
13938 return this;
13939 }
13940
13941 private com.google.protobuf.Internal.IntList keysVals_ = emptyIntList();
13942 private void ensureKeysValsIsMutable() {
13943 if (!((bitField0_ & 0x00000010) != 0)) {
13944 keysVals_ = mutableCopy(keysVals_);
13945 bitField0_ |= 0x00000010;
13946 }
13947 }
13948 /**
13949 * <pre>
13950 * Special packing of keys and vals into one array. May be empty if all nodes in this block are tagless.
13951 * </pre>
13952 *
13953 * <code>repeated int32 keys_vals = 10 [packed = true];</code>
13954 * @return A list containing the keysVals.
13955 */
13956 public java.util.List<java.lang.Integer>
13957 getKeysValsList() {
13958 return ((bitField0_ & 0x00000010) != 0) ?
13959 java.util.Collections.unmodifiableList(keysVals_) : keysVals_;
13960 }
13961 /**
13962 * <pre>
13963 * Special packing of keys and vals into one array. May be empty if all nodes in this block are tagless.
13964 * </pre>
13965 *
13966 * <code>repeated int32 keys_vals = 10 [packed = true];</code>
13967 * @return The count of keysVals.
13968 */
13969 public int getKeysValsCount() {
13970 return keysVals_.size();
13971 }
13972 /**
13973 * <pre>
13974 * Special packing of keys and vals into one array. May be empty if all nodes in this block are tagless.
13975 * </pre>
13976 *
13977 * <code>repeated int32 keys_vals = 10 [packed = true];</code>
13978 * @param index The index of the element to return.
13979 * @return The keysVals at the given index.
13980 */
13981 public int getKeysVals(int index) {
13982 return keysVals_.getInt(index);
13983 }
13984 /**
13985 * <pre>
13986 * Special packing of keys and vals into one array. May be empty if all nodes in this block are tagless.
13987 * </pre>
13988 *
13989 * <code>repeated int32 keys_vals = 10 [packed = true];</code>
13990 * @param index The index to set the value at.
13991 * @param value The keysVals to set.
13992 * @return This builder for chaining.
13993 */
13994 public Builder setKeysVals(
13995 int index, int value) {
13996 ensureKeysValsIsMutable();
13997 keysVals_.setInt(index, value);
13998 onChanged();
13999 return this;
14000 }
14001 /**
14002 * <pre>
14003 * Special packing of keys and vals into one array. May be empty if all nodes in this block are tagless.
14004 * </pre>
14005 *
14006 * <code>repeated int32 keys_vals = 10 [packed = true];</code>
14007 * @param value The keysVals to add.
14008 * @return This builder for chaining.
14009 */
14010 public Builder addKeysVals(int value) {
14011 ensureKeysValsIsMutable();
14012 keysVals_.addInt(value);
14013 onChanged();
14014 return this;
14015 }
14016 /**
14017 * <pre>
14018 * Special packing of keys and vals into one array. May be empty if all nodes in this block are tagless.
14019 * </pre>
14020 *
14021 * <code>repeated int32 keys_vals = 10 [packed = true];</code>
14022 * @param values The keysVals to add.
14023 * @return This builder for chaining.
14024 */
14025 public Builder addAllKeysVals(
14026 java.lang.Iterable<? extends java.lang.Integer> values) {
14027 ensureKeysValsIsMutable();
14028 com.google.protobuf.AbstractMessageLite.Builder.addAll(
14029 values, keysVals_);
14030 onChanged();
14031 return this;
14032 }
14033 /**
14034 * <pre>
14035 * Special packing of keys and vals into one array. May be empty if all nodes in this block are tagless.
14036 * </pre>
14037 *
14038 * <code>repeated int32 keys_vals = 10 [packed = true];</code>
14039 * @return This builder for chaining.
14040 */
14041 public Builder clearKeysVals() {
14042 keysVals_ = emptyIntList();
14043 bitField0_ = (bitField0_ & ~0x00000010);
14044 onChanged();
14045 return this;
14046 }
14047 @java.lang.Override
14048 public final Builder setUnknownFields(
14049 final com.google.protobuf.UnknownFieldSet unknownFields) {
14050 return super.setUnknownFields(unknownFields);
14051 }
14052
14053 @java.lang.Override
14054 public final Builder mergeUnknownFields(
14055 final com.google.protobuf.UnknownFieldSet unknownFields) {
14056 return super.mergeUnknownFields(unknownFields);
14057 }
14058
14059
14060 // @@protoc_insertion_point(builder_scope:OSMPBF.DenseNodes)
14061 }
14062
14063 // @@protoc_insertion_point(class_scope:OSMPBF.DenseNodes)
14064 private static final org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes DEFAULT_INSTANCE;
14065 static {
14066 DEFAULT_INSTANCE = new org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes();
14067 }
14068
14069 public static org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes getDefaultInstance() {
14070 return DEFAULT_INSTANCE;
14071 }
14072
14073 @java.lang.Deprecated public static final com.google.protobuf.Parser<DenseNodes>
14074 PARSER = new com.google.protobuf.AbstractParser<DenseNodes>() {
14075 @java.lang.Override
14076 public DenseNodes parsePartialFrom(
14077 com.google.protobuf.CodedInputStream input,
14078 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
14079 throws com.google.protobuf.InvalidProtocolBufferException {
14080 return new DenseNodes(input, extensionRegistry);
14081 }
14082 };
14083
14084 public static com.google.protobuf.Parser<DenseNodes> parser() {
14085 return PARSER;
14086 }
14087
14088 @java.lang.Override
14089 public com.google.protobuf.Parser<DenseNodes> getParserForType() {
14090 return PARSER;
14091 }
14092
14093 @java.lang.Override
14094 public org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes getDefaultInstanceForType() {
14095 return DEFAULT_INSTANCE;
14096 }
14097
14098 }
14099
14100 public interface WayOrBuilder extends
14101 // @@protoc_insertion_point(interface_extends:OSMPBF.Way)
14102 com.google.protobuf.MessageOrBuilder {
14103
14104 /**
14105 * <code>required int64 id = 1;</code>
14106 * @return Whether the id field is set.
14107 */
14108 boolean hasId();
14109 /**
14110 * <code>required int64 id = 1;</code>
14111 * @return The id.
14112 */
14113 long getId();
14114
14115 /**
14116 * <pre>
14117 * Parallel arrays.
14118 * </pre>
14119 *
14120 * <code>repeated uint32 keys = 2 [packed = true];</code>
14121 * @return A list containing the keys.
14122 */
14123 java.util.List<java.lang.Integer> getKeysList();
14124 /**
14125 * <pre>
14126 * Parallel arrays.
14127 * </pre>
14128 *
14129 * <code>repeated uint32 keys = 2 [packed = true];</code>
14130 * @return The count of keys.
14131 */
14132 int getKeysCount();
14133 /**
14134 * <pre>
14135 * Parallel arrays.
14136 * </pre>
14137 *
14138 * <code>repeated uint32 keys = 2 [packed = true];</code>
14139 * @param index The index of the element to return.
14140 * @return The keys at the given index.
14141 */
14142 int getKeys(int index);
14143
14144 /**
14145 * <code>repeated uint32 vals = 3 [packed = true];</code>
14146 * @return A list containing the vals.
14147 */
14148 java.util.List<java.lang.Integer> getValsList();
14149 /**
14150 * <code>repeated uint32 vals = 3 [packed = true];</code>
14151 * @return The count of vals.
14152 */
14153 int getValsCount();
14154 /**
14155 * <code>repeated uint32 vals = 3 [packed = true];</code>
14156 * @param index The index of the element to return.
14157 * @return The vals at the given index.
14158 */
14159 int getVals(int index);
14160
14161 /**
14162 * <code>optional .OSMPBF.Info info = 4;</code>
14163 * @return Whether the info field is set.
14164 */
14165 boolean hasInfo();
14166 /**
14167 * <code>optional .OSMPBF.Info info = 4;</code>
14168 * @return The info.
14169 */
14170 org.openstreetmap.osmosis.osmbinary.Osmformat.Info getInfo();
14171 /**
14172 * <code>optional .OSMPBF.Info info = 4;</code>
14173 */
14174 org.openstreetmap.osmosis.osmbinary.Osmformat.InfoOrBuilder getInfoOrBuilder();
14175
14176 /**
14177 * <pre>
14178 * DELTA coded
14179 * </pre>
14180 *
14181 * <code>repeated sint64 refs = 8 [packed = true];</code>
14182 * @return A list containing the refs.
14183 */
14184 java.util.List<java.lang.Long> getRefsList();
14185 /**
14186 * <pre>
14187 * DELTA coded
14188 * </pre>
14189 *
14190 * <code>repeated sint64 refs = 8 [packed = true];</code>
14191 * @return The count of refs.
14192 */
14193 int getRefsCount();
14194 /**
14195 * <pre>
14196 * DELTA coded
14197 * </pre>
14198 *
14199 * <code>repeated sint64 refs = 8 [packed = true];</code>
14200 * @param index The index of the element to return.
14201 * @return The refs at the given index.
14202 */
14203 long getRefs(int index);
14204
14205 /**
14206 * <code>repeated sint64 lat = 9 [packed = true];</code>
14207 * @return A list containing the lat.
14208 */
14209 java.util.List<java.lang.Long> getLatList();
14210 /**
14211 * <code>repeated sint64 lat = 9 [packed = true];</code>
14212 * @return The count of lat.
14213 */
14214 int getLatCount();
14215 /**
14216 * <code>repeated sint64 lat = 9 [packed = true];</code>
14217 * @param index The index of the element to return.
14218 * @return The lat at the given index.
14219 */
14220 long getLat(int index);
14221
14222 /**
14223 * <code>repeated sint64 lon = 10 [packed = true];</code>
14224 * @return A list containing the lon.
14225 */
14226 java.util.List<java.lang.Long> getLonList();
14227 /**
14228 * <code>repeated sint64 lon = 10 [packed = true];</code>
14229 * @return The count of lon.
14230 */
14231 int getLonCount();
14232 /**
14233 * <code>repeated sint64 lon = 10 [packed = true];</code>
14234 * @param index The index of the element to return.
14235 * @return The lon at the given index.
14236 */
14237 long getLon(int index);
14238 }
14239 /**
14240 * Protobuf type {@code OSMPBF.Way}
14241 */
14242 public static final class Way extends
14243 com.google.protobuf.GeneratedMessageV3 implements
14244 // @@protoc_insertion_point(message_implements:OSMPBF.Way)
14245 WayOrBuilder {
14246 private static final long serialVersionUID = 0L;
14247 // Use Way.newBuilder() to construct.
14248 private Way(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
14249 super(builder);
14250 }
14251 private Way() {
14252 keys_ = emptyIntList();
14253 vals_ = emptyIntList();
14254 refs_ = emptyLongList();
14255 lat_ = emptyLongList();
14256 lon_ = emptyLongList();
14257 }
14258
14259 @java.lang.Override
14260 @SuppressWarnings({"unused"})
14261 protected java.lang.Object newInstance(
14262 UnusedPrivateParameter unused) {
14263 return new Way();
14264 }
14265
14266 @java.lang.Override
14267 public final com.google.protobuf.UnknownFieldSet
14268 getUnknownFields() {
14269 return this.unknownFields;
14270 }
14271 private Way(
14272 com.google.protobuf.CodedInputStream input,
14273 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
14274 throws com.google.protobuf.InvalidProtocolBufferException {
14275 this();
14276 if (extensionRegistry == null) {
14277 throw new java.lang.NullPointerException();
14278 }
14279 int mutable_bitField0_ = 0;
14280 com.google.protobuf.UnknownFieldSet.Builder unknownFields =
14281 com.google.protobuf.UnknownFieldSet.newBuilder();
14282 try {
14283 boolean done = false;
14284 while (!done) {
14285 int tag = input.readTag();
14286 switch (tag) {
14287 case 0:
14288 done = true;
14289 break;
14290 case 8: {
14291 bitField0_ |= 0x00000001;
14292 id_ = input.readInt64();
14293 break;
14294 }
14295 case 16: {
14296 if (!((mutable_bitField0_ & 0x00000002) != 0)) {
14297 keys_ = newIntList();
14298 mutable_bitField0_ |= 0x00000002;
14299 }
14300 keys_.addInt(input.readUInt32());
14301 break;
14302 }
14303 case 18: {
14304 int length = input.readRawVarint32();
14305 int limit = input.pushLimit(length);
14306 if (!((mutable_bitField0_ & 0x00000002) != 0) && input.getBytesUntilLimit() > 0) {
14307 keys_ = newIntList();
14308 mutable_bitField0_ |= 0x00000002;
14309 }
14310 while (input.getBytesUntilLimit() > 0) {
14311 keys_.addInt(input.readUInt32());
14312 }
14313 input.popLimit(limit);
14314 break;
14315 }
14316 case 24: {
14317 if (!((mutable_bitField0_ & 0x00000004) != 0)) {
14318 vals_ = newIntList();
14319 mutable_bitField0_ |= 0x00000004;
14320 }
14321 vals_.addInt(input.readUInt32());
14322 break;
14323 }
14324 case 26: {
14325 int length = input.readRawVarint32();
14326 int limit = input.pushLimit(length);
14327 if (!((mutable_bitField0_ & 0x00000004) != 0) && input.getBytesUntilLimit() > 0) {
14328 vals_ = newIntList();
14329 mutable_bitField0_ |= 0x00000004;
14330 }
14331 while (input.getBytesUntilLimit() > 0) {
14332 vals_.addInt(input.readUInt32());
14333 }
14334 input.popLimit(limit);
14335 break;
14336 }
14337 case 34: {
14338 org.openstreetmap.osmosis.osmbinary.Osmformat.Info.Builder subBuilder = null;
14339 if (((bitField0_ & 0x00000002) != 0)) {
14340 subBuilder = info_.toBuilder();
14341 }
14342 info_ = input.readMessage(org.openstreetmap.osmosis.osmbinary.Osmformat.Info.PARSER, extensionRegistry);
14343 if (subBuilder != null) {
14344 subBuilder.mergeFrom(info_);
14345 info_ = subBuilder.buildPartial();
14346 }
14347 bitField0_ |= 0x00000002;
14348 break;
14349 }
14350 case 64: {
14351 if (!((mutable_bitField0_ & 0x00000010) != 0)) {
14352 refs_ = newLongList();
14353 mutable_bitField0_ |= 0x00000010;
14354 }
14355 refs_.addLong(input.readSInt64());
14356 break;
14357 }
14358 case 66: {
14359 int length = input.readRawVarint32();
14360 int limit = input.pushLimit(length);
14361 if (!((mutable_bitField0_ & 0x00000010) != 0) && input.getBytesUntilLimit() > 0) {
14362 refs_ = newLongList();
14363 mutable_bitField0_ |= 0x00000010;
14364 }
14365 while (input.getBytesUntilLimit() > 0) {
14366 refs_.addLong(input.readSInt64());
14367 }
14368 input.popLimit(limit);
14369 break;
14370 }
14371 case 72: {
14372 if (!((mutable_bitField0_ & 0x00000020) != 0)) {
14373 lat_ = newLongList();
14374 mutable_bitField0_ |= 0x00000020;
14375 }
14376 lat_.addLong(input.readSInt64());
14377 break;
14378 }
14379 case 74: {
14380 int length = input.readRawVarint32();
14381 int limit = input.pushLimit(length);
14382 if (!((mutable_bitField0_ & 0x00000020) != 0) && input.getBytesUntilLimit() > 0) {
14383 lat_ = newLongList();
14384 mutable_bitField0_ |= 0x00000020;
14385 }
14386 while (input.getBytesUntilLimit() > 0) {
14387 lat_.addLong(input.readSInt64());
14388 }
14389 input.popLimit(limit);
14390 break;
14391 }
14392 case 80: {
14393 if (!((mutable_bitField0_ & 0x00000040) != 0)) {
14394 lon_ = newLongList();
14395 mutable_bitField0_ |= 0x00000040;
14396 }
14397 lon_.addLong(input.readSInt64());
14398 break;
14399 }
14400 case 82: {
14401 int length = input.readRawVarint32();
14402 int limit = input.pushLimit(length);
14403 if (!((mutable_bitField0_ & 0x00000040) != 0) && input.getBytesUntilLimit() > 0) {
14404 lon_ = newLongList();
14405 mutable_bitField0_ |= 0x00000040;
14406 }
14407 while (input.getBytesUntilLimit() > 0) {
14408 lon_.addLong(input.readSInt64());
14409 }
14410 input.popLimit(limit);
14411 break;
14412 }
14413 default: {
14414 if (!parseUnknownField(
14415 input, unknownFields, extensionRegistry, tag)) {
14416 done = true;
14417 }
14418 break;
14419 }
14420 }
14421 }
14422 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
14423 throw e.setUnfinishedMessage(this);
14424 } catch (java.io.IOException e) {
14425 throw new com.google.protobuf.InvalidProtocolBufferException(
14426 e).setUnfinishedMessage(this);
14427 } finally {
14428 if (((mutable_bitField0_ & 0x00000002) != 0)) {
14429 keys_.makeImmutable(); // C
14430 }
14431 if (((mutable_bitField0_ & 0x00000004) != 0)) {
14432 vals_.makeImmutable(); // C
14433 }
14434 if (((mutable_bitField0_ & 0x00000010) != 0)) {
14435 refs_.makeImmutable(); // C
14436 }
14437 if (((mutable_bitField0_ & 0x00000020) != 0)) {
14438 lat_.makeImmutable(); // C
14439 }
14440 if (((mutable_bitField0_ & 0x00000040) != 0)) {
14441 lon_.makeImmutable(); // C
14442 }
14443 this.unknownFields = unknownFields.build();
14444 makeExtensionsImmutable();
14445 }
14446 }
14447 public static final com.google.protobuf.Descriptors.Descriptor
14448 getDescriptor() {
14449 return org.openstreetmap.osmosis.osmbinary.Osmformat.internal_static_OSMPBF_Way_descriptor;
14450 }
14451
14452 @java.lang.Override
14453 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
14454 internalGetFieldAccessorTable() {
14455 return org.openstreetmap.osmosis.osmbinary.Osmformat.internal_static_OSMPBF_Way_fieldAccessorTable
14456 .ensureFieldAccessorsInitialized(
14457 org.openstreetmap.osmosis.osmbinary.Osmformat.Way.class, org.openstreetmap.osmosis.osmbinary.Osmformat.Way.Builder.class);
14458 }
14459
14460 private int bitField0_;
14461 public static final int ID_FIELD_NUMBER = 1;
14462 private long id_;
14463 /**
14464 * <code>required int64 id = 1;</code>
14465 * @return Whether the id field is set.
14466 */
14467 @java.lang.Override
14468 public boolean hasId() {
14469 return ((bitField0_ & 0x00000001) != 0);
14470 }
14471 /**
14472 * <code>required int64 id = 1;</code>
14473 * @return The id.
14474 */
14475 @java.lang.Override
14476 public long getId() {
14477 return id_;
14478 }
14479
14480 public static final int KEYS_FIELD_NUMBER = 2;
14481 private com.google.protobuf.Internal.IntList keys_;
14482 /**
14483 * <pre>
14484 * Parallel arrays.
14485 * </pre>
14486 *
14487 * <code>repeated uint32 keys = 2 [packed = true];</code>
14488 * @return A list containing the keys.
14489 */
14490 @java.lang.Override
14491 public java.util.List<java.lang.Integer>
14492 getKeysList() {
14493 return keys_;
14494 }
14495 /**
14496 * <pre>
14497 * Parallel arrays.
14498 * </pre>
14499 *
14500 * <code>repeated uint32 keys = 2 [packed = true];</code>
14501 * @return The count of keys.
14502 */
14503 public int getKeysCount() {
14504 return keys_.size();
14505 }
14506 /**
14507 * <pre>
14508 * Parallel arrays.
14509 * </pre>
14510 *
14511 * <code>repeated uint32 keys = 2 [packed = true];</code>
14512 * @param index The index of the element to return.
14513 * @return The keys at the given index.
14514 */
14515 public int getKeys(int index) {
14516 return keys_.getInt(index);
14517 }
14518 private int keysMemoizedSerializedSize = -1;
14519
14520 public static final int VALS_FIELD_NUMBER = 3;
14521 private com.google.protobuf.Internal.IntList vals_;
14522 /**
14523 * <code>repeated uint32 vals = 3 [packed = true];</code>
14524 * @return A list containing the vals.
14525 */
14526 @java.lang.Override
14527 public java.util.List<java.lang.Integer>
14528 getValsList() {
14529 return vals_;
14530 }
14531 /**
14532 * <code>repeated uint32 vals = 3 [packed = true];</code>
14533 * @return The count of vals.
14534 */
14535 public int getValsCount() {
14536 return vals_.size();
14537 }
14538 /**
14539 * <code>repeated uint32 vals = 3 [packed = true];</code>
14540 * @param index The index of the element to return.
14541 * @return The vals at the given index.
14542 */
14543 public int getVals(int index) {
14544 return vals_.getInt(index);
14545 }
14546 private int valsMemoizedSerializedSize = -1;
14547
14548 public static final int INFO_FIELD_NUMBER = 4;
14549 private org.openstreetmap.osmosis.osmbinary.Osmformat.Info info_;
14550 /**
14551 * <code>optional .OSMPBF.Info info = 4;</code>
14552 * @return Whether the info field is set.
14553 */
14554 @java.lang.Override
14555 public boolean hasInfo() {
14556 return ((bitField0_ & 0x00000002) != 0);
14557 }
14558 /**
14559 * <code>optional .OSMPBF.Info info = 4;</code>
14560 * @return The info.
14561 */
14562 @java.lang.Override
14563 public org.openstreetmap.osmosis.osmbinary.Osmformat.Info getInfo() {
14564 return info_ == null ? org.openstreetmap.osmosis.osmbinary.Osmformat.Info.getDefaultInstance() : info_;
14565 }
14566 /**
14567 * <code>optional .OSMPBF.Info info = 4;</code>
14568 */
14569 @java.lang.Override
14570 public org.openstreetmap.osmosis.osmbinary.Osmformat.InfoOrBuilder getInfoOrBuilder() {
14571 return info_ == null ? org.openstreetmap.osmosis.osmbinary.Osmformat.Info.getDefaultInstance() : info_;
14572 }
14573
14574 public static final int REFS_FIELD_NUMBER = 8;
14575 private com.google.protobuf.Internal.LongList refs_;
14576 /**
14577 * <pre>
14578 * DELTA coded
14579 * </pre>
14580 *
14581 * <code>repeated sint64 refs = 8 [packed = true];</code>
14582 * @return A list containing the refs.
14583 */
14584 @java.lang.Override
14585 public java.util.List<java.lang.Long>
14586 getRefsList() {
14587 return refs_;
14588 }
14589 /**
14590 * <pre>
14591 * DELTA coded
14592 * </pre>
14593 *
14594 * <code>repeated sint64 refs = 8 [packed = true];</code>
14595 * @return The count of refs.
14596 */
14597 public int getRefsCount() {
14598 return refs_.size();
14599 }
14600 /**
14601 * <pre>
14602 * DELTA coded
14603 * </pre>
14604 *
14605 * <code>repeated sint64 refs = 8 [packed = true];</code>
14606 * @param index The index of the element to return.
14607 * @return The refs at the given index.
14608 */
14609 public long getRefs(int index) {
14610 return refs_.getLong(index);
14611 }
14612 private int refsMemoizedSerializedSize = -1;
14613
14614 public static final int LAT_FIELD_NUMBER = 9;
14615 private com.google.protobuf.Internal.LongList lat_;
14616 /**
14617 * <code>repeated sint64 lat = 9 [packed = true];</code>
14618 * @return A list containing the lat.
14619 */
14620 @java.lang.Override
14621 public java.util.List<java.lang.Long>
14622 getLatList() {
14623 return lat_;
14624 }
14625 /**
14626 * <code>repeated sint64 lat = 9 [packed = true];</code>
14627 * @return The count of lat.
14628 */
14629 public int getLatCount() {
14630 return lat_.size();
14631 }
14632 /**
14633 * <code>repeated sint64 lat = 9 [packed = true];</code>
14634 * @param index The index of the element to return.
14635 * @return The lat at the given index.
14636 */
14637 public long getLat(int index) {
14638 return lat_.getLong(index);
14639 }
14640 private int latMemoizedSerializedSize = -1;
14641
14642 public static final int LON_FIELD_NUMBER = 10;
14643 private com.google.protobuf.Internal.LongList lon_;
14644 /**
14645 * <code>repeated sint64 lon = 10 [packed = true];</code>
14646 * @return A list containing the lon.
14647 */
14648 @java.lang.Override
14649 public java.util.List<java.lang.Long>
14650 getLonList() {
14651 return lon_;
14652 }
14653 /**
14654 * <code>repeated sint64 lon = 10 [packed = true];</code>
14655 * @return The count of lon.
14656 */
14657 public int getLonCount() {
14658 return lon_.size();
14659 }
14660 /**
14661 * <code>repeated sint64 lon = 10 [packed = true];</code>
14662 * @param index The index of the element to return.
14663 * @return The lon at the given index.
14664 */
14665 public long getLon(int index) {
14666 return lon_.getLong(index);
14667 }
14668 private int lonMemoizedSerializedSize = -1;
14669
14670 private byte memoizedIsInitialized = -1;
14671 @java.lang.Override
14672 public final boolean isInitialized() {
14673 byte isInitialized = memoizedIsInitialized;
14674 if (isInitialized == 1) return true;
14675 if (isInitialized == 0) return false;
14676
14677 if (!hasId()) {
14678 memoizedIsInitialized = 0;
14679 return false;
14680 }
14681 memoizedIsInitialized = 1;
14682 return true;
14683 }
14684
14685 @java.lang.Override
14686 public void writeTo(com.google.protobuf.CodedOutputStream output)
14687 throws java.io.IOException {
14688 getSerializedSize();
14689 if (((bitField0_ & 0x00000001) != 0)) {
14690 output.writeInt64(1, id_);
14691 }
14692 if (getKeysList().size() > 0) {
14693 output.writeUInt32NoTag(18);
14694 output.writeUInt32NoTag(keysMemoizedSerializedSize);
14695 }
14696 for (int i = 0; i < keys_.size(); i++) {
14697 output.writeUInt32NoTag(keys_.getInt(i));
14698 }
14699 if (getValsList().size() > 0) {
14700 output.writeUInt32NoTag(26);
14701 output.writeUInt32NoTag(valsMemoizedSerializedSize);
14702 }
14703 for (int i = 0; i < vals_.size(); i++) {
14704 output.writeUInt32NoTag(vals_.getInt(i));
14705 }
14706 if (((bitField0_ & 0x00000002) != 0)) {
14707 output.writeMessage(4, getInfo());
14708 }
14709 if (getRefsList().size() > 0) {
14710 output.writeUInt32NoTag(66);
14711 output.writeUInt32NoTag(refsMemoizedSerializedSize);
14712 }
14713 for (int i = 0; i < refs_.size(); i++) {
14714 output.writeSInt64NoTag(refs_.getLong(i));
14715 }
14716 if (getLatList().size() > 0) {
14717 output.writeUInt32NoTag(74);
14718 output.writeUInt32NoTag(latMemoizedSerializedSize);
14719 }
14720 for (int i = 0; i < lat_.size(); i++) {
14721 output.writeSInt64NoTag(lat_.getLong(i));
14722 }
14723 if (getLonList().size() > 0) {
14724 output.writeUInt32NoTag(82);
14725 output.writeUInt32NoTag(lonMemoizedSerializedSize);
14726 }
14727 for (int i = 0; i < lon_.size(); i++) {
14728 output.writeSInt64NoTag(lon_.getLong(i));
14729 }
14730 unknownFields.writeTo(output);
14731 }
14732
14733 @java.lang.Override
14734 public int getSerializedSize() {
14735 int size = memoizedSize;
14736 if (size != -1) return size;
14737
14738 size = 0;
14739 if (((bitField0_ & 0x00000001) != 0)) {
14740 size += com.google.protobuf.CodedOutputStream
14741 .computeInt64Size(1, id_);
14742 }
14743 {
14744 int dataSize = 0;
14745 for (int i = 0; i < keys_.size(); i++) {
14746 dataSize += com.google.protobuf.CodedOutputStream
14747 .computeUInt32SizeNoTag(keys_.getInt(i));
14748 }
14749 size += dataSize;
14750 if (!getKeysList().isEmpty()) {
14751 size += 1;
14752 size += com.google.protobuf.CodedOutputStream
14753 .computeInt32SizeNoTag(dataSize);
14754 }
14755 keysMemoizedSerializedSize = dataSize;
14756 }
14757 {
14758 int dataSize = 0;
14759 for (int i = 0; i < vals_.size(); i++) {
14760 dataSize += com.google.protobuf.CodedOutputStream
14761 .computeUInt32SizeNoTag(vals_.getInt(i));
14762 }
14763 size += dataSize;
14764 if (!getValsList().isEmpty()) {
14765 size += 1;
14766 size += com.google.protobuf.CodedOutputStream
14767 .computeInt32SizeNoTag(dataSize);
14768 }
14769 valsMemoizedSerializedSize = dataSize;
14770 }
14771 if (((bitField0_ & 0x00000002) != 0)) {
14772 size += com.google.protobuf.CodedOutputStream
14773 .computeMessageSize(4, getInfo());
14774 }
14775 {
14776 int dataSize = 0;
14777 for (int i = 0; i < refs_.size(); i++) {
14778 dataSize += com.google.protobuf.CodedOutputStream
14779 .computeSInt64SizeNoTag(refs_.getLong(i));
14780 }
14781 size += dataSize;
14782 if (!getRefsList().isEmpty()) {
14783 size += 1;
14784 size += com.google.protobuf.CodedOutputStream
14785 .computeInt32SizeNoTag(dataSize);
14786 }
14787 refsMemoizedSerializedSize = dataSize;
14788 }
14789 {
14790 int dataSize = 0;
14791 for (int i = 0; i < lat_.size(); i++) {
14792 dataSize += com.google.protobuf.CodedOutputStream
14793 .computeSInt64SizeNoTag(lat_.getLong(i));
14794 }
14795 size += dataSize;
14796 if (!getLatList().isEmpty()) {
14797 size += 1;
14798 size += com.google.protobuf.CodedOutputStream
14799 .computeInt32SizeNoTag(dataSize);
14800 }
14801 latMemoizedSerializedSize = dataSize;
14802 }
14803 {
14804 int dataSize = 0;
14805 for (int i = 0; i < lon_.size(); i++) {
14806 dataSize += com.google.protobuf.CodedOutputStream
14807 .computeSInt64SizeNoTag(lon_.getLong(i));
14808 }
14809 size += dataSize;
14810 if (!getLonList().isEmpty()) {
14811 size += 1;
14812 size += com.google.protobuf.CodedOutputStream
14813 .computeInt32SizeNoTag(dataSize);
14814 }
14815 lonMemoizedSerializedSize = dataSize;
14816 }
14817 size += unknownFields.getSerializedSize();
14818 memoizedSize = size;
14819 return size;
14820 }
14821
14822 @java.lang.Override
14823 public boolean equals(final java.lang.Object obj) {
14824 if (obj == this) {
14825 return true;
14826 }
14827 if (!(obj instanceof org.openstreetmap.osmosis.osmbinary.Osmformat.Way)) {
14828 return super.equals(obj);
14829 }
14830 org.openstreetmap.osmosis.osmbinary.Osmformat.Way other = (org.openstreetmap.osmosis.osmbinary.Osmformat.Way) obj;
14831
14832 if (hasId() != other.hasId()) return false;
14833 if (hasId()) {
14834 if (getId()
14835 != other.getId()) return false;
14836 }
14837 if (!getKeysList()
14838 .equals(other.getKeysList())) return false;
14839 if (!getValsList()
14840 .equals(other.getValsList())) return false;
14841 if (hasInfo() != other.hasInfo()) return false;
14842 if (hasInfo()) {
14843 if (!getInfo()
14844 .equals(other.getInfo())) return false;
14845 }
14846 if (!getRefsList()
14847 .equals(other.getRefsList())) return false;
14848 if (!getLatList()
14849 .equals(other.getLatList())) return false;
14850 if (!getLonList()
14851 .equals(other.getLonList())) return false;
14852 if (!unknownFields.equals(other.unknownFields)) return false;
14853 return true;
14854 }
14855
14856 @java.lang.Override
14857 public int hashCode() {
14858 if (memoizedHashCode != 0) {
14859 return memoizedHashCode;
14860 }
14861 int hash = 41;
14862 hash = (19 * hash) + getDescriptor().hashCode();
14863 if (hasId()) {
14864 hash = (37 * hash) + ID_FIELD_NUMBER;
14865 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
14866 getId());
14867 }
14868 if (getKeysCount() > 0) {
14869 hash = (37 * hash) + KEYS_FIELD_NUMBER;
14870 hash = (53 * hash) + getKeysList().hashCode();
14871 }
14872 if (getValsCount() > 0) {
14873 hash = (37 * hash) + VALS_FIELD_NUMBER;
14874 hash = (53 * hash) + getValsList().hashCode();
14875 }
14876 if (hasInfo()) {
14877 hash = (37 * hash) + INFO_FIELD_NUMBER;
14878 hash = (53 * hash) + getInfo().hashCode();
14879 }
14880 if (getRefsCount() > 0) {
14881 hash = (37 * hash) + REFS_FIELD_NUMBER;
14882 hash = (53 * hash) + getRefsList().hashCode();
14883 }
14884 if (getLatCount() > 0) {
14885 hash = (37 * hash) + LAT_FIELD_NUMBER;
14886 hash = (53 * hash) + getLatList().hashCode();
14887 }
14888 if (getLonCount() > 0) {
14889 hash = (37 * hash) + LON_FIELD_NUMBER;
14890 hash = (53 * hash) + getLonList().hashCode();
14891 }
14892 hash = (29 * hash) + unknownFields.hashCode();
14893 memoizedHashCode = hash;
14894 return hash;
14895 }
14896
14897 public static org.openstreetmap.osmosis.osmbinary.Osmformat.Way parseFrom(
14898 java.nio.ByteBuffer data)
14899 throws com.google.protobuf.InvalidProtocolBufferException {
14900 return PARSER.parseFrom(data);
14901 }
14902 public static org.openstreetmap.osmosis.osmbinary.Osmformat.Way parseFrom(
14903 java.nio.ByteBuffer data,
14904 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
14905 throws com.google.protobuf.InvalidProtocolBufferException {
14906 return PARSER.parseFrom(data, extensionRegistry);
14907 }
14908 public static org.openstreetmap.osmosis.osmbinary.Osmformat.Way parseFrom(
14909 com.google.protobuf.ByteString data)
14910 throws com.google.protobuf.InvalidProtocolBufferException {
14911 return PARSER.parseFrom(data);
14912 }
14913 public static org.openstreetmap.osmosis.osmbinary.Osmformat.Way parseFrom(
14914 com.google.protobuf.ByteString data,
14915 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
14916 throws com.google.protobuf.InvalidProtocolBufferException {
14917 return PARSER.parseFrom(data, extensionRegistry);
14918 }
14919 public static org.openstreetmap.osmosis.osmbinary.Osmformat.Way parseFrom(byte[] data)
14920 throws com.google.protobuf.InvalidProtocolBufferException {
14921 return PARSER.parseFrom(data);
14922 }
14923 public static org.openstreetmap.osmosis.osmbinary.Osmformat.Way parseFrom(
14924 byte[] data,
14925 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
14926 throws com.google.protobuf.InvalidProtocolBufferException {
14927 return PARSER.parseFrom(data, extensionRegistry);
14928 }
14929 public static org.openstreetmap.osmosis.osmbinary.Osmformat.Way parseFrom(java.io.InputStream input)
14930 throws java.io.IOException {
14931 return com.google.protobuf.GeneratedMessageV3
14932 .parseWithIOException(PARSER, input);
14933 }
14934 public static org.openstreetmap.osmosis.osmbinary.Osmformat.Way parseFrom(
14935 java.io.InputStream input,
14936 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
14937 throws java.io.IOException {
14938 return com.google.protobuf.GeneratedMessageV3
14939 .parseWithIOException(PARSER, input, extensionRegistry);
14940 }
14941 public static org.openstreetmap.osmosis.osmbinary.Osmformat.Way parseDelimitedFrom(java.io.InputStream input)
14942 throws java.io.IOException {
14943 return com.google.protobuf.GeneratedMessageV3
14944 .parseDelimitedWithIOException(PARSER, input);
14945 }
14946 public static org.openstreetmap.osmosis.osmbinary.Osmformat.Way parseDelimitedFrom(
14947 java.io.InputStream input,
14948 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
14949 throws java.io.IOException {
14950 return com.google.protobuf.GeneratedMessageV3
14951 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
14952 }
14953 public static org.openstreetmap.osmosis.osmbinary.Osmformat.Way parseFrom(
14954 com.google.protobuf.CodedInputStream input)
14955 throws java.io.IOException {
14956 return com.google.protobuf.GeneratedMessageV3
14957 .parseWithIOException(PARSER, input);
14958 }
14959 public static org.openstreetmap.osmosis.osmbinary.Osmformat.Way parseFrom(
14960 com.google.protobuf.CodedInputStream input,
14961 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
14962 throws java.io.IOException {
14963 return com.google.protobuf.GeneratedMessageV3
14964 .parseWithIOException(PARSER, input, extensionRegistry);
14965 }
14966
14967 @java.lang.Override
14968 public Builder newBuilderForType() { return newBuilder(); }
14969 public static Builder newBuilder() {
14970 return DEFAULT_INSTANCE.toBuilder();
14971 }
14972 public static Builder newBuilder(org.openstreetmap.osmosis.osmbinary.Osmformat.Way prototype) {
14973 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
14974 }
14975 @java.lang.Override
14976 public Builder toBuilder() {
14977 return this == DEFAULT_INSTANCE
14978 ? new Builder() : new Builder().mergeFrom(this);
14979 }
14980
14981 @java.lang.Override
14982 protected Builder newBuilderForType(
14983 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
14984 Builder builder = new Builder(parent);
14985 return builder;
14986 }
14987 /**
14988 * Protobuf type {@code OSMPBF.Way}
14989 */
14990 public static final class Builder extends
14991 com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
14992 // @@protoc_insertion_point(builder_implements:OSMPBF.Way)
14993 org.openstreetmap.osmosis.osmbinary.Osmformat.WayOrBuilder {
14994 public static final com.google.protobuf.Descriptors.Descriptor
14995 getDescriptor() {
14996 return org.openstreetmap.osmosis.osmbinary.Osmformat.internal_static_OSMPBF_Way_descriptor;
14997 }
14998
14999 @java.lang.Override
15000 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
15001 internalGetFieldAccessorTable() {
15002 return org.openstreetmap.osmosis.osmbinary.Osmformat.internal_static_OSMPBF_Way_fieldAccessorTable
15003 .ensureFieldAccessorsInitialized(
15004 org.openstreetmap.osmosis.osmbinary.Osmformat.Way.class, org.openstreetmap.osmosis.osmbinary.Osmformat.Way.Builder.class);
15005 }
15006
15007 // Construct using org.openstreetmap.osmosis.osmbinary.Osmformat.Way.newBuilder()
15008 private Builder() {
15009 maybeForceBuilderInitialization();
15010 }
15011
15012 private Builder(
15013 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
15014 super(parent);
15015 maybeForceBuilderInitialization();
15016 }
15017 private void maybeForceBuilderInitialization() {
15018 if (com.google.protobuf.GeneratedMessageV3
15019 .alwaysUseFieldBuilders) {
15020 getInfoFieldBuilder();
15021 }
15022 }
15023 @java.lang.Override
15024 public Builder clear() {
15025 super.clear();
15026 id_ = 0L;
15027 bitField0_ = (bitField0_ & ~0x00000001);
15028 keys_ = emptyIntList();
15029 bitField0_ = (bitField0_ & ~0x00000002);
15030 vals_ = emptyIntList();
15031 bitField0_ = (bitField0_ & ~0x00000004);
15032 if (infoBuilder_ == null) {
15033 info_ = null;
15034 } else {
15035 infoBuilder_.clear();
15036 }
15037 bitField0_ = (bitField0_ & ~0x00000008);
15038 refs_ = emptyLongList();
15039 bitField0_ = (bitField0_ & ~0x00000010);
15040 lat_ = emptyLongList();
15041 bitField0_ = (bitField0_ & ~0x00000020);
15042 lon_ = emptyLongList();
15043 bitField0_ = (bitField0_ & ~0x00000040);
15044 return this;
15045 }
15046
15047 @java.lang.Override
15048 public com.google.protobuf.Descriptors.Descriptor
15049 getDescriptorForType() {
15050 return org.openstreetmap.osmosis.osmbinary.Osmformat.internal_static_OSMPBF_Way_descriptor;
15051 }
15052
15053 @java.lang.Override
15054 public org.openstreetmap.osmosis.osmbinary.Osmformat.Way getDefaultInstanceForType() {
15055 return org.openstreetmap.osmosis.osmbinary.Osmformat.Way.getDefaultInstance();
15056 }
15057
15058 @java.lang.Override
15059 public org.openstreetmap.osmosis.osmbinary.Osmformat.Way build() {
15060 org.openstreetmap.osmosis.osmbinary.Osmformat.Way result = buildPartial();
15061 if (!result.isInitialized()) {
15062 throw newUninitializedMessageException(result);
15063 }
15064 return result;
15065 }
15066
15067 @java.lang.Override
15068 public org.openstreetmap.osmosis.osmbinary.Osmformat.Way buildPartial() {
15069 org.openstreetmap.osmosis.osmbinary.Osmformat.Way result = new org.openstreetmap.osmosis.osmbinary.Osmformat.Way(this);
15070 int from_bitField0_ = bitField0_;
15071 int to_bitField0_ = 0;
15072 if (((from_bitField0_ & 0x00000001) != 0)) {
15073 result.id_ = id_;
15074 to_bitField0_ |= 0x00000001;
15075 }
15076 if (((bitField0_ & 0x00000002) != 0)) {
15077 keys_.makeImmutable();
15078 bitField0_ = (bitField0_ & ~0x00000002);
15079 }
15080 result.keys_ = keys_;
15081 if (((bitField0_ & 0x00000004) != 0)) {
15082 vals_.makeImmutable();
15083 bitField0_ = (bitField0_ & ~0x00000004);
15084 }
15085 result.vals_ = vals_;
15086 if (((from_bitField0_ & 0x00000008) != 0)) {
15087 if (infoBuilder_ == null) {
15088 result.info_ = info_;
15089 } else {
15090 result.info_ = infoBuilder_.build();
15091 }
15092 to_bitField0_ |= 0x00000002;
15093 }
15094 if (((bitField0_ & 0x00000010) != 0)) {
15095 refs_.makeImmutable();
15096 bitField0_ = (bitField0_ & ~0x00000010);
15097 }
15098 result.refs_ = refs_;
15099 if (((bitField0_ & 0x00000020) != 0)) {
15100 lat_.makeImmutable();
15101 bitField0_ = (bitField0_ & ~0x00000020);
15102 }
15103 result.lat_ = lat_;
15104 if (((bitField0_ & 0x00000040) != 0)) {
15105 lon_.makeImmutable();
15106 bitField0_ = (bitField0_ & ~0x00000040);
15107 }
15108 result.lon_ = lon_;
15109 result.bitField0_ = to_bitField0_;
15110 onBuilt();
15111 return result;
15112 }
15113
15114 @java.lang.Override
15115 public Builder clone() {
15116 return super.clone();
15117 }
15118 @java.lang.Override
15119 public Builder setField(
15120 com.google.protobuf.Descriptors.FieldDescriptor field,
15121 java.lang.Object value) {
15122 return super.setField(field, value);
15123 }
15124 @java.lang.Override
15125 public Builder clearField(
15126 com.google.protobuf.Descriptors.FieldDescriptor field) {
15127 return super.clearField(field);
15128 }
15129 @java.lang.Override
15130 public Builder clearOneof(
15131 com.google.protobuf.Descriptors.OneofDescriptor oneof) {
15132 return super.clearOneof(oneof);
15133 }
15134 @java.lang.Override
15135 public Builder setRepeatedField(
15136 com.google.protobuf.Descriptors.FieldDescriptor field,
15137 int index, java.lang.Object value) {
15138 return super.setRepeatedField(field, index, value);
15139 }
15140 @java.lang.Override
15141 public Builder addRepeatedField(
15142 com.google.protobuf.Descriptors.FieldDescriptor field,
15143 java.lang.Object value) {
15144 return super.addRepeatedField(field, value);
15145 }
15146 @java.lang.Override
15147 public Builder mergeFrom(com.google.protobuf.Message other) {
15148 if (other instanceof org.openstreetmap.osmosis.osmbinary.Osmformat.Way) {
15149 return mergeFrom((org.openstreetmap.osmosis.osmbinary.Osmformat.Way)other);
15150 } else {
15151 super.mergeFrom(other);
15152 return this;
15153 }
15154 }
15155
15156 public Builder mergeFrom(org.openstreetmap.osmosis.osmbinary.Osmformat.Way other) {
15157 if (other == org.openstreetmap.osmosis.osmbinary.Osmformat.Way.getDefaultInstance()) return this;
15158 if (other.hasId()) {
15159 setId(other.getId());
15160 }
15161 if (!other.keys_.isEmpty()) {
15162 if (keys_.isEmpty()) {
15163 keys_ = other.keys_;
15164 bitField0_ = (bitField0_ & ~0x00000002);
15165 } else {
15166 ensureKeysIsMutable();
15167 keys_.addAll(other.keys_);
15168 }
15169 onChanged();
15170 }
15171 if (!other.vals_.isEmpty()) {
15172 if (vals_.isEmpty()) {
15173 vals_ = other.vals_;
15174 bitField0_ = (bitField0_ & ~0x00000004);
15175 } else {
15176 ensureValsIsMutable();
15177 vals_.addAll(other.vals_);
15178 }
15179 onChanged();
15180 }
15181 if (other.hasInfo()) {
15182 mergeInfo(other.getInfo());
15183 }
15184 if (!other.refs_.isEmpty()) {
15185 if (refs_.isEmpty()) {
15186 refs_ = other.refs_;
15187 bitField0_ = (bitField0_ & ~0x00000010);
15188 } else {
15189 ensureRefsIsMutable();
15190 refs_.addAll(other.refs_);
15191 }
15192 onChanged();
15193 }
15194 if (!other.lat_.isEmpty()) {
15195 if (lat_.isEmpty()) {
15196 lat_ = other.lat_;
15197 bitField0_ = (bitField0_ & ~0x00000020);
15198 } else {
15199 ensureLatIsMutable();
15200 lat_.addAll(other.lat_);
15201 }
15202 onChanged();
15203 }
15204 if (!other.lon_.isEmpty()) {
15205 if (lon_.isEmpty()) {
15206 lon_ = other.lon_;
15207 bitField0_ = (bitField0_ & ~0x00000040);
15208 } else {
15209 ensureLonIsMutable();
15210 lon_.addAll(other.lon_);
15211 }
15212 onChanged();
15213 }
15214 this.mergeUnknownFields(other.unknownFields);
15215 onChanged();
15216 return this;
15217 }
15218
15219 @java.lang.Override
15220 public final boolean isInitialized() {
15221 if (!hasId()) {
15222 return false;
15223 }
15224 return true;
15225 }
15226
15227 @java.lang.Override
15228 public Builder mergeFrom(
15229 com.google.protobuf.CodedInputStream input,
15230 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
15231 throws java.io.IOException {
15232 org.openstreetmap.osmosis.osmbinary.Osmformat.Way parsedMessage = null;
15233 try {
15234 parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
15235 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
15236 parsedMessage = (org.openstreetmap.osmosis.osmbinary.Osmformat.Way) e.getUnfinishedMessage();
15237 throw e.unwrapIOException();
15238 } finally {
15239 if (parsedMessage != null) {
15240 mergeFrom(parsedMessage);
15241 }
15242 }
15243 return this;
15244 }
15245 private int bitField0_;
15246
15247 private long id_ ;
15248 /**
15249 * <code>required int64 id = 1;</code>
15250 * @return Whether the id field is set.
15251 */
15252 @java.lang.Override
15253 public boolean hasId() {
15254 return ((bitField0_ & 0x00000001) != 0);
15255 }
15256 /**
15257 * <code>required int64 id = 1;</code>
15258 * @return The id.
15259 */
15260 @java.lang.Override
15261 public long getId() {
15262 return id_;
15263 }
15264 /**
15265 * <code>required int64 id = 1;</code>
15266 * @param value The id to set.
15267 * @return This builder for chaining.
15268 */
15269 public Builder setId(long value) {
15270 bitField0_ |= 0x00000001;
15271 id_ = value;
15272 onChanged();
15273 return this;
15274 }
15275 /**
15276 * <code>required int64 id = 1;</code>
15277 * @return This builder for chaining.
15278 */
15279 public Builder clearId() {
15280 bitField0_ = (bitField0_ & ~0x00000001);
15281 id_ = 0L;
15282 onChanged();
15283 return this;
15284 }
15285
15286 private com.google.protobuf.Internal.IntList keys_ = emptyIntList();
15287 private void ensureKeysIsMutable() {
15288 if (!((bitField0_ & 0x00000002) != 0)) {
15289 keys_ = mutableCopy(keys_);
15290 bitField0_ |= 0x00000002;
15291 }
15292 }
15293 /**
15294 * <pre>
15295 * Parallel arrays.
15296 * </pre>
15297 *
15298 * <code>repeated uint32 keys = 2 [packed = true];</code>
15299 * @return A list containing the keys.
15300 */
15301 public java.util.List<java.lang.Integer>
15302 getKeysList() {
15303 return ((bitField0_ & 0x00000002) != 0) ?
15304 java.util.Collections.unmodifiableList(keys_) : keys_;
15305 }
15306 /**
15307 * <pre>
15308 * Parallel arrays.
15309 * </pre>
15310 *
15311 * <code>repeated uint32 keys = 2 [packed = true];</code>
15312 * @return The count of keys.
15313 */
15314 public int getKeysCount() {
15315 return keys_.size();
15316 }
15317 /**
15318 * <pre>
15319 * Parallel arrays.
15320 * </pre>
15321 *
15322 * <code>repeated uint32 keys = 2 [packed = true];</code>
15323 * @param index The index of the element to return.
15324 * @return The keys at the given index.
15325 */
15326 public int getKeys(int index) {
15327 return keys_.getInt(index);
15328 }
15329 /**
15330 * <pre>
15331 * Parallel arrays.
15332 * </pre>
15333 *
15334 * <code>repeated uint32 keys = 2 [packed = true];</code>
15335 * @param index The index to set the value at.
15336 * @param value The keys to set.
15337 * @return This builder for chaining.
15338 */
15339 public Builder setKeys(
15340 int index, int value) {
15341 ensureKeysIsMutable();
15342 keys_.setInt(index, value);
15343 onChanged();
15344 return this;
15345 }
15346 /**
15347 * <pre>
15348 * Parallel arrays.
15349 * </pre>
15350 *
15351 * <code>repeated uint32 keys = 2 [packed = true];</code>
15352 * @param value The keys to add.
15353 * @return This builder for chaining.
15354 */
15355 public Builder addKeys(int value) {
15356 ensureKeysIsMutable();
15357 keys_.addInt(value);
15358 onChanged();
15359 return this;
15360 }
15361 /**
15362 * <pre>
15363 * Parallel arrays.
15364 * </pre>
15365 *
15366 * <code>repeated uint32 keys = 2 [packed = true];</code>
15367 * @param values The keys to add.
15368 * @return This builder for chaining.
15369 */
15370 public Builder addAllKeys(
15371 java.lang.Iterable<? extends java.lang.Integer> values) {
15372 ensureKeysIsMutable();
15373 com.google.protobuf.AbstractMessageLite.Builder.addAll(
15374 values, keys_);
15375 onChanged();
15376 return this;
15377 }
15378 /**
15379 * <pre>
15380 * Parallel arrays.
15381 * </pre>
15382 *
15383 * <code>repeated uint32 keys = 2 [packed = true];</code>
15384 * @return This builder for chaining.
15385 */
15386 public Builder clearKeys() {
15387 keys_ = emptyIntList();
15388 bitField0_ = (bitField0_ & ~0x00000002);
15389 onChanged();
15390 return this;
15391 }
15392
15393 private com.google.protobuf.Internal.IntList vals_ = emptyIntList();
15394 private void ensureValsIsMutable() {
15395 if (!((bitField0_ & 0x00000004) != 0)) {
15396 vals_ = mutableCopy(vals_);
15397 bitField0_ |= 0x00000004;
15398 }
15399 }
15400 /**
15401 * <code>repeated uint32 vals = 3 [packed = true];</code>
15402 * @return A list containing the vals.
15403 */
15404 public java.util.List<java.lang.Integer>
15405 getValsList() {
15406 return ((bitField0_ & 0x00000004) != 0) ?
15407 java.util.Collections.unmodifiableList(vals_) : vals_;
15408 }
15409 /**
15410 * <code>repeated uint32 vals = 3 [packed = true];</code>
15411 * @return The count of vals.
15412 */
15413 public int getValsCount() {
15414 return vals_.size();
15415 }
15416 /**
15417 * <code>repeated uint32 vals = 3 [packed = true];</code>
15418 * @param index The index of the element to return.
15419 * @return The vals at the given index.
15420 */
15421 public int getVals(int index) {
15422 return vals_.getInt(index);
15423 }
15424 /**
15425 * <code>repeated uint32 vals = 3 [packed = true];</code>
15426 * @param index The index to set the value at.
15427 * @param value The vals to set.
15428 * @return This builder for chaining.
15429 */
15430 public Builder setVals(
15431 int index, int value) {
15432 ensureValsIsMutable();
15433 vals_.setInt(index, value);
15434 onChanged();
15435 return this;
15436 }
15437 /**
15438 * <code>repeated uint32 vals = 3 [packed = true];</code>
15439 * @param value The vals to add.
15440 * @return This builder for chaining.
15441 */
15442 public Builder addVals(int value) {
15443 ensureValsIsMutable();
15444 vals_.addInt(value);
15445 onChanged();
15446 return this;
15447 }
15448 /**
15449 * <code>repeated uint32 vals = 3 [packed = true];</code>
15450 * @param values The vals to add.
15451 * @return This builder for chaining.
15452 */
15453 public Builder addAllVals(
15454 java.lang.Iterable<? extends java.lang.Integer> values) {
15455 ensureValsIsMutable();
15456 com.google.protobuf.AbstractMessageLite.Builder.addAll(
15457 values, vals_);
15458 onChanged();
15459 return this;
15460 }
15461 /**
15462 * <code>repeated uint32 vals = 3 [packed = true];</code>
15463 * @return This builder for chaining.
15464 */
15465 public Builder clearVals() {
15466 vals_ = emptyIntList();
15467 bitField0_ = (bitField0_ & ~0x00000004);
15468 onChanged();
15469 return this;
15470 }
15471
15472 private org.openstreetmap.osmosis.osmbinary.Osmformat.Info info_;
15473 private com.google.protobuf.SingleFieldBuilderV3<
15474 org.openstreetmap.osmosis.osmbinary.Osmformat.Info, org.openstreetmap.osmosis.osmbinary.Osmformat.Info.Builder, org.openstreetmap.osmosis.osmbinary.Osmformat.InfoOrBuilder> infoBuilder_;
15475 /**
15476 * <code>optional .OSMPBF.Info info = 4;</code>
15477 * @return Whether the info field is set.
15478 */
15479 public boolean hasInfo() {
15480 return ((bitField0_ & 0x00000008) != 0);
15481 }
15482 /**
15483 * <code>optional .OSMPBF.Info info = 4;</code>
15484 * @return The info.
15485 */
15486 public org.openstreetmap.osmosis.osmbinary.Osmformat.Info getInfo() {
15487 if (infoBuilder_ == null) {
15488 return info_ == null ? org.openstreetmap.osmosis.osmbinary.Osmformat.Info.getDefaultInstance() : info_;
15489 } else {
15490 return infoBuilder_.getMessage();
15491 }
15492 }
15493 /**
15494 * <code>optional .OSMPBF.Info info = 4;</code>
15495 */
15496 public Builder setInfo(org.openstreetmap.osmosis.osmbinary.Osmformat.Info value) {
15497 if (infoBuilder_ == null) {
15498 if (value == null) {
15499 throw new NullPointerException();
15500 }
15501 info_ = value;
15502 onChanged();
15503 } else {
15504 infoBuilder_.setMessage(value);
15505 }
15506 bitField0_ |= 0x00000008;
15507 return this;
15508 }
15509 /**
15510 * <code>optional .OSMPBF.Info info = 4;</code>
15511 */
15512 public Builder setInfo(
15513 org.openstreetmap.osmosis.osmbinary.Osmformat.Info.Builder builderForValue) {
15514 if (infoBuilder_ == null) {
15515 info_ = builderForValue.build();
15516 onChanged();
15517 } else {
15518 infoBuilder_.setMessage(builderForValue.build());
15519 }
15520 bitField0_ |= 0x00000008;
15521 return this;
15522 }
15523 /**
15524 * <code>optional .OSMPBF.Info info = 4;</code>
15525 */
15526 public Builder mergeInfo(org.openstreetmap.osmosis.osmbinary.Osmformat.Info value) {
15527 if (infoBuilder_ == null) {
15528 if (((bitField0_ & 0x00000008) != 0) &&
15529 info_ != null &&
15530 info_ != org.openstreetmap.osmosis.osmbinary.Osmformat.Info.getDefaultInstance()) {
15531 info_ =
15532 org.openstreetmap.osmosis.osmbinary.Osmformat.Info.newBuilder(info_).mergeFrom(value).buildPartial();
15533 } else {
15534 info_ = value;
15535 }
15536 onChanged();
15537 } else {
15538 infoBuilder_.mergeFrom(value);
15539 }
15540 bitField0_ |= 0x00000008;
15541 return this;
15542 }
15543 /**
15544 * <code>optional .OSMPBF.Info info = 4;</code>
15545 */
15546 public Builder clearInfo() {
15547 if (infoBuilder_ == null) {
15548 info_ = null;
15549 onChanged();
15550 } else {
15551 infoBuilder_.clear();
15552 }
15553 bitField0_ = (bitField0_ & ~0x00000008);
15554 return this;
15555 }
15556 /**
15557 * <code>optional .OSMPBF.Info info = 4;</code>
15558 */
15559 public org.openstreetmap.osmosis.osmbinary.Osmformat.Info.Builder getInfoBuilder() {
15560 bitField0_ |= 0x00000008;
15561 onChanged();
15562 return getInfoFieldBuilder().getBuilder();
15563 }
15564 /**
15565 * <code>optional .OSMPBF.Info info = 4;</code>
15566 */
15567 public org.openstreetmap.osmosis.osmbinary.Osmformat.InfoOrBuilder getInfoOrBuilder() {
15568 if (infoBuilder_ != null) {
15569 return infoBuilder_.getMessageOrBuilder();
15570 } else {
15571 return info_ == null ?
15572 org.openstreetmap.osmosis.osmbinary.Osmformat.Info.getDefaultInstance() : info_;
15573 }
15574 }
15575 /**
15576 * <code>optional .OSMPBF.Info info = 4;</code>
15577 */
15578 private com.google.protobuf.SingleFieldBuilderV3<
15579 org.openstreetmap.osmosis.osmbinary.Osmformat.Info, org.openstreetmap.osmosis.osmbinary.Osmformat.Info.Builder, org.openstreetmap.osmosis.osmbinary.Osmformat.InfoOrBuilder>
15580 getInfoFieldBuilder() {
15581 if (infoBuilder_ == null) {
15582 infoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
15583 org.openstreetmap.osmosis.osmbinary.Osmformat.Info, org.openstreetmap.osmosis.osmbinary.Osmformat.Info.Builder, org.openstreetmap.osmosis.osmbinary.Osmformat.InfoOrBuilder>(
15584 getInfo(),
15585 getParentForChildren(),
15586 isClean());
15587 info_ = null;
15588 }
15589 return infoBuilder_;
15590 }
15591
15592 private com.google.protobuf.Internal.LongList refs_ = emptyLongList();
15593 private void ensureRefsIsMutable() {
15594 if (!((bitField0_ & 0x00000010) != 0)) {
15595 refs_ = mutableCopy(refs_);
15596 bitField0_ |= 0x00000010;
15597 }
15598 }
15599 /**
15600 * <pre>
15601 * DELTA coded
15602 * </pre>
15603 *
15604 * <code>repeated sint64 refs = 8 [packed = true];</code>
15605 * @return A list containing the refs.
15606 */
15607 public java.util.List<java.lang.Long>
15608 getRefsList() {
15609 return ((bitField0_ & 0x00000010) != 0) ?
15610 java.util.Collections.unmodifiableList(refs_) : refs_;
15611 }
15612 /**
15613 * <pre>
15614 * DELTA coded
15615 * </pre>
15616 *
15617 * <code>repeated sint64 refs = 8 [packed = true];</code>
15618 * @return The count of refs.
15619 */
15620 public int getRefsCount() {
15621 return refs_.size();
15622 }
15623 /**
15624 * <pre>
15625 * DELTA coded
15626 * </pre>
15627 *
15628 * <code>repeated sint64 refs = 8 [packed = true];</code>
15629 * @param index The index of the element to return.
15630 * @return The refs at the given index.
15631 */
15632 public long getRefs(int index) {
15633 return refs_.getLong(index);
15634 }
15635 /**
15636 * <pre>
15637 * DELTA coded
15638 * </pre>
15639 *
15640 * <code>repeated sint64 refs = 8 [packed = true];</code>
15641 * @param index The index to set the value at.
15642 * @param value The refs to set.
15643 * @return This builder for chaining.
15644 */
15645 public Builder setRefs(
15646 int index, long value) {
15647 ensureRefsIsMutable();
15648 refs_.setLong(index, value);
15649 onChanged();
15650 return this;
15651 }
15652 /**
15653 * <pre>
15654 * DELTA coded
15655 * </pre>
15656 *
15657 * <code>repeated sint64 refs = 8 [packed = true];</code>
15658 * @param value The refs to add.
15659 * @return This builder for chaining.
15660 */
15661 public Builder addRefs(long value) {
15662 ensureRefsIsMutable();
15663 refs_.addLong(value);
15664 onChanged();
15665 return this;
15666 }
15667 /**
15668 * <pre>
15669 * DELTA coded
15670 * </pre>
15671 *
15672 * <code>repeated sint64 refs = 8 [packed = true];</code>
15673 * @param values The refs to add.
15674 * @return This builder for chaining.
15675 */
15676 public Builder addAllRefs(
15677 java.lang.Iterable<? extends java.lang.Long> values) {
15678 ensureRefsIsMutable();
15679 com.google.protobuf.AbstractMessageLite.Builder.addAll(
15680 values, refs_);
15681 onChanged();
15682 return this;
15683 }
15684 /**
15685 * <pre>
15686 * DELTA coded
15687 * </pre>
15688 *
15689 * <code>repeated sint64 refs = 8 [packed = true];</code>
15690 * @return This builder for chaining.
15691 */
15692 public Builder clearRefs() {
15693 refs_ = emptyLongList();
15694 bitField0_ = (bitField0_ & ~0x00000010);
15695 onChanged();
15696 return this;
15697 }
15698
15699 private com.google.protobuf.Internal.LongList lat_ = emptyLongList();
15700 private void ensureLatIsMutable() {
15701 if (!((bitField0_ & 0x00000020) != 0)) {
15702 lat_ = mutableCopy(lat_);
15703 bitField0_ |= 0x00000020;
15704 }
15705 }
15706 /**
15707 * <code>repeated sint64 lat = 9 [packed = true];</code>
15708 * @return A list containing the lat.
15709 */
15710 public java.util.List<java.lang.Long>
15711 getLatList() {
15712 return ((bitField0_ & 0x00000020) != 0) ?
15713 java.util.Collections.unmodifiableList(lat_) : lat_;
15714 }
15715 /**
15716 * <code>repeated sint64 lat = 9 [packed = true];</code>
15717 * @return The count of lat.
15718 */
15719 public int getLatCount() {
15720 return lat_.size();
15721 }
15722 /**
15723 * <code>repeated sint64 lat = 9 [packed = true];</code>
15724 * @param index The index of the element to return.
15725 * @return The lat at the given index.
15726 */
15727 public long getLat(int index) {
15728 return lat_.getLong(index);
15729 }
15730 /**
15731 * <code>repeated sint64 lat = 9 [packed = true];</code>
15732 * @param index The index to set the value at.
15733 * @param value The lat to set.
15734 * @return This builder for chaining.
15735 */
15736 public Builder setLat(
15737 int index, long value) {
15738 ensureLatIsMutable();
15739 lat_.setLong(index, value);
15740 onChanged();
15741 return this;
15742 }
15743 /**
15744 * <code>repeated sint64 lat = 9 [packed = true];</code>
15745 * @param value The lat to add.
15746 * @return This builder for chaining.
15747 */
15748 public Builder addLat(long value) {
15749 ensureLatIsMutable();
15750 lat_.addLong(value);
15751 onChanged();
15752 return this;
15753 }
15754 /**
15755 * <code>repeated sint64 lat = 9 [packed = true];</code>
15756 * @param values The lat to add.
15757 * @return This builder for chaining.
15758 */
15759 public Builder addAllLat(
15760 java.lang.Iterable<? extends java.lang.Long> values) {
15761 ensureLatIsMutable();
15762 com.google.protobuf.AbstractMessageLite.Builder.addAll(
15763 values, lat_);
15764 onChanged();
15765 return this;
15766 }
15767 /**
15768 * <code>repeated sint64 lat = 9 [packed = true];</code>
15769 * @return This builder for chaining.
15770 */
15771 public Builder clearLat() {
15772 lat_ = emptyLongList();
15773 bitField0_ = (bitField0_ & ~0x00000020);
15774 onChanged();
15775 return this;
15776 }
15777
15778 private com.google.protobuf.Internal.LongList lon_ = emptyLongList();
15779 private void ensureLonIsMutable() {
15780 if (!((bitField0_ & 0x00000040) != 0)) {
15781 lon_ = mutableCopy(lon_);
15782 bitField0_ |= 0x00000040;
15783 }
15784 }
15785 /**
15786 * <code>repeated sint64 lon = 10 [packed = true];</code>
15787 * @return A list containing the lon.
15788 */
15789 public java.util.List<java.lang.Long>
15790 getLonList() {
15791 return ((bitField0_ & 0x00000040) != 0) ?
15792 java.util.Collections.unmodifiableList(lon_) : lon_;
15793 }
15794 /**
15795 * <code>repeated sint64 lon = 10 [packed = true];</code>
15796 * @return The count of lon.
15797 */
15798 public int getLonCount() {
15799 return lon_.size();
15800 }
15801 /**
15802 * <code>repeated sint64 lon = 10 [packed = true];</code>
15803 * @param index The index of the element to return.
15804 * @return The lon at the given index.
15805 */
15806 public long getLon(int index) {
15807 return lon_.getLong(index);
15808 }
15809 /**
15810 * <code>repeated sint64 lon = 10 [packed = true];</code>
15811 * @param index The index to set the value at.
15812 * @param value The lon to set.
15813 * @return This builder for chaining.
15814 */
15815 public Builder setLon(
15816 int index, long value) {
15817 ensureLonIsMutable();
15818 lon_.setLong(index, value);
15819 onChanged();
15820 return this;
15821 }
15822 /**
15823 * <code>repeated sint64 lon = 10 [packed = true];</code>
15824 * @param value The lon to add.
15825 * @return This builder for chaining.
15826 */
15827 public Builder addLon(long value) {
15828 ensureLonIsMutable();
15829 lon_.addLong(value);
15830 onChanged();
15831 return this;
15832 }
15833 /**
15834 * <code>repeated sint64 lon = 10 [packed = true];</code>
15835 * @param values The lon to add.
15836 * @return This builder for chaining.
15837 */
15838 public Builder addAllLon(
15839 java.lang.Iterable<? extends java.lang.Long> values) {
15840 ensureLonIsMutable();
15841 com.google.protobuf.AbstractMessageLite.Builder.addAll(
15842 values, lon_);
15843 onChanged();
15844 return this;
15845 }
15846 /**
15847 * <code>repeated sint64 lon = 10 [packed = true];</code>
15848 * @return This builder for chaining.
15849 */
15850 public Builder clearLon() {
15851 lon_ = emptyLongList();
15852 bitField0_ = (bitField0_ & ~0x00000040);
15853 onChanged();
15854 return this;
15855 }
15856 @java.lang.Override
15857 public final Builder setUnknownFields(
15858 final com.google.protobuf.UnknownFieldSet unknownFields) {
15859 return super.setUnknownFields(unknownFields);
15860 }
15861
15862 @java.lang.Override
15863 public final Builder mergeUnknownFields(
15864 final com.google.protobuf.UnknownFieldSet unknownFields) {
15865 return super.mergeUnknownFields(unknownFields);
15866 }
15867
15868
15869 // @@protoc_insertion_point(builder_scope:OSMPBF.Way)
15870 }
15871
15872 // @@protoc_insertion_point(class_scope:OSMPBF.Way)
15873 private static final org.openstreetmap.osmosis.osmbinary.Osmformat.Way DEFAULT_INSTANCE;
15874 static {
15875 DEFAULT_INSTANCE = new org.openstreetmap.osmosis.osmbinary.Osmformat.Way();
15876 }
15877
15878 public static org.openstreetmap.osmosis.osmbinary.Osmformat.Way getDefaultInstance() {
15879 return DEFAULT_INSTANCE;
15880 }
15881
15882 @java.lang.Deprecated public static final com.google.protobuf.Parser<Way>
15883 PARSER = new com.google.protobuf.AbstractParser<Way>() {
15884 @java.lang.Override
15885 public Way parsePartialFrom(
15886 com.google.protobuf.CodedInputStream input,
15887 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
15888 throws com.google.protobuf.InvalidProtocolBufferException {
15889 return new Way(input, extensionRegistry);
15890 }
15891 };
15892
15893 public static com.google.protobuf.Parser<Way> parser() {
15894 return PARSER;
15895 }
15896
15897 @java.lang.Override
15898 public com.google.protobuf.Parser<Way> getParserForType() {
15899 return PARSER;
15900 }
15901
15902 @java.lang.Override
15903 public org.openstreetmap.osmosis.osmbinary.Osmformat.Way getDefaultInstanceForType() {
15904 return DEFAULT_INSTANCE;
15905 }
15906
15907 }
15908
15909 public interface RelationOrBuilder extends
15910 // @@protoc_insertion_point(interface_extends:OSMPBF.Relation)
15911 com.google.protobuf.MessageOrBuilder {
15912
15913 /**
15914 * <code>required int64 id = 1;</code>
15915 * @return Whether the id field is set.
15916 */
15917 boolean hasId();
15918 /**
15919 * <code>required int64 id = 1;</code>
15920 * @return The id.
15921 */
15922 long getId();
15923
15924 /**
15925 * <pre>
15926 * Parallel arrays.
15927 * </pre>
15928 *
15929 * <code>repeated uint32 keys = 2 [packed = true];</code>
15930 * @return A list containing the keys.
15931 */
15932 java.util.List<java.lang.Integer> getKeysList();
15933 /**
15934 * <pre>
15935 * Parallel arrays.
15936 * </pre>
15937 *
15938 * <code>repeated uint32 keys = 2 [packed = true];</code>
15939 * @return The count of keys.
15940 */
15941 int getKeysCount();
15942 /**
15943 * <pre>
15944 * Parallel arrays.
15945 * </pre>
15946 *
15947 * <code>repeated uint32 keys = 2 [packed = true];</code>
15948 * @param index The index of the element to return.
15949 * @return The keys at the given index.
15950 */
15951 int getKeys(int index);
15952
15953 /**
15954 * <code>repeated uint32 vals = 3 [packed = true];</code>
15955 * @return A list containing the vals.
15956 */
15957 java.util.List<java.lang.Integer> getValsList();
15958 /**
15959 * <code>repeated uint32 vals = 3 [packed = true];</code>
15960 * @return The count of vals.
15961 */
15962 int getValsCount();
15963 /**
15964 * <code>repeated uint32 vals = 3 [packed = true];</code>
15965 * @param index The index of the element to return.
15966 * @return The vals at the given index.
15967 */
15968 int getVals(int index);
15969
15970 /**
15971 * <code>optional .OSMPBF.Info info = 4;</code>
15972 * @return Whether the info field is set.
15973 */
15974 boolean hasInfo();
15975 /**
15976 * <code>optional .OSMPBF.Info info = 4;</code>
15977 * @return The info.
15978 */
15979 org.openstreetmap.osmosis.osmbinary.Osmformat.Info getInfo();
15980 /**
15981 * <code>optional .OSMPBF.Info info = 4;</code>
15982 */
15983 org.openstreetmap.osmosis.osmbinary.Osmformat.InfoOrBuilder getInfoOrBuilder();
15984
15985 /**
15986 * <pre>
15987 * Parallel arrays
15988 * </pre>
15989 *
15990 * <code>repeated int32 roles_sid = 8 [packed = true];</code>
15991 * @return A list containing the rolesSid.
15992 */
15993 java.util.List<java.lang.Integer> getRolesSidList();
15994 /**
15995 * <pre>
15996 * Parallel arrays
15997 * </pre>
15998 *
15999 * <code>repeated int32 roles_sid = 8 [packed = true];</code>
16000 * @return The count of rolesSid.
16001 */
16002 int getRolesSidCount();
16003 /**
16004 * <pre>
16005 * Parallel arrays
16006 * </pre>
16007 *
16008 * <code>repeated int32 roles_sid = 8 [packed = true];</code>
16009 * @param index The index of the element to return.
16010 * @return The rolesSid at the given index.
16011 */
16012 int getRolesSid(int index);
16013
16014 /**
16015 * <pre>
16016 * DELTA encoded
16017 * </pre>
16018 *
16019 * <code>repeated sint64 memids = 9 [packed = true];</code>
16020 * @return A list containing the memids.
16021 */
16022 java.util.List<java.lang.Long> getMemidsList();
16023 /**
16024 * <pre>
16025 * DELTA encoded
16026 * </pre>
16027 *
16028 * <code>repeated sint64 memids = 9 [packed = true];</code>
16029 * @return The count of memids.
16030 */
16031 int getMemidsCount();
16032 /**
16033 * <pre>
16034 * DELTA encoded
16035 * </pre>
16036 *
16037 * <code>repeated sint64 memids = 9 [packed = true];</code>
16038 * @param index The index of the element to return.
16039 * @return The memids at the given index.
16040 */
16041 long getMemids(int index);
16042
16043 /**
16044 * <code>repeated .OSMPBF.Relation.MemberType types = 10 [packed = true];</code>
16045 * @return A list containing the types.
16046 */
16047 java.util.List<org.openstreetmap.osmosis.osmbinary.Osmformat.Relation.MemberType> getTypesList();
16048 /**
16049 * <code>repeated .OSMPBF.Relation.MemberType types = 10 [packed = true];</code>
16050 * @return The count of types.
16051 */
16052 int getTypesCount();
16053 /**
16054 * <code>repeated .OSMPBF.Relation.MemberType types = 10 [packed = true];</code>
16055 * @param index The index of the element to return.
16056 * @return The types at the given index.
16057 */
16058 org.openstreetmap.osmosis.osmbinary.Osmformat.Relation.MemberType getTypes(int index);
16059 }
16060 /**
16061 * Protobuf type {@code OSMPBF.Relation}
16062 */
16063 public static final class Relation extends
16064 com.google.protobuf.GeneratedMessageV3 implements
16065 // @@protoc_insertion_point(message_implements:OSMPBF.Relation)
16066 RelationOrBuilder {
16067 private static final long serialVersionUID = 0L;
16068 // Use Relation.newBuilder() to construct.
16069 private Relation(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
16070 super(builder);
16071 }
16072 private Relation() {
16073 keys_ = emptyIntList();
16074 vals_ = emptyIntList();
16075 rolesSid_ = emptyIntList();
16076 memids_ = emptyLongList();
16077 types_ = java.util.Collections.emptyList();
16078 }
16079
16080 @java.lang.Override
16081 @SuppressWarnings({"unused"})
16082 protected java.lang.Object newInstance(
16083 UnusedPrivateParameter unused) {
16084 return new Relation();
16085 }
16086
16087 @java.lang.Override
16088 public final com.google.protobuf.UnknownFieldSet
16089 getUnknownFields() {
16090 return this.unknownFields;
16091 }
16092 private Relation(
16093 com.google.protobuf.CodedInputStream input,
16094 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
16095 throws com.google.protobuf.InvalidProtocolBufferException {
16096 this();
16097 if (extensionRegistry == null) {
16098 throw new java.lang.NullPointerException();
16099 }
16100 int mutable_bitField0_ = 0;
16101 com.google.protobuf.UnknownFieldSet.Builder unknownFields =
16102 com.google.protobuf.UnknownFieldSet.newBuilder();
16103 try {
16104 boolean done = false;
16105 while (!done) {
16106 int tag = input.readTag();
16107 switch (tag) {
16108 case 0:
16109 done = true;
16110 break;
16111 case 8: {
16112 bitField0_ |= 0x00000001;
16113 id_ = input.readInt64();
16114 break;
16115 }
16116 case 16: {
16117 if (!((mutable_bitField0_ & 0x00000002) != 0)) {
16118 keys_ = newIntList();
16119 mutable_bitField0_ |= 0x00000002;
16120 }
16121 keys_.addInt(input.readUInt32());
16122 break;
16123 }
16124 case 18: {
16125 int length = input.readRawVarint32();
16126 int limit = input.pushLimit(length);
16127 if (!((mutable_bitField0_ & 0x00000002) != 0) && input.getBytesUntilLimit() > 0) {
16128 keys_ = newIntList();
16129 mutable_bitField0_ |= 0x00000002;
16130 }
16131 while (input.getBytesUntilLimit() > 0) {
16132 keys_.addInt(input.readUInt32());
16133 }
16134 input.popLimit(limit);
16135 break;
16136 }
16137 case 24: {
16138 if (!((mutable_bitField0_ & 0x00000004) != 0)) {
16139 vals_ = newIntList();
16140 mutable_bitField0_ |= 0x00000004;
16141 }
16142 vals_.addInt(input.readUInt32());
16143 break;
16144 }
16145 case 26: {
16146 int length = input.readRawVarint32();
16147 int limit = input.pushLimit(length);
16148 if (!((mutable_bitField0_ & 0x00000004) != 0) && input.getBytesUntilLimit() > 0) {
16149 vals_ = newIntList();
16150 mutable_bitField0_ |= 0x00000004;
16151 }
16152 while (input.getBytesUntilLimit() > 0) {
16153 vals_.addInt(input.readUInt32());
16154 }
16155 input.popLimit(limit);
16156 break;
16157 }
16158 case 34: {
16159 org.openstreetmap.osmosis.osmbinary.Osmformat.Info.Builder subBuilder = null;
16160 if (((bitField0_ & 0x00000002) != 0)) {
16161 subBuilder = info_.toBuilder();
16162 }
16163 info_ = input.readMessage(org.openstreetmap.osmosis.osmbinary.Osmformat.Info.PARSER, extensionRegistry);
16164 if (subBuilder != null) {
16165 subBuilder.mergeFrom(info_);
16166 info_ = subBuilder.buildPartial();
16167 }
16168 bitField0_ |= 0x00000002;
16169 break;
16170 }
16171 case 64: {
16172 if (!((mutable_bitField0_ & 0x00000010) != 0)) {
16173 rolesSid_ = newIntList();
16174 mutable_bitField0_ |= 0x00000010;
16175 }
16176 rolesSid_.addInt(input.readInt32());
16177 break;
16178 }
16179 case 66: {
16180 int length = input.readRawVarint32();
16181 int limit = input.pushLimit(length);
16182 if (!((mutable_bitField0_ & 0x00000010) != 0) && input.getBytesUntilLimit() > 0) {
16183 rolesSid_ = newIntList();
16184 mutable_bitField0_ |= 0x00000010;
16185 }
16186 while (input.getBytesUntilLimit() > 0) {
16187 rolesSid_.addInt(input.readInt32());
16188 }
16189 input.popLimit(limit);
16190 break;
16191 }
16192 case 72: {
16193 if (!((mutable_bitField0_ & 0x00000020) != 0)) {
16194 memids_ = newLongList();
16195 mutable_bitField0_ |= 0x00000020;
16196 }
16197 memids_.addLong(input.readSInt64());
16198 break;
16199 }
16200 case 74: {
16201 int length = input.readRawVarint32();
16202 int limit = input.pushLimit(length);
16203 if (!((mutable_bitField0_ & 0x00000020) != 0) && input.getBytesUntilLimit() > 0) {
16204 memids_ = newLongList();
16205 mutable_bitField0_ |= 0x00000020;
16206 }
16207 while (input.getBytesUntilLimit() > 0) {
16208 memids_.addLong(input.readSInt64());
16209 }
16210 input.popLimit(limit);
16211 break;
16212 }
16213 case 80: {
16214 int rawValue = input.readEnum();
16215 @SuppressWarnings("deprecation")
16216 org.openstreetmap.osmosis.osmbinary.Osmformat.Relation.MemberType value = org.openstreetmap.osmosis.osmbinary.Osmformat.Relation.MemberType.valueOf(rawValue);
16217 if (value == null) {
16218 unknownFields.mergeVarintField(10, rawValue);
16219 } else {
16220 if (!((mutable_bitField0_ & 0x00000040) != 0)) {
16221 types_ = new java.util.ArrayList<java.lang.Integer>();
16222 mutable_bitField0_ |= 0x00000040;
16223 }
16224 types_.add(rawValue);
16225 }
16226 break;
16227 }
16228 case 82: {
16229 int length = input.readRawVarint32();
16230 int oldLimit = input.pushLimit(length);
16231 while(input.getBytesUntilLimit() > 0) {
16232 int rawValue = input.readEnum();
16233 @SuppressWarnings("deprecation")
16234 org.openstreetmap.osmosis.osmbinary.Osmformat.Relation.MemberType value = org.openstreetmap.osmosis.osmbinary.Osmformat.Relation.MemberType.valueOf(rawValue);
16235 if (value == null) {
16236 unknownFields.mergeVarintField(10, rawValue);
16237 } else {
16238 if (!((mutable_bitField0_ & 0x00000040) != 0)) {
16239 types_ = new java.util.ArrayList<java.lang.Integer>();
16240 mutable_bitField0_ |= 0x00000040;
16241 }
16242 types_.add(rawValue);
16243 }
16244 }
16245 input.popLimit(oldLimit);
16246 break;
16247 }
16248 default: {
16249 if (!parseUnknownField(
16250 input, unknownFields, extensionRegistry, tag)) {
16251 done = true;
16252 }
16253 break;
16254 }
16255 }
16256 }
16257 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
16258 throw e.setUnfinishedMessage(this);
16259 } catch (java.io.IOException e) {
16260 throw new com.google.protobuf.InvalidProtocolBufferException(
16261 e).setUnfinishedMessage(this);
16262 } finally {
16263 if (((mutable_bitField0_ & 0x00000002) != 0)) {
16264 keys_.makeImmutable(); // C
16265 }
16266 if (((mutable_bitField0_ & 0x00000004) != 0)) {
16267 vals_.makeImmutable(); // C
16268 }
16269 if (((mutable_bitField0_ & 0x00000010) != 0)) {
16270 rolesSid_.makeImmutable(); // C
16271 }
16272 if (((mutable_bitField0_ & 0x00000020) != 0)) {
16273 memids_.makeImmutable(); // C
16274 }
16275 if (((mutable_bitField0_ & 0x00000040) != 0)) {
16276 types_ = java.util.Collections.unmodifiableList(types_);
16277 }
16278 this.unknownFields = unknownFields.build();
16279 makeExtensionsImmutable();
16280 }
16281 }
16282 public static final com.google.protobuf.Descriptors.Descriptor
16283 getDescriptor() {
16284 return org.openstreetmap.osmosis.osmbinary.Osmformat.internal_static_OSMPBF_Relation_descriptor;
16285 }
16286
16287 @java.lang.Override
16288 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
16289 internalGetFieldAccessorTable() {
16290 return org.openstreetmap.osmosis.osmbinary.Osmformat.internal_static_OSMPBF_Relation_fieldAccessorTable
16291 .ensureFieldAccessorsInitialized(
16292 org.openstreetmap.osmosis.osmbinary.Osmformat.Relation.class, org.openstreetmap.osmosis.osmbinary.Osmformat.Relation.Builder.class);
16293 }
16294
16295 /**
16296 * Protobuf enum {@code OSMPBF.Relation.MemberType}
16297 */
16298 public enum MemberType
16299 implements com.google.protobuf.ProtocolMessageEnum {
16300 /**
16301 * <code>NODE = 0;</code>
16302 */
16303 NODE(0),
16304 /**
16305 * <code>WAY = 1;</code>
16306 */
16307 WAY(1),
16308 /**
16309 * <code>RELATION = 2;</code>
16310 */
16311 RELATION(2),
16312 ;
16313
16314 /**
16315 * <code>NODE = 0;</code>
16316 */
16317 public static final int NODE_VALUE = 0;
16318 /**
16319 * <code>WAY = 1;</code>
16320 */
16321 public static final int WAY_VALUE = 1;
16322 /**
16323 * <code>RELATION = 2;</code>
16324 */
16325 public static final int RELATION_VALUE = 2;
16326
16327
16328 public final int getNumber() {
16329 return value;
16330 }
16331
16332 /**
16333 * @param value The numeric wire value of the corresponding enum entry.
16334 * @return The enum associated with the given numeric wire value.
16335 * @deprecated Use {@link #forNumber(int)} instead.
16336 */
16337 @java.lang.Deprecated
16338 public static MemberType valueOf(int value) {
16339 return forNumber(value);
16340 }
16341
16342 /**
16343 * @param value The numeric wire value of the corresponding enum entry.
16344 * @return The enum associated with the given numeric wire value.
16345 */
16346 public static MemberType forNumber(int value) {
16347 switch (value) {
16348 case 0: return NODE;
16349 case 1: return WAY;
16350 case 2: return RELATION;
16351 default: return null;
16352 }
16353 }
16354
16355 public static com.google.protobuf.Internal.EnumLiteMap<MemberType>
16356 internalGetValueMap() {
16357 return internalValueMap;
16358 }
16359 private static final com.google.protobuf.Internal.EnumLiteMap<
16360 MemberType> internalValueMap =
16361 new com.google.protobuf.Internal.EnumLiteMap<MemberType>() {
16362 public MemberType findValueByNumber(int number) {
16363 return MemberType.forNumber(number);
16364 }
16365 };
16366
16367 public final com.google.protobuf.Descriptors.EnumValueDescriptor
16368 getValueDescriptor() {
16369 return getDescriptor().getValues().get(ordinal());
16370 }
16371 public final com.google.protobuf.Descriptors.EnumDescriptor
16372 getDescriptorForType() {
16373 return getDescriptor();
16374 }
16375 public static final com.google.protobuf.Descriptors.EnumDescriptor
16376 getDescriptor() {
16377 return org.openstreetmap.osmosis.osmbinary.Osmformat.Relation.getDescriptor().getEnumTypes().get(0);
16378 }
16379
16380 private static final MemberType[] VALUES = values();
16381
16382 public static MemberType valueOf(
16383 com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
16384 if (desc.getType() != getDescriptor()) {
16385 throw new java.lang.IllegalArgumentException(
16386 "EnumValueDescriptor is not for this type.");
16387 }
16388 return VALUES[desc.getIndex()];
16389 }
16390
16391 private final int value;
16392
16393 private MemberType(int value) {
16394 this.value = value;
16395 }
16396
16397 // @@protoc_insertion_point(enum_scope:OSMPBF.Relation.MemberType)
16398 }
16399
16400 private int bitField0_;
16401 public static final int ID_FIELD_NUMBER = 1;
16402 private long id_;
16403 /**
16404 * <code>required int64 id = 1;</code>
16405 * @return Whether the id field is set.
16406 */
16407 @java.lang.Override
16408 public boolean hasId() {
16409 return ((bitField0_ & 0x00000001) != 0);
16410 }
16411 /**
16412 * <code>required int64 id = 1;</code>
16413 * @return The id.
16414 */
16415 @java.lang.Override
16416 public long getId() {
16417 return id_;
16418 }
16419
16420 public static final int KEYS_FIELD_NUMBER = 2;
16421 private com.google.protobuf.Internal.IntList keys_;
16422 /**
16423 * <pre>
16424 * Parallel arrays.
16425 * </pre>
16426 *
16427 * <code>repeated uint32 keys = 2 [packed = true];</code>
16428 * @return A list containing the keys.
16429 */
16430 @java.lang.Override
16431 public java.util.List<java.lang.Integer>
16432 getKeysList() {
16433 return keys_;
16434 }
16435 /**
16436 * <pre>
16437 * Parallel arrays.
16438 * </pre>
16439 *
16440 * <code>repeated uint32 keys = 2 [packed = true];</code>
16441 * @return The count of keys.
16442 */
16443 public int getKeysCount() {
16444 return keys_.size();
16445 }
16446 /**
16447 * <pre>
16448 * Parallel arrays.
16449 * </pre>
16450 *
16451 * <code>repeated uint32 keys = 2 [packed = true];</code>
16452 * @param index The index of the element to return.
16453 * @return The keys at the given index.
16454 */
16455 public int getKeys(int index) {
16456 return keys_.getInt(index);
16457 }
16458 private int keysMemoizedSerializedSize = -1;
16459
16460 public static final int VALS_FIELD_NUMBER = 3;
16461 private com.google.protobuf.Internal.IntList vals_;
16462 /**
16463 * <code>repeated uint32 vals = 3 [packed = true];</code>
16464 * @return A list containing the vals.
16465 */
16466 @java.lang.Override
16467 public java.util.List<java.lang.Integer>
16468 getValsList() {
16469 return vals_;
16470 }
16471 /**
16472 * <code>repeated uint32 vals = 3 [packed = true];</code>
16473 * @return The count of vals.
16474 */
16475 public int getValsCount() {
16476 return vals_.size();
16477 }
16478 /**
16479 * <code>repeated uint32 vals = 3 [packed = true];</code>
16480 * @param index The index of the element to return.
16481 * @return The vals at the given index.
16482 */
16483 public int getVals(int index) {
16484 return vals_.getInt(index);
16485 }
16486 private int valsMemoizedSerializedSize = -1;
16487
16488 public static final int INFO_FIELD_NUMBER = 4;
16489 private org.openstreetmap.osmosis.osmbinary.Osmformat.Info info_;
16490 /**
16491 * <code>optional .OSMPBF.Info info = 4;</code>
16492 * @return Whether the info field is set.
16493 */
16494 @java.lang.Override
16495 public boolean hasInfo() {
16496 return ((bitField0_ & 0x00000002) != 0);
16497 }
16498 /**
16499 * <code>optional .OSMPBF.Info info = 4;</code>
16500 * @return The info.
16501 */
16502 @java.lang.Override
16503 public org.openstreetmap.osmosis.osmbinary.Osmformat.Info getInfo() {
16504 return info_ == null ? org.openstreetmap.osmosis.osmbinary.Osmformat.Info.getDefaultInstance() : info_;
16505 }
16506 /**
16507 * <code>optional .OSMPBF.Info info = 4;</code>
16508 */
16509 @java.lang.Override
16510 public org.openstreetmap.osmosis.osmbinary.Osmformat.InfoOrBuilder getInfoOrBuilder() {
16511 return info_ == null ? org.openstreetmap.osmosis.osmbinary.Osmformat.Info.getDefaultInstance() : info_;
16512 }
16513
16514 public static final int ROLES_SID_FIELD_NUMBER = 8;
16515 private com.google.protobuf.Internal.IntList rolesSid_;
16516 /**
16517 * <pre>
16518 * Parallel arrays
16519 * </pre>
16520 *
16521 * <code>repeated int32 roles_sid = 8 [packed = true];</code>
16522 * @return A list containing the rolesSid.
16523 */
16524 @java.lang.Override
16525 public java.util.List<java.lang.Integer>
16526 getRolesSidList() {
16527 return rolesSid_;
16528 }
16529 /**
16530 * <pre>
16531 * Parallel arrays
16532 * </pre>
16533 *
16534 * <code>repeated int32 roles_sid = 8 [packed = true];</code>
16535 * @return The count of rolesSid.
16536 */
16537 public int getRolesSidCount() {
16538 return rolesSid_.size();
16539 }
16540 /**
16541 * <pre>
16542 * Parallel arrays
16543 * </pre>
16544 *
16545 * <code>repeated int32 roles_sid = 8 [packed = true];</code>
16546 * @param index The index of the element to return.
16547 * @return The rolesSid at the given index.
16548 */
16549 public int getRolesSid(int index) {
16550 return rolesSid_.getInt(index);
16551 }
16552 private int rolesSidMemoizedSerializedSize = -1;
16553
16554 public static final int MEMIDS_FIELD_NUMBER = 9;
16555 private com.google.protobuf.Internal.LongList memids_;
16556 /**
16557 * <pre>
16558 * DELTA encoded
16559 * </pre>
16560 *
16561 * <code>repeated sint64 memids = 9 [packed = true];</code>
16562 * @return A list containing the memids.
16563 */
16564 @java.lang.Override
16565 public java.util.List<java.lang.Long>
16566 getMemidsList() {
16567 return memids_;
16568 }
16569 /**
16570 * <pre>
16571 * DELTA encoded
16572 * </pre>
16573 *
16574 * <code>repeated sint64 memids = 9 [packed = true];</code>
16575 * @return The count of memids.
16576 */
16577 public int getMemidsCount() {
16578 return memids_.size();
16579 }
16580 /**
16581 * <pre>
16582 * DELTA encoded
16583 * </pre>
16584 *
16585 * <code>repeated sint64 memids = 9 [packed = true];</code>
16586 * @param index The index of the element to return.
16587 * @return The memids at the given index.
16588 */
16589 public long getMemids(int index) {
16590 return memids_.getLong(index);
16591 }
16592 private int memidsMemoizedSerializedSize = -1;
16593
16594 public static final int TYPES_FIELD_NUMBER = 10;
16595 private java.util.List<java.lang.Integer> types_;
16596 private static final com.google.protobuf.Internal.ListAdapter.Converter<
16597 java.lang.Integer, org.openstreetmap.osmosis.osmbinary.Osmformat.Relation.MemberType> types_converter_ =
16598 new com.google.protobuf.Internal.ListAdapter.Converter<
16599 java.lang.Integer, org.openstreetmap.osmosis.osmbinary.Osmformat.Relation.MemberType>() {
16600 public org.openstreetmap.osmosis.osmbinary.Osmformat.Relation.MemberType convert(java.lang.Integer from) {
16601 @SuppressWarnings("deprecation")
16602 org.openstreetmap.osmosis.osmbinary.Osmformat.Relation.MemberType result = org.openstreetmap.osmosis.osmbinary.Osmformat.Relation.MemberType.valueOf(from);
16603 return result == null ? org.openstreetmap.osmosis.osmbinary.Osmformat.Relation.MemberType.NODE : result;
16604 }
16605 };
16606 /**
16607 * <code>repeated .OSMPBF.Relation.MemberType types = 10 [packed = true];</code>
16608 * @return A list containing the types.
16609 */
16610 @java.lang.Override
16611 public java.util.List<org.openstreetmap.osmosis.osmbinary.Osmformat.Relation.MemberType> getTypesList() {
16612 return new com.google.protobuf.Internal.ListAdapter<
16613 java.lang.Integer, org.openstreetmap.osmosis.osmbinary.Osmformat.Relation.MemberType>(types_, types_converter_);
16614 }
16615 /**
16616 * <code>repeated .OSMPBF.Relation.MemberType types = 10 [packed = true];</code>
16617 * @return The count of types.
16618 */
16619 @java.lang.Override
16620 public int getTypesCount() {
16621 return types_.size();
16622 }
16623 /**
16624 * <code>repeated .OSMPBF.Relation.MemberType types = 10 [packed = true];</code>
16625 * @param index The index of the element to return.
16626 * @return The types at the given index.
16627 */
16628 @java.lang.Override
16629 public org.openstreetmap.osmosis.osmbinary.Osmformat.Relation.MemberType getTypes(int index) {
16630 return types_converter_.convert(types_.get(index));
16631 }
16632 private int typesMemoizedSerializedSize;
16633
16634 private byte memoizedIsInitialized = -1;
16635 @java.lang.Override
16636 public final boolean isInitialized() {
16637 byte isInitialized = memoizedIsInitialized;
16638 if (isInitialized == 1) return true;
16639 if (isInitialized == 0) return false;
16640
16641 if (!hasId()) {
16642 memoizedIsInitialized = 0;
16643 return false;
16644 }
16645 memoizedIsInitialized = 1;
16646 return true;
16647 }
16648
16649 @java.lang.Override
16650 public void writeTo(com.google.protobuf.CodedOutputStream output)
16651 throws java.io.IOException {
16652 getSerializedSize();
16653 if (((bitField0_ & 0x00000001) != 0)) {
16654 output.writeInt64(1, id_);
16655 }
16656 if (getKeysList().size() > 0) {
16657 output.writeUInt32NoTag(18);
16658 output.writeUInt32NoTag(keysMemoizedSerializedSize);
16659 }
16660 for (int i = 0; i < keys_.size(); i++) {
16661 output.writeUInt32NoTag(keys_.getInt(i));
16662 }
16663 if (getValsList().size() > 0) {
16664 output.writeUInt32NoTag(26);
16665 output.writeUInt32NoTag(valsMemoizedSerializedSize);
16666 }
16667 for (int i = 0; i < vals_.size(); i++) {
16668 output.writeUInt32NoTag(vals_.getInt(i));
16669 }
16670 if (((bitField0_ & 0x00000002) != 0)) {
16671 output.writeMessage(4, getInfo());
16672 }
16673 if (getRolesSidList().size() > 0) {
16674 output.writeUInt32NoTag(66);
16675 output.writeUInt32NoTag(rolesSidMemoizedSerializedSize);
16676 }
16677 for (int i = 0; i < rolesSid_.size(); i++) {
16678 output.writeInt32NoTag(rolesSid_.getInt(i));
16679 }
16680 if (getMemidsList().size() > 0) {
16681 output.writeUInt32NoTag(74);
16682 output.writeUInt32NoTag(memidsMemoizedSerializedSize);
16683 }
16684 for (int i = 0; i < memids_.size(); i++) {
16685 output.writeSInt64NoTag(memids_.getLong(i));
16686 }
16687 if (getTypesList().size() > 0) {
16688 output.writeUInt32NoTag(82);
16689 output.writeUInt32NoTag(typesMemoizedSerializedSize);
16690 }
16691 for (int i = 0; i < types_.size(); i++) {
16692 output.writeEnumNoTag(types_.get(i));
16693 }
16694 unknownFields.writeTo(output);
16695 }
16696
16697 @java.lang.Override
16698 public int getSerializedSize() {
16699 int size = memoizedSize;
16700 if (size != -1) return size;
16701
16702 size = 0;
16703 if (((bitField0_ & 0x00000001) != 0)) {
16704 size += com.google.protobuf.CodedOutputStream
16705 .computeInt64Size(1, id_);
16706 }
16707 {
16708 int dataSize = 0;
16709 for (int i = 0; i < keys_.size(); i++) {
16710 dataSize += com.google.protobuf.CodedOutputStream
16711 .computeUInt32SizeNoTag(keys_.getInt(i));
16712 }
16713 size += dataSize;
16714 if (!getKeysList().isEmpty()) {
16715 size += 1;
16716 size += com.google.protobuf.CodedOutputStream
16717 .computeInt32SizeNoTag(dataSize);
16718 }
16719 keysMemoizedSerializedSize = dataSize;
16720 }
16721 {
16722 int dataSize = 0;
16723 for (int i = 0; i < vals_.size(); i++) {
16724 dataSize += com.google.protobuf.CodedOutputStream
16725 .computeUInt32SizeNoTag(vals_.getInt(i));
16726 }
16727 size += dataSize;
16728 if (!getValsList().isEmpty()) {
16729 size += 1;
16730 size += com.google.protobuf.CodedOutputStream
16731 .computeInt32SizeNoTag(dataSize);
16732 }
16733 valsMemoizedSerializedSize = dataSize;
16734 }
16735 if (((bitField0_ & 0x00000002) != 0)) {
16736 size += com.google.protobuf.CodedOutputStream
16737 .computeMessageSize(4, getInfo());
16738 }
16739 {
16740 int dataSize = 0;
16741 for (int i = 0; i < rolesSid_.size(); i++) {
16742 dataSize += com.google.protobuf.CodedOutputStream
16743 .computeInt32SizeNoTag(rolesSid_.getInt(i));
16744 }
16745 size += dataSize;
16746 if (!getRolesSidList().isEmpty()) {
16747 size += 1;
16748 size += com.google.protobuf.CodedOutputStream
16749 .computeInt32SizeNoTag(dataSize);
16750 }
16751 rolesSidMemoizedSerializedSize = dataSize;
16752 }
16753 {
16754 int dataSize = 0;
16755 for (int i = 0; i < memids_.size(); i++) {
16756 dataSize += com.google.protobuf.CodedOutputStream
16757 .computeSInt64SizeNoTag(memids_.getLong(i));
16758 }
16759 size += dataSize;
16760 if (!getMemidsList().isEmpty()) {
16761 size += 1;
16762 size += com.google.protobuf.CodedOutputStream
16763 .computeInt32SizeNoTag(dataSize);
16764 }
16765 memidsMemoizedSerializedSize = dataSize;
16766 }
16767 {
16768 int dataSize = 0;
16769 for (int i = 0; i < types_.size(); i++) {
16770 dataSize += com.google.protobuf.CodedOutputStream
16771 .computeEnumSizeNoTag(types_.get(i));
16772 }
16773 size += dataSize;
16774 if (!getTypesList().isEmpty()) { size += 1;
16775 size += com.google.protobuf.CodedOutputStream
16776 .computeUInt32SizeNoTag(dataSize);
16777 }typesMemoizedSerializedSize = dataSize;
16778 }
16779 size += unknownFields.getSerializedSize();
16780 memoizedSize = size;
16781 return size;
16782 }
16783
16784 @java.lang.Override
16785 public boolean equals(final java.lang.Object obj) {
16786 if (obj == this) {
16787 return true;
16788 }
16789 if (!(obj instanceof org.openstreetmap.osmosis.osmbinary.Osmformat.Relation)) {
16790 return super.equals(obj);
16791 }
16792 org.openstreetmap.osmosis.osmbinary.Osmformat.Relation other = (org.openstreetmap.osmosis.osmbinary.Osmformat.Relation) obj;
16793
16794 if (hasId() != other.hasId()) return false;
16795 if (hasId()) {
16796 if (getId()
16797 != other.getId()) return false;
16798 }
16799 if (!getKeysList()
16800 .equals(other.getKeysList())) return false;
16801 if (!getValsList()
16802 .equals(other.getValsList())) return false;
16803 if (hasInfo() != other.hasInfo()) return false;
16804 if (hasInfo()) {
16805 if (!getInfo()
16806 .equals(other.getInfo())) return false;
16807 }
16808 if (!getRolesSidList()
16809 .equals(other.getRolesSidList())) return false;
16810 if (!getMemidsList()
16811 .equals(other.getMemidsList())) return false;
16812 if (!types_.equals(other.types_)) return false;
16813 if (!unknownFields.equals(other.unknownFields)) return false;
16814 return true;
16815 }
16816
16817 @java.lang.Override
16818 public int hashCode() {
16819 if (memoizedHashCode != 0) {
16820 return memoizedHashCode;
16821 }
16822 int hash = 41;
16823 hash = (19 * hash) + getDescriptor().hashCode();
16824 if (hasId()) {
16825 hash = (37 * hash) + ID_FIELD_NUMBER;
16826 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
16827 getId());
16828 }
16829 if (getKeysCount() > 0) {
16830 hash = (37 * hash) + KEYS_FIELD_NUMBER;
16831 hash = (53 * hash) + getKeysList().hashCode();
16832 }
16833 if (getValsCount() > 0) {
16834 hash = (37 * hash) + VALS_FIELD_NUMBER;
16835 hash = (53 * hash) + getValsList().hashCode();
16836 }
16837 if (hasInfo()) {
16838 hash = (37 * hash) + INFO_FIELD_NUMBER;
16839 hash = (53 * hash) + getInfo().hashCode();
16840 }
16841 if (getRolesSidCount() > 0) {
16842 hash = (37 * hash) + ROLES_SID_FIELD_NUMBER;
16843 hash = (53 * hash) + getRolesSidList().hashCode();
16844 }
16845 if (getMemidsCount() > 0) {
16846 hash = (37 * hash) + MEMIDS_FIELD_NUMBER;
16847 hash = (53 * hash) + getMemidsList().hashCode();
16848 }
16849 if (getTypesCount() > 0) {
16850 hash = (37 * hash) + TYPES_FIELD_NUMBER;
16851 hash = (53 * hash) + types_.hashCode();
16852 }
16853 hash = (29 * hash) + unknownFields.hashCode();
16854 memoizedHashCode = hash;
16855 return hash;
16856 }
16857
16858 public static org.openstreetmap.osmosis.osmbinary.Osmformat.Relation parseFrom(
16859 java.nio.ByteBuffer data)
16860 throws com.google.protobuf.InvalidProtocolBufferException {
16861 return PARSER.parseFrom(data);
16862 }
16863 public static org.openstreetmap.osmosis.osmbinary.Osmformat.Relation parseFrom(
16864 java.nio.ByteBuffer data,
16865 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
16866 throws com.google.protobuf.InvalidProtocolBufferException {
16867 return PARSER.parseFrom(data, extensionRegistry);
16868 }
16869 public static org.openstreetmap.osmosis.osmbinary.Osmformat.Relation parseFrom(
16870 com.google.protobuf.ByteString data)
16871 throws com.google.protobuf.InvalidProtocolBufferException {
16872 return PARSER.parseFrom(data);
16873 }
16874 public static org.openstreetmap.osmosis.osmbinary.Osmformat.Relation parseFrom(
16875 com.google.protobuf.ByteString data,
16876 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
16877 throws com.google.protobuf.InvalidProtocolBufferException {
16878 return PARSER.parseFrom(data, extensionRegistry);
16879 }
16880 public static org.openstreetmap.osmosis.osmbinary.Osmformat.Relation parseFrom(byte[] data)
16881 throws com.google.protobuf.InvalidProtocolBufferException {
16882 return PARSER.parseFrom(data);
16883 }
16884 public static org.openstreetmap.osmosis.osmbinary.Osmformat.Relation parseFrom(
16885 byte[] data,
16886 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
16887 throws com.google.protobuf.InvalidProtocolBufferException {
16888 return PARSER.parseFrom(data, extensionRegistry);
16889 }
16890 public static org.openstreetmap.osmosis.osmbinary.Osmformat.Relation parseFrom(java.io.InputStream input)
16891 throws java.io.IOException {
16892 return com.google.protobuf.GeneratedMessageV3
16893 .parseWithIOException(PARSER, input);
16894 }
16895 public static org.openstreetmap.osmosis.osmbinary.Osmformat.Relation parseFrom(
16896 java.io.InputStream input,
16897 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
16898 throws java.io.IOException {
16899 return com.google.protobuf.GeneratedMessageV3
16900 .parseWithIOException(PARSER, input, extensionRegistry);
16901 }
16902 public static org.openstreetmap.osmosis.osmbinary.Osmformat.Relation parseDelimitedFrom(java.io.InputStream input)
16903 throws java.io.IOException {
16904 return com.google.protobuf.GeneratedMessageV3
16905 .parseDelimitedWithIOException(PARSER, input);
16906 }
16907 public static org.openstreetmap.osmosis.osmbinary.Osmformat.Relation parseDelimitedFrom(
16908 java.io.InputStream input,
16909 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
16910 throws java.io.IOException {
16911 return com.google.protobuf.GeneratedMessageV3
16912 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
16913 }
16914 public static org.openstreetmap.osmosis.osmbinary.Osmformat.Relation parseFrom(
16915 com.google.protobuf.CodedInputStream input)
16916 throws java.io.IOException {
16917 return com.google.protobuf.GeneratedMessageV3
16918 .parseWithIOException(PARSER, input);
16919 }
16920 public static org.openstreetmap.osmosis.osmbinary.Osmformat.Relation parseFrom(
16921 com.google.protobuf.CodedInputStream input,
16922 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
16923 throws java.io.IOException {
16924 return com.google.protobuf.GeneratedMessageV3
16925 .parseWithIOException(PARSER, input, extensionRegistry);
16926 }
16927
16928 @java.lang.Override
16929 public Builder newBuilderForType() { return newBuilder(); }
16930 public static Builder newBuilder() {
16931 return DEFAULT_INSTANCE.toBuilder();
16932 }
16933 public static Builder newBuilder(org.openstreetmap.osmosis.osmbinary.Osmformat.Relation prototype) {
16934 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
16935 }
16936 @java.lang.Override
16937 public Builder toBuilder() {
16938 return this == DEFAULT_INSTANCE
16939 ? new Builder() : new Builder().mergeFrom(this);
16940 }
16941
16942 @java.lang.Override
16943 protected Builder newBuilderForType(
16944 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
16945 Builder builder = new Builder(parent);
16946 return builder;
16947 }
16948 /**
16949 * Protobuf type {@code OSMPBF.Relation}
16950 */
16951 public static final class Builder extends
16952 com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
16953 // @@protoc_insertion_point(builder_implements:OSMPBF.Relation)
16954 org.openstreetmap.osmosis.osmbinary.Osmformat.RelationOrBuilder {
16955 public static final com.google.protobuf.Descriptors.Descriptor
16956 getDescriptor() {
16957 return org.openstreetmap.osmosis.osmbinary.Osmformat.internal_static_OSMPBF_Relation_descriptor;
16958 }
16959
16960 @java.lang.Override
16961 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
16962 internalGetFieldAccessorTable() {
16963 return org.openstreetmap.osmosis.osmbinary.Osmformat.internal_static_OSMPBF_Relation_fieldAccessorTable
16964 .ensureFieldAccessorsInitialized(
16965 org.openstreetmap.osmosis.osmbinary.Osmformat.Relation.class, org.openstreetmap.osmosis.osmbinary.Osmformat.Relation.Builder.class);
16966 }
16967
16968 // Construct using org.openstreetmap.osmosis.osmbinary.Osmformat.Relation.newBuilder()
16969 private Builder() {
16970 maybeForceBuilderInitialization();
16971 }
16972
16973 private Builder(
16974 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
16975 super(parent);
16976 maybeForceBuilderInitialization();
16977 }
16978 private void maybeForceBuilderInitialization() {
16979 if (com.google.protobuf.GeneratedMessageV3
16980 .alwaysUseFieldBuilders) {
16981 getInfoFieldBuilder();
16982 }
16983 }
16984 @java.lang.Override
16985 public Builder clear() {
16986 super.clear();
16987 id_ = 0L;
16988 bitField0_ = (bitField0_ & ~0x00000001);
16989 keys_ = emptyIntList();
16990 bitField0_ = (bitField0_ & ~0x00000002);
16991 vals_ = emptyIntList();
16992 bitField0_ = (bitField0_ & ~0x00000004);
16993 if (infoBuilder_ == null) {
16994 info_ = null;
16995 } else {
16996 infoBuilder_.clear();
16997 }
16998 bitField0_ = (bitField0_ & ~0x00000008);
16999 rolesSid_ = emptyIntList();
17000 bitField0_ = (bitField0_ & ~0x00000010);
17001 memids_ = emptyLongList();
17002 bitField0_ = (bitField0_ & ~0x00000020);
17003 types_ = java.util.Collections.emptyList();
17004 bitField0_ = (bitField0_ & ~0x00000040);
17005 return this;
17006 }
17007
17008 @java.lang.Override
17009 public com.google.protobuf.Descriptors.Descriptor
17010 getDescriptorForType() {
17011 return org.openstreetmap.osmosis.osmbinary.Osmformat.internal_static_OSMPBF_Relation_descriptor;
17012 }
17013
17014 @java.lang.Override
17015 public org.openstreetmap.osmosis.osmbinary.Osmformat.Relation getDefaultInstanceForType() {
17016 return org.openstreetmap.osmosis.osmbinary.Osmformat.Relation.getDefaultInstance();
17017 }
17018
17019 @java.lang.Override
17020 public org.openstreetmap.osmosis.osmbinary.Osmformat.Relation build() {
17021 org.openstreetmap.osmosis.osmbinary.Osmformat.Relation result = buildPartial();
17022 if (!result.isInitialized()) {
17023 throw newUninitializedMessageException(result);
17024 }
17025 return result;
17026 }
17027
17028 @java.lang.Override
17029 public org.openstreetmap.osmosis.osmbinary.Osmformat.Relation buildPartial() {
17030 org.openstreetmap.osmosis.osmbinary.Osmformat.Relation result = new org.openstreetmap.osmosis.osmbinary.Osmformat.Relation(this);
17031 int from_bitField0_ = bitField0_;
17032 int to_bitField0_ = 0;
17033 if (((from_bitField0_ & 0x00000001) != 0)) {
17034 result.id_ = id_;
17035 to_bitField0_ |= 0x00000001;
17036 }
17037 if (((bitField0_ & 0x00000002) != 0)) {
17038 keys_.makeImmutable();
17039 bitField0_ = (bitField0_ & ~0x00000002);
17040 }
17041 result.keys_ = keys_;
17042 if (((bitField0_ & 0x00000004) != 0)) {
17043 vals_.makeImmutable();
17044 bitField0_ = (bitField0_ & ~0x00000004);
17045 }
17046 result.vals_ = vals_;
17047 if (((from_bitField0_ & 0x00000008) != 0)) {
17048 if (infoBuilder_ == null) {
17049 result.info_ = info_;
17050 } else {
17051 result.info_ = infoBuilder_.build();
17052 }
17053 to_bitField0_ |= 0x00000002;
17054 }
17055 if (((bitField0_ & 0x00000010) != 0)) {
17056 rolesSid_.makeImmutable();
17057 bitField0_ = (bitField0_ & ~0x00000010);
17058 }
17059 result.rolesSid_ = rolesSid_;
17060 if (((bitField0_ & 0x00000020) != 0)) {
17061 memids_.makeImmutable();
17062 bitField0_ = (bitField0_ & ~0x00000020);
17063 }
17064 result.memids_ = memids_;
17065 if (((bitField0_ & 0x00000040) != 0)) {
17066 types_ = java.util.Collections.unmodifiableList(types_);
17067 bitField0_ = (bitField0_ & ~0x00000040);
17068 }
17069 result.types_ = types_;
17070 result.bitField0_ = to_bitField0_;
17071 onBuilt();
17072 return result;
17073 }
17074
17075 @java.lang.Override
17076 public Builder clone() {
17077 return super.clone();
17078 }
17079 @java.lang.Override
17080 public Builder setField(
17081 com.google.protobuf.Descriptors.FieldDescriptor field,
17082 java.lang.Object value) {
17083 return super.setField(field, value);
17084 }
17085 @java.lang.Override
17086 public Builder clearField(
17087 com.google.protobuf.Descriptors.FieldDescriptor field) {
17088 return super.clearField(field);
17089 }
17090 @java.lang.Override
17091 public Builder clearOneof(
17092 com.google.protobuf.Descriptors.OneofDescriptor oneof) {
17093 return super.clearOneof(oneof);
17094 }
17095 @java.lang.Override
17096 public Builder setRepeatedField(
17097 com.google.protobuf.Descriptors.FieldDescriptor field,
17098 int index, java.lang.Object value) {
17099 return super.setRepeatedField(field, index, value);
17100 }
17101 @java.lang.Override
17102 public Builder addRepeatedField(
17103 com.google.protobuf.Descriptors.FieldDescriptor field,
17104 java.lang.Object value) {
17105 return super.addRepeatedField(field, value);
17106 }
17107 @java.lang.Override
17108 public Builder mergeFrom(com.google.protobuf.Message other) {
17109 if (other instanceof org.openstreetmap.osmosis.osmbinary.Osmformat.Relation) {
17110 return mergeFrom((org.openstreetmap.osmosis.osmbinary.Osmformat.Relation)other);
17111 } else {
17112 super.mergeFrom(other);
17113 return this;
17114 }
17115 }
17116
17117 public Builder mergeFrom(org.openstreetmap.osmosis.osmbinary.Osmformat.Relation other) {
17118 if (other == org.openstreetmap.osmosis.osmbinary.Osmformat.Relation.getDefaultInstance()) return this;
17119 if (other.hasId()) {
17120 setId(other.getId());
17121 }
17122 if (!other.keys_.isEmpty()) {
17123 if (keys_.isEmpty()) {
17124 keys_ = other.keys_;
17125 bitField0_ = (bitField0_ & ~0x00000002);
17126 } else {
17127 ensureKeysIsMutable();
17128 keys_.addAll(other.keys_);
17129 }
17130 onChanged();
17131 }
17132 if (!other.vals_.isEmpty()) {
17133 if (vals_.isEmpty()) {
17134 vals_ = other.vals_;
17135 bitField0_ = (bitField0_ & ~0x00000004);
17136 } else {
17137 ensureValsIsMutable();
17138 vals_.addAll(other.vals_);
17139 }
17140 onChanged();
17141 }
17142 if (other.hasInfo()) {
17143 mergeInfo(other.getInfo());
17144 }
17145 if (!other.rolesSid_.isEmpty()) {
17146 if (rolesSid_.isEmpty()) {
17147 rolesSid_ = other.rolesSid_;
17148 bitField0_ = (bitField0_ & ~0x00000010);
17149 } else {
17150 ensureRolesSidIsMutable();
17151 rolesSid_.addAll(other.rolesSid_);
17152 }
17153 onChanged();
17154 }
17155 if (!other.memids_.isEmpty()) {
17156 if (memids_.isEmpty()) {
17157 memids_ = other.memids_;
17158 bitField0_ = (bitField0_ & ~0x00000020);
17159 } else {
17160 ensureMemidsIsMutable();
17161 memids_.addAll(other.memids_);
17162 }
17163 onChanged();
17164 }
17165 if (!other.types_.isEmpty()) {
17166 if (types_.isEmpty()) {
17167 types_ = other.types_;
17168 bitField0_ = (bitField0_ & ~0x00000040);
17169 } else {
17170 ensureTypesIsMutable();
17171 types_.addAll(other.types_);
17172 }
17173 onChanged();
17174 }
17175 this.mergeUnknownFields(other.unknownFields);
17176 onChanged();
17177 return this;
17178 }
17179
17180 @java.lang.Override
17181 public final boolean isInitialized() {
17182 if (!hasId()) {
17183 return false;
17184 }
17185 return true;
17186 }
17187
17188 @java.lang.Override
17189 public Builder mergeFrom(
17190 com.google.protobuf.CodedInputStream input,
17191 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
17192 throws java.io.IOException {
17193 org.openstreetmap.osmosis.osmbinary.Osmformat.Relation parsedMessage = null;
17194 try {
17195 parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
17196 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
17197 parsedMessage = (org.openstreetmap.osmosis.osmbinary.Osmformat.Relation) e.getUnfinishedMessage();
17198 throw e.unwrapIOException();
17199 } finally {
17200 if (parsedMessage != null) {
17201 mergeFrom(parsedMessage);
17202 }
17203 }
17204 return this;
17205 }
17206 private int bitField0_;
17207
17208 private long id_ ;
17209 /**
17210 * <code>required int64 id = 1;</code>
17211 * @return Whether the id field is set.
17212 */
17213 @java.lang.Override
17214 public boolean hasId() {
17215 return ((bitField0_ & 0x00000001) != 0);
17216 }
17217 /**
17218 * <code>required int64 id = 1;</code>
17219 * @return The id.
17220 */
17221 @java.lang.Override
17222 public long getId() {
17223 return id_;
17224 }
17225 /**
17226 * <code>required int64 id = 1;</code>
17227 * @param value The id to set.
17228 * @return This builder for chaining.
17229 */
17230 public Builder setId(long value) {
17231 bitField0_ |= 0x00000001;
17232 id_ = value;
17233 onChanged();
17234 return this;
17235 }
17236 /**
17237 * <code>required int64 id = 1;</code>
17238 * @return This builder for chaining.
17239 */
17240 public Builder clearId() {
17241 bitField0_ = (bitField0_ & ~0x00000001);
17242 id_ = 0L;
17243 onChanged();
17244 return this;
17245 }
17246
17247 private com.google.protobuf.Internal.IntList keys_ = emptyIntList();
17248 private void ensureKeysIsMutable() {
17249 if (!((bitField0_ & 0x00000002) != 0)) {
17250 keys_ = mutableCopy(keys_);
17251 bitField0_ |= 0x00000002;
17252 }
17253 }
17254 /**
17255 * <pre>
17256 * Parallel arrays.
17257 * </pre>
17258 *
17259 * <code>repeated uint32 keys = 2 [packed = true];</code>
17260 * @return A list containing the keys.
17261 */
17262 public java.util.List<java.lang.Integer>
17263 getKeysList() {
17264 return ((bitField0_ & 0x00000002) != 0) ?
17265 java.util.Collections.unmodifiableList(keys_) : keys_;
17266 }
17267 /**
17268 * <pre>
17269 * Parallel arrays.
17270 * </pre>
17271 *
17272 * <code>repeated uint32 keys = 2 [packed = true];</code>
17273 * @return The count of keys.
17274 */
17275 public int getKeysCount() {
17276 return keys_.size();
17277 }
17278 /**
17279 * <pre>
17280 * Parallel arrays.
17281 * </pre>
17282 *
17283 * <code>repeated uint32 keys = 2 [packed = true];</code>
17284 * @param index The index of the element to return.
17285 * @return The keys at the given index.
17286 */
17287 public int getKeys(int index) {
17288 return keys_.getInt(index);
17289 }
17290 /**
17291 * <pre>
17292 * Parallel arrays.
17293 * </pre>
17294 *
17295 * <code>repeated uint32 keys = 2 [packed = true];</code>
17296 * @param index The index to set the value at.
17297 * @param value The keys to set.
17298 * @return This builder for chaining.
17299 */
17300 public Builder setKeys(
17301 int index, int value) {
17302 ensureKeysIsMutable();
17303 keys_.setInt(index, value);
17304 onChanged();
17305 return this;
17306 }
17307 /**
17308 * <pre>
17309 * Parallel arrays.
17310 * </pre>
17311 *
17312 * <code>repeated uint32 keys = 2 [packed = true];</code>
17313 * @param value The keys to add.
17314 * @return This builder for chaining.
17315 */
17316 public Builder addKeys(int value) {
17317 ensureKeysIsMutable();
17318 keys_.addInt(value);
17319 onChanged();
17320 return this;
17321 }
17322 /**
17323 * <pre>
17324 * Parallel arrays.
17325 * </pre>
17326 *
17327 * <code>repeated uint32 keys = 2 [packed = true];</code>
17328 * @param values The keys to add.
17329 * @return This builder for chaining.
17330 */
17331 public Builder addAllKeys(
17332 java.lang.Iterable<? extends java.lang.Integer> values) {
17333 ensureKeysIsMutable();
17334 com.google.protobuf.AbstractMessageLite.Builder.addAll(
17335 values, keys_);
17336 onChanged();
17337 return this;
17338 }
17339 /**
17340 * <pre>
17341 * Parallel arrays.
17342 * </pre>
17343 *
17344 * <code>repeated uint32 keys = 2 [packed = true];</code>
17345 * @return This builder for chaining.
17346 */
17347 public Builder clearKeys() {
17348 keys_ = emptyIntList();
17349 bitField0_ = (bitField0_ & ~0x00000002);
17350 onChanged();
17351 return this;
17352 }
17353
17354 private com.google.protobuf.Internal.IntList vals_ = emptyIntList();
17355 private void ensureValsIsMutable() {
17356 if (!((bitField0_ & 0x00000004) != 0)) {
17357 vals_ = mutableCopy(vals_);
17358 bitField0_ |= 0x00000004;
17359 }
17360 }
17361 /**
17362 * <code>repeated uint32 vals = 3 [packed = true];</code>
17363 * @return A list containing the vals.
17364 */
17365 public java.util.List<java.lang.Integer>
17366 getValsList() {
17367 return ((bitField0_ & 0x00000004) != 0) ?
17368 java.util.Collections.unmodifiableList(vals_) : vals_;
17369 }
17370 /**
17371 * <code>repeated uint32 vals = 3 [packed = true];</code>
17372 * @return The count of vals.
17373 */
17374 public int getValsCount() {
17375 return vals_.size();
17376 }
17377 /**
17378 * <code>repeated uint32 vals = 3 [packed = true];</code>
17379 * @param index The index of the element to return.
17380 * @return The vals at the given index.
17381 */
17382 public int getVals(int index) {
17383 return vals_.getInt(index);
17384 }
17385 /**
17386 * <code>repeated uint32 vals = 3 [packed = true];</code>
17387 * @param index The index to set the value at.
17388 * @param value The vals to set.
17389 * @return This builder for chaining.
17390 */
17391 public Builder setVals(
17392 int index, int value) {
17393 ensureValsIsMutable();
17394 vals_.setInt(index, value);
17395 onChanged();
17396 return this;
17397 }
17398 /**
17399 * <code>repeated uint32 vals = 3 [packed = true];</code>
17400 * @param value The vals to add.
17401 * @return This builder for chaining.
17402 */
17403 public Builder addVals(int value) {
17404 ensureValsIsMutable();
17405 vals_.addInt(value);
17406 onChanged();
17407 return this;
17408 }
17409 /**
17410 * <code>repeated uint32 vals = 3 [packed = true];</code>
17411 * @param values The vals to add.
17412 * @return This builder for chaining.
17413 */
17414 public Builder addAllVals(
17415 java.lang.Iterable<? extends java.lang.Integer> values) {
17416 ensureValsIsMutable();
17417 com.google.protobuf.AbstractMessageLite.Builder.addAll(
17418 values, vals_);
17419 onChanged();
17420 return this;
17421 }
17422 /**
17423 * <code>repeated uint32 vals = 3 [packed = true];</code>
17424 * @return This builder for chaining.
17425 */
17426 public Builder clearVals() {
17427 vals_ = emptyIntList();
17428 bitField0_ = (bitField0_ & ~0x00000004);
17429 onChanged();
17430 return this;
17431 }
17432
17433 private org.openstreetmap.osmosis.osmbinary.Osmformat.Info info_;
17434 private com.google.protobuf.SingleFieldBuilderV3<
17435 org.openstreetmap.osmosis.osmbinary.Osmformat.Info, org.openstreetmap.osmosis.osmbinary.Osmformat.Info.Builder, org.openstreetmap.osmosis.osmbinary.Osmformat.InfoOrBuilder> infoBuilder_;
17436 /**
17437 * <code>optional .OSMPBF.Info info = 4;</code>
17438 * @return Whether the info field is set.
17439 */
17440 public boolean hasInfo() {
17441 return ((bitField0_ & 0x00000008) != 0);
17442 }
17443 /**
17444 * <code>optional .OSMPBF.Info info = 4;</code>
17445 * @return The info.
17446 */
17447 public org.openstreetmap.osmosis.osmbinary.Osmformat.Info getInfo() {
17448 if (infoBuilder_ == null) {
17449 return info_ == null ? org.openstreetmap.osmosis.osmbinary.Osmformat.Info.getDefaultInstance() : info_;
17450 } else {
17451 return infoBuilder_.getMessage();
17452 }
17453 }
17454 /**
17455 * <code>optional .OSMPBF.Info info = 4;</code>
17456 */
17457 public Builder setInfo(org.openstreetmap.osmosis.osmbinary.Osmformat.Info value) {
17458 if (infoBuilder_ == null) {
17459 if (value == null) {
17460 throw new NullPointerException();
17461 }
17462 info_ = value;
17463 onChanged();
17464 } else {
17465 infoBuilder_.setMessage(value);
17466 }
17467 bitField0_ |= 0x00000008;
17468 return this;
17469 }
17470 /**
17471 * <code>optional .OSMPBF.Info info = 4;</code>
17472 */
17473 public Builder setInfo(
17474 org.openstreetmap.osmosis.osmbinary.Osmformat.Info.Builder builderForValue) {
17475 if (infoBuilder_ == null) {
17476 info_ = builderForValue.build();
17477 onChanged();
17478 } else {
17479 infoBuilder_.setMessage(builderForValue.build());
17480 }
17481 bitField0_ |= 0x00000008;
17482 return this;
17483 }
17484 /**
17485 * <code>optional .OSMPBF.Info info = 4;</code>
17486 */
17487 public Builder mergeInfo(org.openstreetmap.osmosis.osmbinary.Osmformat.Info value) {
17488 if (infoBuilder_ == null) {
17489 if (((bitField0_ & 0x00000008) != 0) &&
17490 info_ != null &&
17491 info_ != org.openstreetmap.osmosis.osmbinary.Osmformat.Info.getDefaultInstance()) {
17492 info_ =
17493 org.openstreetmap.osmosis.osmbinary.Osmformat.Info.newBuilder(info_).mergeFrom(value).buildPartial();
17494 } else {
17495 info_ = value;
17496 }
17497 onChanged();
17498 } else {
17499 infoBuilder_.mergeFrom(value);
17500 }
17501 bitField0_ |= 0x00000008;
17502 return this;
17503 }
17504 /**
17505 * <code>optional .OSMPBF.Info info = 4;</code>
17506 */
17507 public Builder clearInfo() {
17508 if (infoBuilder_ == null) {
17509 info_ = null;
17510 onChanged();
17511 } else {
17512 infoBuilder_.clear();
17513 }
17514 bitField0_ = (bitField0_ & ~0x00000008);
17515 return this;
17516 }
17517 /**
17518 * <code>optional .OSMPBF.Info info = 4;</code>
17519 */
17520 public org.openstreetmap.osmosis.osmbinary.Osmformat.Info.Builder getInfoBuilder() {
17521 bitField0_ |= 0x00000008;
17522 onChanged();
17523 return getInfoFieldBuilder().getBuilder();
17524 }
17525 /**
17526 * <code>optional .OSMPBF.Info info = 4;</code>
17527 */
17528 public org.openstreetmap.osmosis.osmbinary.Osmformat.InfoOrBuilder getInfoOrBuilder() {
17529 if (infoBuilder_ != null) {
17530 return infoBuilder_.getMessageOrBuilder();
17531 } else {
17532 return info_ == null ?
17533 org.openstreetmap.osmosis.osmbinary.Osmformat.Info.getDefaultInstance() : info_;
17534 }
17535 }
17536 /**
17537 * <code>optional .OSMPBF.Info info = 4;</code>
17538 */
17539 private com.google.protobuf.SingleFieldBuilderV3<
17540 org.openstreetmap.osmosis.osmbinary.Osmformat.Info, org.openstreetmap.osmosis.osmbinary.Osmformat.Info.Builder, org.openstreetmap.osmosis.osmbinary.Osmformat.InfoOrBuilder>
17541 getInfoFieldBuilder() {
17542 if (infoBuilder_ == null) {
17543 infoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
17544 org.openstreetmap.osmosis.osmbinary.Osmformat.Info, org.openstreetmap.osmosis.osmbinary.Osmformat.Info.Builder, org.openstreetmap.osmosis.osmbinary.Osmformat.InfoOrBuilder>(
17545 getInfo(),
17546 getParentForChildren(),
17547 isClean());
17548 info_ = null;
17549 }
17550 return infoBuilder_;
17551 }
17552
17553 private com.google.protobuf.Internal.IntList rolesSid_ = emptyIntList();
17554 private void ensureRolesSidIsMutable() {
17555 if (!((bitField0_ & 0x00000010) != 0)) {
17556 rolesSid_ = mutableCopy(rolesSid_);
17557 bitField0_ |= 0x00000010;
17558 }
17559 }
17560 /**
17561 * <pre>
17562 * Parallel arrays
17563 * </pre>
17564 *
17565 * <code>repeated int32 roles_sid = 8 [packed = true];</code>
17566 * @return A list containing the rolesSid.
17567 */
17568 public java.util.List<java.lang.Integer>
17569 getRolesSidList() {
17570 return ((bitField0_ & 0x00000010) != 0) ?
17571 java.util.Collections.unmodifiableList(rolesSid_) : rolesSid_;
17572 }
17573 /**
17574 * <pre>
17575 * Parallel arrays
17576 * </pre>
17577 *
17578 * <code>repeated int32 roles_sid = 8 [packed = true];</code>
17579 * @return The count of rolesSid.
17580 */
17581 public int getRolesSidCount() {
17582 return rolesSid_.size();
17583 }
17584 /**
17585 * <pre>
17586 * Parallel arrays
17587 * </pre>
17588 *
17589 * <code>repeated int32 roles_sid = 8 [packed = true];</code>
17590 * @param index The index of the element to return.
17591 * @return The rolesSid at the given index.
17592 */
17593 public int getRolesSid(int index) {
17594 return rolesSid_.getInt(index);
17595 }
17596 /**
17597 * <pre>
17598 * Parallel arrays
17599 * </pre>
17600 *
17601 * <code>repeated int32 roles_sid = 8 [packed = true];</code>
17602 * @param index The index to set the value at.
17603 * @param value The rolesSid to set.
17604 * @return This builder for chaining.
17605 */
17606 public Builder setRolesSid(
17607 int index, int value) {
17608 ensureRolesSidIsMutable();
17609 rolesSid_.setInt(index, value);
17610 onChanged();
17611 return this;
17612 }
17613 /**
17614 * <pre>
17615 * Parallel arrays
17616 * </pre>
17617 *
17618 * <code>repeated int32 roles_sid = 8 [packed = true];</code>
17619 * @param value The rolesSid to add.
17620 * @return This builder for chaining.
17621 */
17622 public Builder addRolesSid(int value) {
17623 ensureRolesSidIsMutable();
17624 rolesSid_.addInt(value);
17625 onChanged();
17626 return this;
17627 }
17628 /**
17629 * <pre>
17630 * Parallel arrays
17631 * </pre>
17632 *
17633 * <code>repeated int32 roles_sid = 8 [packed = true];</code>
17634 * @param values The rolesSid to add.
17635 * @return This builder for chaining.
17636 */
17637 public Builder addAllRolesSid(
17638 java.lang.Iterable<? extends java.lang.Integer> values) {
17639 ensureRolesSidIsMutable();
17640 com.google.protobuf.AbstractMessageLite.Builder.addAll(
17641 values, rolesSid_);
17642 onChanged();
17643 return this;
17644 }
17645 /**
17646 * <pre>
17647 * Parallel arrays
17648 * </pre>
17649 *
17650 * <code>repeated int32 roles_sid = 8 [packed = true];</code>
17651 * @return This builder for chaining.
17652 */
17653 public Builder clearRolesSid() {
17654 rolesSid_ = emptyIntList();
17655 bitField0_ = (bitField0_ & ~0x00000010);
17656 onChanged();
17657 return this;
17658 }
17659
17660 private com.google.protobuf.Internal.LongList memids_ = emptyLongList();
17661 private void ensureMemidsIsMutable() {
17662 if (!((bitField0_ & 0x00000020) != 0)) {
17663 memids_ = mutableCopy(memids_);
17664 bitField0_ |= 0x00000020;
17665 }
17666 }
17667 /**
17668 * <pre>
17669 * DELTA encoded
17670 * </pre>
17671 *
17672 * <code>repeated sint64 memids = 9 [packed = true];</code>
17673 * @return A list containing the memids.
17674 */
17675 public java.util.List<java.lang.Long>
17676 getMemidsList() {
17677 return ((bitField0_ & 0x00000020) != 0) ?
17678 java.util.Collections.unmodifiableList(memids_) : memids_;
17679 }
17680 /**
17681 * <pre>
17682 * DELTA encoded
17683 * </pre>
17684 *
17685 * <code>repeated sint64 memids = 9 [packed = true];</code>
17686 * @return The count of memids.
17687 */
17688 public int getMemidsCount() {
17689 return memids_.size();
17690 }
17691 /**
17692 * <pre>
17693 * DELTA encoded
17694 * </pre>
17695 *
17696 * <code>repeated sint64 memids = 9 [packed = true];</code>
17697 * @param index The index of the element to return.
17698 * @return The memids at the given index.
17699 */
17700 public long getMemids(int index) {
17701 return memids_.getLong(index);
17702 }
17703 /**
17704 * <pre>
17705 * DELTA encoded
17706 * </pre>
17707 *
17708 * <code>repeated sint64 memids = 9 [packed = true];</code>
17709 * @param index The index to set the value at.
17710 * @param value The memids to set.
17711 * @return This builder for chaining.
17712 */
17713 public Builder setMemids(
17714 int index, long value) {
17715 ensureMemidsIsMutable();
17716 memids_.setLong(index, value);
17717 onChanged();
17718 return this;
17719 }
17720 /**
17721 * <pre>
17722 * DELTA encoded
17723 * </pre>
17724 *
17725 * <code>repeated sint64 memids = 9 [packed = true];</code>
17726 * @param value The memids to add.
17727 * @return This builder for chaining.
17728 */
17729 public Builder addMemids(long value) {
17730 ensureMemidsIsMutable();
17731 memids_.addLong(value);
17732 onChanged();
17733 return this;
17734 }
17735 /**
17736 * <pre>
17737 * DELTA encoded
17738 * </pre>
17739 *
17740 * <code>repeated sint64 memids = 9 [packed = true];</code>
17741 * @param values The memids to add.
17742 * @return This builder for chaining.
17743 */
17744 public Builder addAllMemids(
17745 java.lang.Iterable<? extends java.lang.Long> values) {
17746 ensureMemidsIsMutable();
17747 com.google.protobuf.AbstractMessageLite.Builder.addAll(
17748 values, memids_);
17749 onChanged();
17750 return this;
17751 }
17752 /**
17753 * <pre>
17754 * DELTA encoded
17755 * </pre>
17756 *
17757 * <code>repeated sint64 memids = 9 [packed = true];</code>
17758 * @return This builder for chaining.
17759 */
17760 public Builder clearMemids() {
17761 memids_ = emptyLongList();
17762 bitField0_ = (bitField0_ & ~0x00000020);
17763 onChanged();
17764 return this;
17765 }
17766
17767 private java.util.List<java.lang.Integer> types_ =
17768 java.util.Collections.emptyList();
17769 private void ensureTypesIsMutable() {
17770 if (!((bitField0_ & 0x00000040) != 0)) {
17771 types_ = new java.util.ArrayList<java.lang.Integer>(types_);
17772 bitField0_ |= 0x00000040;
17773 }
17774 }
17775 /**
17776 * <code>repeated .OSMPBF.Relation.MemberType types = 10 [packed = true];</code>
17777 * @return A list containing the types.
17778 */
17779 public java.util.List<org.openstreetmap.osmosis.osmbinary.Osmformat.Relation.MemberType> getTypesList() {
17780 return new com.google.protobuf.Internal.ListAdapter<
17781 java.lang.Integer, org.openstreetmap.osmosis.osmbinary.Osmformat.Relation.MemberType>(types_, types_converter_);
17782 }
17783 /**
17784 * <code>repeated .OSMPBF.Relation.MemberType types = 10 [packed = true];</code>
17785 * @return The count of types.
17786 */
17787 public int getTypesCount() {
17788 return types_.size();
17789 }
17790 /**
17791 * <code>repeated .OSMPBF.Relation.MemberType types = 10 [packed = true];</code>
17792 * @param index The index of the element to return.
17793 * @return The types at the given index.
17794 */
17795 public org.openstreetmap.osmosis.osmbinary.Osmformat.Relation.MemberType getTypes(int index) {
17796 return types_converter_.convert(types_.get(index));
17797 }
17798 /**
17799 * <code>repeated .OSMPBF.Relation.MemberType types = 10 [packed = true];</code>
17800 * @param index The index to set the value at.
17801 * @param value The types to set.
17802 * @return This builder for chaining.
17803 */
17804 public Builder setTypes(
17805 int index, org.openstreetmap.osmosis.osmbinary.Osmformat.Relation.MemberType value) {
17806 if (value == null) {
17807 throw new NullPointerException();
17808 }
17809 ensureTypesIsMutable();
17810 types_.set(index, value.getNumber());
17811 onChanged();
17812 return this;
17813 }
17814 /**
17815 * <code>repeated .OSMPBF.Relation.MemberType types = 10 [packed = true];</code>
17816 * @param value The types to add.
17817 * @return This builder for chaining.
17818 */
17819 public Builder addTypes(org.openstreetmap.osmosis.osmbinary.Osmformat.Relation.MemberType value) {
17820 if (value == null) {
17821 throw new NullPointerException();
17822 }
17823 ensureTypesIsMutable();
17824 types_.add(value.getNumber());
17825 onChanged();
17826 return this;
17827 }
17828 /**
17829 * <code>repeated .OSMPBF.Relation.MemberType types = 10 [packed = true];</code>
17830 * @param values The types to add.
17831 * @return This builder for chaining.
17832 */
17833 public Builder addAllTypes(
17834 java.lang.Iterable<? extends org.openstreetmap.osmosis.osmbinary.Osmformat.Relation.MemberType> values) {
17835 ensureTypesIsMutable();
17836 for (org.openstreetmap.osmosis.osmbinary.Osmformat.Relation.MemberType value : values) {
17837 types_.add(value.getNumber());
17838 }
17839 onChanged();
17840 return this;
17841 }
17842 /**
17843 * <code>repeated .OSMPBF.Relation.MemberType types = 10 [packed = true];</code>
17844 * @return This builder for chaining.
17845 */
17846 public Builder clearTypes() {
17847 types_ = java.util.Collections.emptyList();
17848 bitField0_ = (bitField0_ & ~0x00000040);
17849 onChanged();
17850 return this;
17851 }
17852 @java.lang.Override
17853 public final Builder setUnknownFields(
17854 final com.google.protobuf.UnknownFieldSet unknownFields) {
17855 return super.setUnknownFields(unknownFields);
17856 }
17857
17858 @java.lang.Override
17859 public final Builder mergeUnknownFields(
17860 final com.google.protobuf.UnknownFieldSet unknownFields) {
17861 return super.mergeUnknownFields(unknownFields);
17862 }
17863
17864
17865 // @@protoc_insertion_point(builder_scope:OSMPBF.Relation)
17866 }
17867
17868 // @@protoc_insertion_point(class_scope:OSMPBF.Relation)
17869 private static final org.openstreetmap.osmosis.osmbinary.Osmformat.Relation DEFAULT_INSTANCE;
17870 static {
17871 DEFAULT_INSTANCE = new org.openstreetmap.osmosis.osmbinary.Osmformat.Relation();
17872 }
17873
17874 public static org.openstreetmap.osmosis.osmbinary.Osmformat.Relation getDefaultInstance() {
17875 return DEFAULT_INSTANCE;
17876 }
17877
17878 @java.lang.Deprecated public static final com.google.protobuf.Parser<Relation>
17879 PARSER = new com.google.protobuf.AbstractParser<Relation>() {
17880 @java.lang.Override
17881 public Relation parsePartialFrom(
17882 com.google.protobuf.CodedInputStream input,
17883 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
17884 throws com.google.protobuf.InvalidProtocolBufferException {
17885 return new Relation(input, extensionRegistry);
17886 }
17887 };
17888
17889 public static com.google.protobuf.Parser<Relation> parser() {
17890 return PARSER;
17891 }
17892
17893 @java.lang.Override
17894 public com.google.protobuf.Parser<Relation> getParserForType() {
17895 return PARSER;
17896 }
17897
17898 @java.lang.Override
17899 public org.openstreetmap.osmosis.osmbinary.Osmformat.Relation getDefaultInstanceForType() {
17900 return DEFAULT_INSTANCE;
17901 }
17902
17903 }
17904
17905 private static final com.google.protobuf.Descriptors.Descriptor
17906 internal_static_OSMPBF_HeaderBlock_descriptor;
17907 private static final
17908 com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
17909 internal_static_OSMPBF_HeaderBlock_fieldAccessorTable;
17910 private static final com.google.protobuf.Descriptors.Descriptor
17911 internal_static_OSMPBF_HeaderBBox_descriptor;
17912 private static final
17913 com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
17914 internal_static_OSMPBF_HeaderBBox_fieldAccessorTable;
17915 private static final com.google.protobuf.Descriptors.Descriptor
17916 internal_static_OSMPBF_PrimitiveBlock_descriptor;
17917 private static final
17918 com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
17919 internal_static_OSMPBF_PrimitiveBlock_fieldAccessorTable;
17920 private static final com.google.protobuf.Descriptors.Descriptor
17921 internal_static_OSMPBF_PrimitiveGroup_descriptor;
17922 private static final
17923 com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
17924 internal_static_OSMPBF_PrimitiveGroup_fieldAccessorTable;
17925 private static final com.google.protobuf.Descriptors.Descriptor
17926 internal_static_OSMPBF_StringTable_descriptor;
17927 private static final
17928 com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
17929 internal_static_OSMPBF_StringTable_fieldAccessorTable;
17930 private static final com.google.protobuf.Descriptors.Descriptor
17931 internal_static_OSMPBF_Info_descriptor;
17932 private static final
17933 com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
17934 internal_static_OSMPBF_Info_fieldAccessorTable;
17935 private static final com.google.protobuf.Descriptors.Descriptor
17936 internal_static_OSMPBF_DenseInfo_descriptor;
17937 private static final
17938 com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
17939 internal_static_OSMPBF_DenseInfo_fieldAccessorTable;
17940 private static final com.google.protobuf.Descriptors.Descriptor
17941 internal_static_OSMPBF_ChangeSet_descriptor;
17942 private static final
17943 com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
17944 internal_static_OSMPBF_ChangeSet_fieldAccessorTable;
17945 private static final com.google.protobuf.Descriptors.Descriptor
17946 internal_static_OSMPBF_Node_descriptor;
17947 private static final
17948 com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
17949 internal_static_OSMPBF_Node_fieldAccessorTable;
17950 private static final com.google.protobuf.Descriptors.Descriptor
17951 internal_static_OSMPBF_DenseNodes_descriptor;
17952 private static final
17953 com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
17954 internal_static_OSMPBF_DenseNodes_fieldAccessorTable;
17955 private static final com.google.protobuf.Descriptors.Descriptor
17956 internal_static_OSMPBF_Way_descriptor;
17957 private static final
17958 com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
17959 internal_static_OSMPBF_Way_fieldAccessorTable;
17960 private static final com.google.protobuf.Descriptors.Descriptor
17961 internal_static_OSMPBF_Relation_descriptor;
17962 private static final
17963 com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
17964 internal_static_OSMPBF_Relation_fieldAccessorTable;
17965
17966 public static com.google.protobuf.Descriptors.FileDescriptor
17967 getDescriptor() {
17968 return descriptor;
17969 }
17970 private static com.google.protobuf.Descriptors.FileDescriptor
17971 descriptor;
17972 static {
17973 java.lang.String[] descriptorData = {
17974 "\n!src/main/protobuf/osmformat.proto\022\006OSM" +
17975 "PBF\"\207\002\n\013HeaderBlock\022 \n\004bbox\030\001 \001(\0132\022.OSMP" +
17976 "BF.HeaderBBox\022\031\n\021required_features\030\004 \003(\t" +
17977 "\022\031\n\021optional_features\030\005 \003(\t\022\026\n\016writingpr" +
17978 "ogram\030\020 \001(\t\022\016\n\006source\030\021 \001(\t\022%\n\035osmosis_r" +
17979 "eplication_timestamp\030 \001(\003\022+\n#osmosis_re" +
17980 "plication_sequence_number\030! \001(\003\022$\n\034osmos" +
17981 "is_replication_base_url\030\" \001(\t\"F\n\nHeaderB" +
17982 "Box\022\014\n\004left\030\001 \002(\022\022\r\n\005right\030\002 \002(\022\022\013\n\003top\030" +
17983 "\003 \002(\022\022\016\n\006bottom\030\004 \002(\022\"\322\001\n\016PrimitiveBlock" +
17984 "\022(\n\013stringtable\030\001 \002(\0132\023.OSMPBF.StringTab" +
17985 "le\022.\n\016primitivegroup\030\002 \003(\0132\026.OSMPBF.Prim" +
17986 "itiveGroup\022\030\n\013granularity\030\021 \001(\005:\003100\022\025\n\n" +
17987 "lat_offset\030\023 \001(\003:\0010\022\025\n\nlon_offset\030\024 \001(\003:" +
17988 "\0010\022\036\n\020date_granularity\030\022 \001(\005:\0041000\"\267\001\n\016P" +
17989 "rimitiveGroup\022\033\n\005nodes\030\001 \003(\0132\014.OSMPBF.No" +
17990 "de\022!\n\005dense\030\002 \001(\0132\022.OSMPBF.DenseNodes\022\031\n" +
17991 "\004ways\030\003 \003(\0132\013.OSMPBF.Way\022#\n\trelations\030\004 " +
17992 "\003(\0132\020.OSMPBF.Relation\022%\n\nchangesets\030\005 \003(" +
17993 "\0132\021.OSMPBF.ChangeSet\"\030\n\013StringTable\022\t\n\001s" +
17994 "\030\001 \003(\014\"q\n\004Info\022\023\n\007version\030\001 \001(\005:\002-1\022\021\n\tt" +
17995 "imestamp\030\002 \001(\003\022\021\n\tchangeset\030\003 \001(\003\022\013\n\003uid" +
17996 "\030\004 \001(\005\022\020\n\010user_sid\030\005 \001(\r\022\017\n\007visible\030\006 \001(" +
17997 "\010\"\212\001\n\tDenseInfo\022\023\n\007version\030\001 \003(\005B\002\020\001\022\025\n\t" +
17998 "timestamp\030\002 \003(\022B\002\020\001\022\025\n\tchangeset\030\003 \003(\022B\002" +
17999 "\020\001\022\017\n\003uid\030\004 \003(\021B\002\020\001\022\024\n\010user_sid\030\005 \003(\021B\002\020" +
18000 "\001\022\023\n\007visible\030\006 \003(\010B\002\020\001\"\027\n\tChangeSet\022\n\n\002i" +
18001 "d\030\001 \002(\003\"l\n\004Node\022\n\n\002id\030\001 \002(\022\022\020\n\004keys\030\002 \003(" +
18002 "\rB\002\020\001\022\020\n\004vals\030\003 \003(\rB\002\020\001\022\032\n\004info\030\004 \001(\0132\014." +
18003 "OSMPBF.Info\022\013\n\003lat\030\010 \002(\022\022\013\n\003lon\030\t \002(\022\"{\n" +
18004 "\nDenseNodes\022\016\n\002id\030\001 \003(\022B\002\020\001\022$\n\tdenseinfo" +
18005 "\030\005 \001(\0132\021.OSMPBF.DenseInfo\022\017\n\003lat\030\010 \003(\022B\002" +
18006 "\020\001\022\017\n\003lon\030\t \003(\022B\002\020\001\022\025\n\tkeys_vals\030\n \003(\005B\002" +
18007 "\020\001\"\205\001\n\003Way\022\n\n\002id\030\001 \002(\003\022\020\n\004keys\030\002 \003(\rB\002\020\001" +
18008 "\022\020\n\004vals\030\003 \003(\rB\002\020\001\022\032\n\004info\030\004 \001(\0132\014.OSMPB" +
18009 "F.Info\022\020\n\004refs\030\010 \003(\022B\002\020\001\022\017\n\003lat\030\t \003(\022B\002\020" +
18010 "\001\022\017\n\003lon\030\n \003(\022B\002\020\001\"\340\001\n\010Relation\022\n\n\002id\030\001 " +
18011 "\002(\003\022\020\n\004keys\030\002 \003(\rB\002\020\001\022\020\n\004vals\030\003 \003(\rB\002\020\001\022" +
18012 "\032\n\004info\030\004 \001(\0132\014.OSMPBF.Info\022\025\n\troles_sid" +
18013 "\030\010 \003(\005B\002\020\001\022\022\n\006memids\030\t \003(\022B\002\020\001\022.\n\005types\030" +
18014 "\n \003(\0162\033.OSMPBF.Relation.MemberTypeB\002\020\001\"-" +
18015 "\n\nMemberType\022\010\n\004NODE\020\000\022\007\n\003WAY\020\001\022\014\n\010RELAT" +
18016 "ION\020\002B%\n#org.openstreetmap.osmosis.osmbi" +
18017 "nary"
18018 };
18019 descriptor = com.google.protobuf.Descriptors.FileDescriptor
18020 .internalBuildGeneratedFileFrom(descriptorData,
18021 new com.google.protobuf.Descriptors.FileDescriptor[] {
18022 });
18023 internal_static_OSMPBF_HeaderBlock_descriptor =
18024 getDescriptor().getMessageTypes().get(0);
18025 internal_static_OSMPBF_HeaderBlock_fieldAccessorTable = new
18026 com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
18027 internal_static_OSMPBF_HeaderBlock_descriptor,
18028 new java.lang.String[] { "Bbox", "RequiredFeatures", "OptionalFeatures", "Writingprogram", "Source", "OsmosisReplicationTimestamp", "OsmosisReplicationSequenceNumber", "OsmosisReplicationBaseUrl", });
18029 internal_static_OSMPBF_HeaderBBox_descriptor =
18030 getDescriptor().getMessageTypes().get(1);
18031 internal_static_OSMPBF_HeaderBBox_fieldAccessorTable = new
18032 com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
18033 internal_static_OSMPBF_HeaderBBox_descriptor,
18034 new java.lang.String[] { "Left", "Right", "Top", "Bottom", });
18035 internal_static_OSMPBF_PrimitiveBlock_descriptor =
18036 getDescriptor().getMessageTypes().get(2);
18037 internal_static_OSMPBF_PrimitiveBlock_fieldAccessorTable = new
18038 com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
18039 internal_static_OSMPBF_PrimitiveBlock_descriptor,
18040 new java.lang.String[] { "Stringtable", "Primitivegroup", "Granularity", "LatOffset", "LonOffset", "DateGranularity", });
18041 internal_static_OSMPBF_PrimitiveGroup_descriptor =
18042 getDescriptor().getMessageTypes().get(3);
18043 internal_static_OSMPBF_PrimitiveGroup_fieldAccessorTable = new
18044 com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
18045 internal_static_OSMPBF_PrimitiveGroup_descriptor,
18046 new java.lang.String[] { "Nodes", "Dense", "Ways", "Relations", "Changesets", });
18047 internal_static_OSMPBF_StringTable_descriptor =
18048 getDescriptor().getMessageTypes().get(4);
18049 internal_static_OSMPBF_StringTable_fieldAccessorTable = new
18050 com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
18051 internal_static_OSMPBF_StringTable_descriptor,
18052 new java.lang.String[] { "S", });
18053 internal_static_OSMPBF_Info_descriptor =
18054 getDescriptor().getMessageTypes().get(5);
18055 internal_static_OSMPBF_Info_fieldAccessorTable = new
18056 com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
18057 internal_static_OSMPBF_Info_descriptor,
18058 new java.lang.String[] { "Version", "Timestamp", "Changeset", "Uid", "UserSid", "Visible", });
18059 internal_static_OSMPBF_DenseInfo_descriptor =
18060 getDescriptor().getMessageTypes().get(6);
18061 internal_static_OSMPBF_DenseInfo_fieldAccessorTable = new
18062 com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
18063 internal_static_OSMPBF_DenseInfo_descriptor,
18064 new java.lang.String[] { "Version", "Timestamp", "Changeset", "Uid", "UserSid", "Visible", });
18065 internal_static_OSMPBF_ChangeSet_descriptor =
18066 getDescriptor().getMessageTypes().get(7);
18067 internal_static_OSMPBF_ChangeSet_fieldAccessorTable = new
18068 com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
18069 internal_static_OSMPBF_ChangeSet_descriptor,
18070 new java.lang.String[] { "Id", });
18071 internal_static_OSMPBF_Node_descriptor =
18072 getDescriptor().getMessageTypes().get(8);
18073 internal_static_OSMPBF_Node_fieldAccessorTable = new
18074 com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
18075 internal_static_OSMPBF_Node_descriptor,
18076 new java.lang.String[] { "Id", "Keys", "Vals", "Info", "Lat", "Lon", });
18077 internal_static_OSMPBF_DenseNodes_descriptor =
18078 getDescriptor().getMessageTypes().get(9);
18079 internal_static_OSMPBF_DenseNodes_fieldAccessorTable = new
18080 com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
18081 internal_static_OSMPBF_DenseNodes_descriptor,
18082 new java.lang.String[] { "Id", "Denseinfo", "Lat", "Lon", "KeysVals", });
18083 internal_static_OSMPBF_Way_descriptor =
18084 getDescriptor().getMessageTypes().get(10);
18085 internal_static_OSMPBF_Way_fieldAccessorTable = new
18086 com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
18087 internal_static_OSMPBF_Way_descriptor,
18088 new java.lang.String[] { "Id", "Keys", "Vals", "Info", "Refs", "Lat", "Lon", });
18089 internal_static_OSMPBF_Relation_descriptor =
18090 getDescriptor().getMessageTypes().get(11);
18091 internal_static_OSMPBF_Relation_fieldAccessorTable = new
18092 com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
18093 internal_static_OSMPBF_Relation_descriptor,
18094 new java.lang.String[] { "Id", "Keys", "Vals", "Info", "RolesSid", "Memids", "Types", });
18095 }
18096
18097 // @@protoc_insertion_point(outer_class_scope)
18098 }
+0
-3
osmosis-osm-binary/osmosis-protoc.sh less more
0 #!/bin/sh
1
2 protoc --java_out=gen-src/main/java src/main/protobuf/fileformat.proto src/main/protobuf/osmformat.proto
+0
-23
osmosis-osm-binary/readme.txt less more
0 This is a customised version of Scott Crosby's PBF library. The original
1 version is here:
2 https://github.com/scrosby/OSM-binary
3
4 The original library is not available on Maven Central, but Osmosis has a
5 dependency on it. Therefore the original library has been modified to be built
6 as part of Osmosis and the code is renamed to live under an Osmosis package
7 name. This re-packaging avoids any conflicts if other versions of the library
8 exist on a target classpath.
9
10 This codebase is maintained at the following location on the osmosis branch:
11 https://github.com/brettch/OSM-binary
12
13 The osmosis branch contains a number of customisations including:
14 * Change to use an Osmosis package name.
15 * Remove all C code, and any other unnecessary files.
16 * Add Osmosis compatible Gradle build script.
17
18 The Osmosis repository contains a copy of this codebase, but it is not the
19 master location. It is manually updated to remain in sync with the above
20 location whenever necessary. It would have been possible to do a true merge
21 into the Osmosis repository, but this would have resulted in full history
22 of both repositories being included which may have been confusing.
+0
-139
osmosis-osm-binary/src/main/java/org/openstreetmap/osmosis/osmbinary/BinaryParser.java less more
0 /** Copyright (c) 2010 Scott A. Crosby. <scott@sacrosby.com>
1
2 This program is free software: you can redistribute it and/or modify
3 it under the terms of the GNU Lesser General Public License as
4 published by the Free Software Foundation, either version 3 of the
5 License, or (at your option) any later version.
6
7 This program is distributed in the hope that it will be useful,
8 but WITHOUT ANY WARRANTY; without even the implied warranty of
9 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 GNU General Public License for more details.
11
12 You should have received a copy of the GNU General Public License
13 along with this program. If not, see <http://www.gnu.org/licenses/>.
14
15 */
16
17 package org.openstreetmap.osmosis.osmbinary;
18
19
20 import java.util.Date;
21 import java.util.List;
22
23 import com.google.protobuf.InvalidProtocolBufferException;
24
25 import org.openstreetmap.osmosis.osmbinary.Osmformat;
26 import org.openstreetmap.osmosis.osmbinary.file.BlockReaderAdapter;
27 import org.openstreetmap.osmosis.osmbinary.file.FileBlock;
28 import org.openstreetmap.osmosis.osmbinary.file.FileBlockPosition;
29
30 public abstract class BinaryParser implements BlockReaderAdapter {
31 protected int granularity;
32 private long lat_offset;
33 private long lon_offset;
34 protected int date_granularity;
35 private String strings[];
36
37 /** Take a Info protocol buffer containing a date and convert it into a java Date object */
38 protected Date getDate(Osmformat.Info info) {
39 if (info.hasTimestamp()) {
40 return new Date(date_granularity * (long) info.getTimestamp());
41 } else
42 return NODATE;
43 }
44 public static final Date NODATE = new Date(-1);
45
46 /** Get a string based on the index used.
47 *
48 * Index 0 is reserved to use as a delimiter, therefore, index 1 corresponds to the first string in the table
49 * @param id
50 * @return
51 */
52 protected String getStringById(int id) {
53 return strings[id];
54 }
55
56 @Override
57 public void handleBlock(FileBlock message) {
58 // TODO Auto-generated method stub
59 try {
60 if (message.getType().equals("OSMHeader")) {
61 Osmformat.HeaderBlock headerblock = Osmformat.HeaderBlock
62 .parseFrom(message.getData());
63 parse(headerblock);
64 } else if (message.getType().equals("OSMData")) {
65 Osmformat.PrimitiveBlock primblock = Osmformat.PrimitiveBlock
66 .parseFrom(message.getData());
67 parse(primblock);
68 }
69 } catch (InvalidProtocolBufferException e) {
70 // TODO Auto-generated catch block
71 e.printStackTrace();
72 throw new Error("ParseError"); // TODO
73 }
74
75 }
76
77
78 @Override
79 public boolean skipBlock(FileBlockPosition block) {
80 // System.out.println("Seeing block of type: "+block.getType());
81 if (block.getType().equals("OSMData"))
82 return false;
83 if (block.getType().equals("OSMHeader"))
84 return false;
85 System.out.println("Skipped block of type: " + block.getType());
86 return true;
87 }
88
89
90 /** Convert a latitude value stored in a protobuf into a double, compensating for granularity and latitude offset */
91 public double parseLat(long degree) {
92 // Support non-zero offsets. (We don't currently generate them)
93 return (granularity * degree + lat_offset) * .000000001;
94 }
95
96 /** Convert a longitude value stored in a protobuf into a double, compensating for granularity and longitude offset */
97 public double parseLon(long degree) {
98 // Support non-zero offsets. (We don't currently generate them)
99 return (granularity * degree + lon_offset) * .000000001;
100 }
101
102 /** Parse a Primitive block (containing a string table, other paramaters, and PrimitiveGroups */
103 public void parse(Osmformat.PrimitiveBlock block) {
104 Osmformat.StringTable stablemessage = block.getStringtable();
105 strings = new String[stablemessage.getSCount()];
106
107 for (int i = 0; i < strings.length; i++) {
108 strings[i] = stablemessage.getS(i).toStringUtf8();
109 }
110
111 granularity = block.getGranularity();
112 lat_offset = block.getLatOffset();
113 lon_offset = block.getLonOffset();
114 date_granularity = block.getDateGranularity();
115
116 for (Osmformat.PrimitiveGroup groupmessage : block
117 .getPrimitivegroupList()) {
118 // Exactly one of these should trigger on each loop.
119 parseNodes(groupmessage.getNodesList());
120 parseWays(groupmessage.getWaysList());
121 parseRelations(groupmessage.getRelationsList());
122 if (groupmessage.hasDense())
123 parseDense(groupmessage.getDense());
124 }
125 }
126
127 /** Parse a list of Relation protocol buffers and send the resulting relations to a sink. */
128 protected abstract void parseRelations(List<Osmformat.Relation> rels);
129 /** Parse a DenseNode protocol buffer and send the resulting nodes to a sink. */
130 protected abstract void parseDense(Osmformat.DenseNodes nodes);
131 /** Parse a list of Node protocol buffers and send the resulting nodes to a sink. */
132 protected abstract void parseNodes(List<Osmformat.Node> nodes);
133 /** Parse a list of Way protocol buffers and send the resulting ways to a sink. */
134 protected abstract void parseWays(List<Osmformat.Way> ways);
135 /** Parse a header message. */
136 protected abstract void parse(Osmformat.HeaderBlock header);
137
138 }
+0
-161
osmosis-osm-binary/src/main/java/org/openstreetmap/osmosis/osmbinary/BinarySerializer.java less more
0 /** Copyright (c) 2010 Scott A. Crosby. <scott@sacrosby.com>
1
2 This program is free software: you can redistribute it and/or modify
3 it under the terms of the GNU Lesser General Public License as
4 published by the Free Software Foundation, either version 3 of the
5 License, or (at your option) any later version.
6
7 This program is distributed in the hope that it will be useful,
8 but WITHOUT ANY WARRANTY; without even the implied warranty of
9 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 GNU General Public License for more details.
11
12 You should have received a copy of the GNU General Public License
13 along with this program. If not, see <http://www.gnu.org/licenses/>.
14
15 */
16
17 package org.openstreetmap.osmosis.osmbinary;
18
19 import java.io.IOException;
20 import java.util.ArrayList;
21 import java.util.List;
22
23 import org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup;
24 import org.openstreetmap.osmosis.osmbinary.file.BlockOutputStream;
25 import org.openstreetmap.osmosis.osmbinary.file.FileBlock;
26
27 /**
28 * Generic serializer common code
29 *
30 * Serialize a set of blobs and process them. Subclasses implement handlers for
31 * different API's (osmosis, mkgmap, splitter, etc.)
32 *
33 * All data is converted into PrimGroupWriterInterface objects, which are then
34 * ordered to process their data at the appropriate time.
35 * */
36
37 public class BinarySerializer {
38
39 /**
40 * Interface used to write a group of primitives. One of these for each
41 * group type (Node, Way, Relation, DenseNode, Changeset)
42 */
43 protected interface PrimGroupWriterInterface {
44 /** This callback is invoked on each group that is going into the fileblock in order to give it a chance to
45 * add to the stringtable pool of strings. */
46 public void addStringsToStringtable();
47
48 /**
49 * This callback is invoked to request that the primgroup serialize itself into the given protocol buffer object.
50 */
51 public Osmformat.PrimitiveGroup serialize();
52 }
53
54 /** Set the granularity (precision of lat/lon, measured in unites of nanodegrees. */
55 public void configGranularity(int granularity) {
56 this.granularity = granularity;
57 }
58
59 /** Set whether metadata is to be omitted */
60 public void configOmit(boolean omit_metadata) {
61 this.omit_metadata = omit_metadata;
62 }
63
64 /** Configure the maximum number of entities in a batch */
65 public void configBatchLimit(int batch_limit) {
66 this.batch_limit = batch_limit;
67 }
68
69 // Paramaters affecting the output size.
70 protected final int MIN_DENSE = 10;
71 protected int batch_limit = 4000;
72
73 // Parmaters affecting the output.
74
75 protected int granularity = 100;
76 protected int date_granularity = 1000;
77 protected boolean omit_metadata = false;
78
79 /** How many primitives have been seen in this batch */
80 protected int batch_size = 0;
81 protected int total_entities = 0;
82 private StringTable stringtable = new StringTable();
83 protected List<PrimGroupWriterInterface> groups = new ArrayList<PrimGroupWriterInterface>();
84 protected BlockOutputStream output;
85
86 public BinarySerializer(BlockOutputStream output) {
87 this.output = output;
88 }
89
90 public StringTable getStringTable() {
91 return stringtable;
92 }
93
94 public void flush() throws IOException {
95 processBatch();
96 output.flush();
97 }
98
99 public void close() throws IOException {
100 flush();
101 output.close();
102 }
103
104 long debug_bytes = 0;
105
106 public void processBatch() {
107 // System.out.format("Batch of %d groups: ",groups.size());
108 if (groups.size() == 0)
109 return;
110 Osmformat.PrimitiveBlock.Builder primblock = Osmformat.PrimitiveBlock
111 .newBuilder();
112 stringtable.clear();
113 // Preprocessing: Figure out the stringtable.
114 for (PrimGroupWriterInterface i : groups)
115 i.addStringsToStringtable();
116
117 stringtable.finish();
118 // Now, start serializing.
119 for (PrimGroupWriterInterface i : groups) {
120 PrimitiveGroup group = i.serialize();
121 if (group != null)
122 primblock.addPrimitivegroup(group);
123 }
124 primblock.setStringtable(stringtable.serialize());
125 primblock.setGranularity(this.granularity);
126 primblock.setDateGranularity(this.date_granularity);
127
128 // Only generate data with offset (0,0)
129 //
130 Osmformat.PrimitiveBlock message = primblock.build();
131
132 // System.out.println(message);
133 debug_bytes += message.getSerializedSize();
134 // if (message.getSerializedSize() > 1000000)
135 // System.out.println(message);
136
137 try {
138 output.write(FileBlock.newInstance("OSMData", message
139 .toByteString(), null));
140 } catch (IOException e) {
141 // TODO Auto-generated catch block
142 e.printStackTrace();
143 throw new Error(e);
144 } finally {
145 batch_size = 0;
146 groups.clear();
147 }
148 // System.out.format("\n");
149 }
150
151 /** Convert from a degrees represented as a double into the serialized offset in nanodegrees.. */
152 public long mapRawDegrees(double degrees) {
153 return (long) ((degrees / .000000001));
154 }
155
156 /** Convert from a degrees represented as a double into the serialized offset. */
157 public int mapDegrees(double degrees) {
158 return (int) ((degrees / .0000001) / (granularity / 100));
159 }
160 }
+0
-138
osmosis-osm-binary/src/main/java/org/openstreetmap/osmosis/osmbinary/StringTable.java less more
0 /** Copyright (c) 2010 Scott A. Crosby. <scott@sacrosby.com>
1
2 This program is free software: you can redistribute it and/or modify
3 it under the terms of the GNU Lesser General Public License as
4 published by the Free Software Foundation, either version 3 of the
5 License, or (at your option) any later version.
6
7 This program is distributed in the hope that it will be useful,
8 but WITHOUT ANY WARRANTY; without even the implied warranty of
9 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 GNU General Public License for more details.
11
12 You should have received a copy of the GNU General Public License
13 along with this program. If not, see <http://www.gnu.org/licenses/>.
14
15 */
16
17 package org.openstreetmap.osmosis.osmbinary;
18
19 import java.util.Arrays;
20 import java.util.Comparator;
21 import java.util.HashMap;
22
23 import com.google.protobuf.ByteString;
24
25 /**
26 * Class for mapping a set of strings to integers, giving frequently occuring
27 * strings small integers.
28 */
29 public class StringTable {
30 public StringTable() {
31 clear();
32 }
33
34 private HashMap<String, Integer> counts;
35 private HashMap<String, Integer> stringmap;
36 private String set[];
37
38 public void incr(String s) {
39 if (counts.containsKey(s)) {
40 counts.put(s, new Integer(counts.get(s).intValue() + 1));
41 } else {
42 counts.put(s, new Integer(1));
43 }
44 }
45
46 /** After the stringtable has been built, return the offset of a string in it.
47 *
48 * Note, value '0' is reserved for use as a delimiter and will not be returned.
49 * @param s
50 * @return
51 */
52 public int getIndex(String s) {
53 return stringmap.get(s).intValue();
54 }
55
56 public void finish() {
57 Comparator<String> comparator = new Comparator<String>() {
58 @Override
59 public int compare(final String s1, String s2) {
60 int diff = counts.get(s2) - counts.get(s1);
61 return diff;
62 }
63 };
64
65 /* Sort the stringtable */
66
67 /*
68 When a string is referenced, strings in the stringtable with indices:
69 0 : Is reserved (used as a delimiter in tags
70 A: 1 to 127 : Uses can be represented with 1 byte
71 B: 128 to 128**2-1 : Uses can be represented with 2 bytes,
72 C: 128*128 to X : Uses can be represented with 3 bytes in the unlikely case we have >16k strings in a block. No block will contain enough strings that we'll need 4 bytes.
73
74 There are goals that will improve compression:
75 1. I want to use 1 bytes for the most frequently occurring strings, then 2 bytes, then 3 bytes.
76 2. I want to use low integers as frequently as possible (for better
77 entropy encoding out of deflate)
78 3. I want the stringtable to compress as small as possible.
79
80 Condition 1 is obvious. Condition 2 makes deflate compress stringtable references more effectively.
81 When compressing entities, delta coding causes small positive integers to occur more frequently
82 than larger integers. Even though a stringtable references to indices of 1 and 127 both use one
83 byte in a decompressed file, the small integer bias causes deflate to use fewer bits to represent
84 the smaller index when compressed. Condition 3 is most effective when adjacent strings in the
85 stringtable have a lot of common substrings.
86
87 So, when I decide on the master stringtable to use, I put the 127 most frequently occurring
88 strings into A (accomplishing goal 1), and sort them by frequency (to accomplish goal 2), but
89 for B and C, which contain the less progressively less frequently encountered strings, I sort
90 them lexiconographically, to maximize goal 3 and ignoring goal 2.
91
92 Goal 1 is the most important. Goal 2 helped enough to be worth it, and goal 3 was pretty minor,
93 but all should be re-benchmarked.
94
95
96 */
97
98
99
100 set = counts.keySet().toArray(new String[0]);
101 if (set.length > 0) {
102 // Sort based on the frequency.
103 Arrays.sort(set, comparator);
104 // Each group of keys that serializes to the same number of bytes is
105 // sorted lexiconographically.
106 // to maximize deflate compression.
107
108 // Don't sort the first array. There's not likely to be much benefit, and we want frequent values to be small.
109 //Arrays.sort(set, Math.min(0, set.length-1), Math.min(1 << 7, set.length-1));
110
111 Arrays.sort(set, Math.min(1 << 7, set.length-1), Math.min(1 << 14,
112 set.length-1));
113 Arrays.sort(set, Math.min(1 << 14, set.length-1), Math.min(1 << 21,
114 set.length-1), comparator);
115 }
116 stringmap = new HashMap<String, Integer>(2 * set.length);
117 for (int i = 0; i < set.length; i++) {
118 stringmap.put(set[i], new Integer(i+1)); // Index 0 is reserved for use as a delimiter.
119 }
120 counts = null;
121 }
122
123 public void clear() {
124 counts = new HashMap<String, Integer>(100);
125 stringmap = null;
126 set = null;
127 }
128
129 public Osmformat.StringTable.Builder serialize() {
130 Osmformat.StringTable.Builder builder = Osmformat.StringTable
131 .newBuilder();
132 builder.addS(ByteString.copyFromUtf8("")); // Add a unused string at offset 0 which is used as a delimiter.
133 for (int i = 0; i < set.length; i++)
134 builder.addS(ByteString.copyFromUtf8(set[i]));
135 return builder;
136 }
137 }
+0
-47
osmosis-osm-binary/src/main/java/org/openstreetmap/osmosis/osmbinary/file/BlockInputStream.java less more
0 /** Copyright (c) 2010 Scott A. Crosby. <scott@sacrosby.com>
1
2 This program is free software: you can redistribute it and/or modify
3 it under the terms of the GNU Lesser General Public License as
4 published by the Free Software Foundation, either version 3 of the
5 License, or (at your option) any later version.
6
7 This program is distributed in the hope that it will be useful,
8 but WITHOUT ANY WARRANTY; without even the implied warranty of
9 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 GNU General Public License for more details.
11
12 You should have received a copy of the GNU General Public License
13 along with this program. If not, see <http://www.gnu.org/licenses/>.
14
15 */
16
17 package org.openstreetmap.osmosis.osmbinary.file;
18
19 import java.io.EOFException;
20 import java.io.IOException;
21 import java.io.InputStream;
22
23 public class BlockInputStream {
24 // TODO: Should be seekable input stream!
25 public BlockInputStream(InputStream input, BlockReaderAdapter adaptor) {
26 this.input = input;
27 this.adaptor = adaptor;
28 }
29
30 public void process() throws IOException {
31 try {
32 while (true) {
33 FileBlock.process(input, adaptor);
34 }
35 } catch (EOFException e) {
36 adaptor.complete();
37 }
38 }
39
40 public void close() throws IOException {
41 input.close();
42 }
43
44 InputStream input;
45 BlockReaderAdapter adaptor;
46 }
+0
-74
osmosis-osm-binary/src/main/java/org/openstreetmap/osmosis/osmbinary/file/BlockOutputStream.java less more
0 /** Copyright (c) 2010 Scott A. Crosby. <scott@sacrosby.com>
1
2 This program is free software: you can redistribute it and/or modify
3 it under the terms of the GNU Lesser General Public License as
4 published by the Free Software Foundation, either version 3 of the
5 License, or (at your option) any later version.
6
7 This program is distributed in the hope that it will be useful,
8 but WITHOUT ANY WARRANTY; without even the implied warranty of
9 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 GNU General Public License for more details.
11
12 You should have received a copy of the GNU General Public License
13 along with this program. If not, see <http://www.gnu.org/licenses/>.
14
15 */
16
17 package org.openstreetmap.osmosis.osmbinary.file;
18
19 import java.io.DataOutputStream;
20 import java.io.IOException;
21 import java.io.OutputStream;
22 import java.util.ArrayList;
23 import java.util.List;
24
25 enum CompressFlags {
26 NONE, DEFLATE
27 }
28
29 public class BlockOutputStream {
30
31 public BlockOutputStream(OutputStream output) {
32 this.outwrite = new DataOutputStream(output);
33 this.compression = CompressFlags.DEFLATE;
34 }
35
36 public void setCompress(CompressFlags flag) {
37 compression = flag;
38 }
39
40 public void setCompress(String s) {
41 if (s.equals("none"))
42 compression = CompressFlags.NONE;
43 else if (s.equals("deflate"))
44 compression = CompressFlags.DEFLATE;
45 else
46 throw new Error("Unknown compression type: " + s);
47 }
48
49 /** Write a block with the stream's default compression flag */
50 public void write(FileBlock block) throws IOException {
51 this.write(block, compression);
52 }
53
54 /** Write a specific block with a specific compression flags */
55 public void write(FileBlock block, CompressFlags compression)
56 throws IOException {
57 FileBlockPosition ref = block.writeTo(outwrite, compression);
58 writtenblocks.add(ref);
59 }
60
61 public void flush() throws IOException {
62 outwrite.flush();
63 }
64
65 public void close() throws IOException {
66 outwrite.flush();
67 outwrite.close();
68 }
69
70 OutputStream outwrite;
71 List<FileBlockPosition> writtenblocks = new ArrayList<FileBlockPosition>();
72 CompressFlags compression;
73 }
+0
-40
osmosis-osm-binary/src/main/java/org/openstreetmap/osmosis/osmbinary/file/BlockReaderAdapter.java less more
0 /** Copyright (c) 2010 Scott A. Crosby. <scott@sacrosby.com>
1
2 This program is free software: you can redistribute it and/or modify
3 it under the terms of the GNU Lesser General Public License as
4 published by the Free Software Foundation, either version 3 of the
5 License, or (at your option) any later version.
6
7 This program is distributed in the hope that it will be useful,
8 but WITHOUT ANY WARRANTY; without even the implied warranty of
9 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 GNU General Public License for more details.
11
12 You should have received a copy of the GNU General Public License
13 along with this program. If not, see <http://www.gnu.org/licenses/>.
14
15 */
16
17 package org.openstreetmap.osmosis.osmbinary.file;
18
19 /** An adaptor that receives blocks from an input stream */
20 public interface BlockReaderAdapter {
21 /**
22 * Does the reader understand this block? Does it want the data in it?
23 *
24 * A reference contains the metadata about a block and can saved --- or
25 * stored ---- for future random access. However, during a strea read of the
26 * file, does the user want this block?
27 *
28 * handleBlock will be called on all blocks that are not skipped, in file
29 * order.
30 *
31 * */
32 boolean skipBlock(FileBlockPosition message);
33
34 /** Called with the data in the block. */
35 void handleBlock(FileBlock message);
36
37 /** Called when the file is fully read. */
38 void complete();
39 }
+0
-142
osmosis-osm-binary/src/main/java/org/openstreetmap/osmosis/osmbinary/file/FileBlock.java less more
0 /** Copyright (c) 2010 Scott A. Crosby. <scott@sacrosby.com>
1
2 This program is free software: you can redistribute it and/or modify
3 it under the terms of the GNU Lesser General Public License as
4 published by the Free Software Foundation, either version 3 of the
5 License, or (at your option) any later version.
6
7 This program is distributed in the hope that it will be useful,
8 but WITHOUT ANY WARRANTY; without even the implied warranty of
9 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 GNU General Public License for more details.
11
12 You should have received a copy of the GNU General Public License
13 along with this program. If not, see <http://www.gnu.org/licenses/>.
14
15 */
16
17 package org.openstreetmap.osmosis.osmbinary.file;
18
19 import java.io.DataOutputStream;
20 import java.io.FileOutputStream;
21 import java.io.IOException;
22 import java.io.InputStream;
23 import java.io.OutputStream;
24 import java.util.Arrays;
25 import java.util.zip.Deflater;
26
27 import com.google.protobuf.ByteString;
28
29 import org.openstreetmap.osmosis.osmbinary.Fileformat;
30 import org.openstreetmap.osmosis.osmbinary.Fileformat.BlobHeader;
31
32 /** A full fileblock object contains both the metadata and data of a fileblock */
33 public class FileBlock extends FileBlockBase {
34 /** Contains the contents of a block for use or further processing */
35 ByteString data; // serialized Format.Blob
36
37 /** Don't be noisy unless the warning occurs somewhat often */
38 static int warncount = 0;
39
40 private FileBlock(String type, ByteString blob, ByteString indexdata) {
41 super(type, indexdata);
42 this.data = blob;
43 }
44
45 public static FileBlock newInstance(String type, ByteString blob,
46 ByteString indexdata) {
47 if (blob != null && blob.size() > MAX_BODY_SIZE/2) {
48 System.err.println("Warning: Fileblock has body size too large and may be considered corrupt");
49 if (blob != null && blob.size() > MAX_BODY_SIZE-1024*1024) {
50 throw new Error("This file has too many entities in a block. Parsers will reject it.");
51 }
52 }
53 if (indexdata != null && indexdata.size() > MAX_HEADER_SIZE/2) {
54 System.err.println("Warning: Fileblock has indexdata too large and may be considered corrupt");
55 if (indexdata != null && indexdata.size() > MAX_HEADER_SIZE-512) {
56 throw new Error("This file header is too large. Parsers will reject it.");
57 }
58 }
59 return new FileBlock(type, blob, indexdata);
60 }
61
62 protected void deflateInto(org.openstreetmap.osmosis.osmbinary.Fileformat.Blob.Builder blobbuilder) {
63 int size = data.size();
64 Deflater deflater = new Deflater();
65 deflater.setInput(data.toByteArray());
66 deflater.finish();
67 byte out[] = new byte[size];
68 deflater.deflate(out);
69
70 if (!deflater.finished()) {
71 // Buffer wasn't long enough. Be noisy.
72 ++warncount;
73 if (warncount > 10 && warncount%100 == 0)
74 System.out.println("Compressed buffers are too short, causing extra copy");
75 out = Arrays.copyOf(out, size + size / 64 + 16);
76 deflater.deflate(out, deflater.getTotalOut(), out.length
77 - deflater.getTotalOut());
78 if (!deflater.finished()) {
79 throw new Error("Internal error in compressor");
80 }
81 }
82 ByteString compressed = ByteString.copyFrom(out, 0, deflater
83 .getTotalOut());
84 blobbuilder.setZlibData(compressed);
85 deflater.end();
86 }
87
88 public FileBlockPosition writeTo(OutputStream outwrite, CompressFlags flags)
89 throws IOException {
90 BlobHeader.Builder builder = Fileformat.BlobHeader
91 .newBuilder();
92 if (indexdata != null)
93 builder.setIndexdata(indexdata);
94 builder.setType(type);
95
96 Fileformat.Blob.Builder blobbuilder = Fileformat.Blob.newBuilder();
97 if (flags == CompressFlags.NONE) {
98 blobbuilder.setRaw(data);
99 blobbuilder.setRawSize(data.size());
100 } else {
101 blobbuilder.setRawSize(data.size());
102 if (flags == CompressFlags.DEFLATE)
103 deflateInto(blobbuilder);
104 else
105 throw new Error("Compression flag not understood");
106 }
107 Fileformat.Blob blob = blobbuilder.build();
108
109 builder.setDatasize(blob.getSerializedSize());
110 Fileformat.BlobHeader message = builder.build();
111 int size = message.getSerializedSize();
112
113 // System.out.format("Outputed header size %d bytes, header of %d bytes, and blob of %d bytes\n",
114 // size,message.getSerializedSize(),blob.getSerializedSize());
115 (new DataOutputStream(outwrite)).writeInt(size);
116 message.writeTo(outwrite);
117 long offset = -1;
118
119 if (outwrite instanceof FileOutputStream)
120 offset = ((FileOutputStream) outwrite).getChannel().position();
121
122 blob.writeTo(outwrite);
123 return FileBlockPosition.newInstance(this, offset, size);
124 }
125
126 /** Reads or skips a fileblock. */
127 static void process(InputStream input, BlockReaderAdapter callback)
128 throws IOException {
129 FileBlockHead fileblock = FileBlockHead.readHead(input);
130 if (callback.skipBlock(fileblock)) {
131 // System.out.format("Attempt to skip %d bytes\n",header.getDatasize());
132 fileblock.skipContents(input);
133 } else {
134 callback.handleBlock(fileblock.readContents(input));
135 }
136 }
137
138 public ByteString getData() {
139 return data;
140 }
141 }
+0
-58
osmosis-osm-binary/src/main/java/org/openstreetmap/osmosis/osmbinary/file/FileBlockBase.java less more
0 /** Copyright (c) 2010 Scott A. Crosby. <scott@sacrosby.com>
1
2 This program is free software: you can redistribute it and/or modify
3 it under the terms of the GNU Lesser General Public License as
4 published by the Free Software Foundation, either version 3 of the
5 License, or (at your option) any later version.
6
7 This program is distributed in the hope that it will be useful,
8 but WITHOUT ANY WARRANTY; without even the implied warranty of
9 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 GNU General Public License for more details.
11
12 You should have received a copy of the GNU General Public License
13 along with this program. If not, see <http://www.gnu.org/licenses/>.
14
15 */
16
17 package org.openstreetmap.osmosis.osmbinary.file;
18
19 import com.google.protobuf.ByteString;
20
21 /**
22 * Base class that contains the metadata about a fileblock.
23 *
24 * Subclasses of this include additional fields, such as byte offsets that let a
25 * fileblock be read in a random-access fashion, or the data itself.
26 *
27 * @author crosby
28 *
29 */
30 public class FileBlockBase {
31
32 /** If a block header is bigger than this, fail. We use excessively large header size as an indication of corrupt files */
33 static final int MAX_HEADER_SIZE = 64*1024;
34 /** If a block's size is bigger than this, fail. We use excessively large block sizes as an indication of corrupt files */
35 static final int MAX_BODY_SIZE = 32*1024*1024;
36
37 protected FileBlockBase(String type, ByteString indexdata) {
38 this.type = type;
39 this.indexdata = indexdata;
40 }
41
42 /** Identifies the type of the data within a block */
43 protected final String type;
44 /**
45 * Block metadata, stored in the index block and as a prefix for every
46 * block.
47 */
48 protected final ByteString indexdata;
49
50 public String getType() {
51 return type;
52 }
53
54 public ByteString getIndexData() {
55 return indexdata;
56 }
57 }
+0
-97
osmosis-osm-binary/src/main/java/org/openstreetmap/osmosis/osmbinary/file/FileBlockHead.java less more
0 /** Copyright (c) 2010 Scott A. Crosby. <scott@sacrosby.com>
1
2 This program is free software: you can redistribute it and/or modify
3 it under the terms of the GNU Lesser General Public License as
4 published by the Free Software Foundation, either version 3 of the
5 License, or (at your option) any later version.
6
7 This program is distributed in the hope that it will be useful,
8 but WITHOUT ANY WARRANTY; without even the implied warranty of
9 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 GNU General Public License for more details.
11
12 You should have received a copy of the GNU General Public License
13 along with this program. If not, see <http://www.gnu.org/licenses/>.
14
15 */
16
17 package org.openstreetmap.osmosis.osmbinary.file;
18
19 import java.io.DataInputStream;
20 import java.io.FileInputStream;
21 import java.io.IOException;
22 import java.io.InputStream;
23 import com.google.protobuf.ByteString;
24
25 import org.openstreetmap.osmosis.osmbinary.Fileformat;
26
27 /**
28 * Intermediate representation of the header of a fileblock when a set of
29 * fileblocks is read as in a stream. The data in the fileblock must be either
30 * skipped (where the returned value is a reference to the fileblock) or parsed.
31 *
32 * @author crosby
33 *
34 */
35 public class FileBlockHead extends FileBlockReference {
36 protected FileBlockHead(String type, ByteString indexdata) {
37 super(type, indexdata);
38 }
39
40 /**
41 * Read the header. After reading the header, either the contents must be
42 * skipped or read
43 */
44 static FileBlockHead readHead(InputStream input) throws IOException {
45 DataInputStream datinput = new DataInputStream(input);
46 int headersize = datinput.readInt();
47 // System.out.format("Header size %d %x\n",headersize,headersize);
48 if (headersize > MAX_HEADER_SIZE) {
49 throw new FileFormatException("Unexpectedly long header "+MAX_HEADER_SIZE+ " bytes. Possibly corrupt file.");
50 }
51
52 byte buf[] = new byte[headersize];
53 datinput.readFully(buf);
54 // System.out.format("Read buffer for header of %d bytes\n",buf.length);
55 Fileformat.BlobHeader header = Fileformat.BlobHeader
56 .parseFrom(buf);
57 FileBlockHead fileblock = new FileBlockHead(header.getType(), header
58 .getIndexdata());
59
60 fileblock.datasize = header.getDatasize();
61 if (header.getDatasize() > MAX_BODY_SIZE) {
62 throw new FileFormatException("Unexpectedly long body "+MAX_BODY_SIZE+ " bytes. Possibly corrupt file.");
63 }
64
65 fileblock.input = input;
66 if (input instanceof FileInputStream)
67 fileblock.data_offset = ((FileInputStream) input).getChannel()
68 .position();
69
70 return fileblock;
71 }
72
73 /**
74 * Assumes the stream is positioned over at the start of the data, skip over
75 * it.
76 *
77 * @throws IOException
78 */
79 void skipContents(InputStream input) throws IOException {
80 if (input.skip(getDatasize()) != getDatasize())
81 assert false : "SHORT READ";
82 }
83
84 /**
85 * Assumes the stream is positioned over at the start of the data, read it
86 * and return the complete FileBlock
87 *
88 * @throws IOException
89 */
90 FileBlock readContents(InputStream input) throws IOException {
91 DataInputStream datinput = new DataInputStream(input);
92 byte buf[] = new byte[getDatasize()];
93 datinput.readFully(buf);
94 return parseData(buf);
95 }
96 }
+0
-112
osmosis-osm-binary/src/main/java/org/openstreetmap/osmosis/osmbinary/file/FileBlockPosition.java less more
0 /** Copyright (c) 2010 Scott A. Crosby. <scott@sacrosby.com>
1
2 This program is free software: you can redistribute it and/or modify
3 it under the terms of the GNU Lesser General Public License as
4 published by the Free Software Foundation, either version 3 of the
5 License, or (at your option) any later version.
6
7 This program is distributed in the hope that it will be useful,
8 but WITHOUT ANY WARRANTY; without even the implied warranty of
9 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 GNU General Public License for more details.
11
12 You should have received a copy of the GNU General Public License
13 along with this program. If not, see <http://www.gnu.org/licenses/>.
14
15 */
16
17 package org.openstreetmap.osmosis.osmbinary.file;
18
19 import java.io.DataInputStream;
20 import java.io.FileInputStream;
21 import java.io.IOException;
22 import java.io.InputStream;
23 import java.util.zip.DataFormatException;
24 import java.util.zip.Inflater;
25
26 import com.google.protobuf.ByteString;
27 import com.google.protobuf.InvalidProtocolBufferException;
28
29 import org.openstreetmap.osmosis.osmbinary.Fileformat;
30
31 /**
32 * Stores the position in the stream of a fileblock so that it can be easily
33 * read in a random-access fashion.
34 *
35 * We can turn this into a 'real' block by appropriately seeking into the file
36 * and doing a 'read'.
37 *
38 * */
39 public class FileBlockPosition extends FileBlockBase {
40 protected FileBlockPosition(String type, ByteString indexdata) {
41 super(type, indexdata);
42 }
43
44 /** Parse out and decompress the data part of a fileblock helper function. */
45 FileBlock parseData(byte buf[]) throws InvalidProtocolBufferException {
46 FileBlock out = FileBlock.newInstance(type, null, indexdata);
47 Fileformat.Blob blob = Fileformat.Blob.parseFrom(buf);
48 if (blob.hasRaw()) {
49 out.data = blob.getRaw();
50 } else if (blob.hasZlibData()) {
51 byte buf2[] = new byte[blob.getRawSize()];
52 Inflater decompresser = new Inflater();
53 decompresser.setInput(blob.getZlibData().toByteArray());
54 // decompresser.getRemaining();
55 try {
56 decompresser.inflate(buf2);
57 } catch (DataFormatException e) {
58 e.printStackTrace();
59 throw new Error(e);
60 }
61 assert (decompresser.finished());
62 decompresser.end();
63 out.data = ByteString.copyFrom(buf2);
64 }
65 return out;
66 }
67
68 public int getDatasize() {
69 return datasize;
70 }
71
72 /*
73 * Given any form of fileblock and an offset/length value, return a
74 * reference that can be used to dereference and read the contents.
75 */
76 static FileBlockPosition newInstance(FileBlockBase base, long offset,
77 int length) {
78 FileBlockPosition out = new FileBlockPosition(base.type, base.indexdata);
79 out.datasize = length;
80 out.data_offset = offset;
81 return out;
82 }
83
84 public FileBlock read(InputStream input) throws IOException {
85 if (input instanceof FileInputStream) {
86 ((FileInputStream) input).getChannel().position(data_offset);
87 byte buf[] = new byte[getDatasize()];
88 (new DataInputStream(input)).readFully(buf);
89 return parseData(buf);
90 } else {
91 throw new Error("Random access binary reads require seekability");
92 }
93 }
94
95 /**
96 * TODO: Convert this reference into a serialized representation that can be
97 * stored.
98 */
99 public ByteString serialize() {
100 throw new Error("TODO");
101 }
102
103 /** TODO: Parse a serialized representation of this block reference */
104 static FileBlockPosition parseFrom(ByteString b) {
105 throw new Error("TODO");
106 }
107
108 protected int datasize;
109 /** Offset into the file of the data part of the block */
110 long data_offset;
111 }
+0
-54
osmosis-osm-binary/src/main/java/org/openstreetmap/osmosis/osmbinary/file/FileBlockReference.java less more
0 /** Copyright (c) 2010 Scott A. Crosby. <scott@sacrosby.com>
1
2 This program is free software: you can redistribute it and/or modify
3 it under the terms of the GNU Lesser General Public License as
4 published by the Free Software Foundation, either version 3 of the
5 License, or (at your option) any later version.
6
7 This program is distributed in the hope that it will be useful,
8 but WITHOUT ANY WARRANTY; without even the implied warranty of
9 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 GNU General Public License for more details.
11
12 You should have received a copy of the GNU General Public License
13 along with this program. If not, see <http://www.gnu.org/licenses/>.
14
15 */
16
17 package org.openstreetmap.osmosis.osmbinary.file;
18
19 import java.io.IOException;
20 import java.io.InputStream;
21
22 import com.google.protobuf.ByteString;
23
24 /**
25 * A FileBlockPosition that remembers what file this is so that it can simply be
26 * dereferenced
27 */
28 public class FileBlockReference extends FileBlockPosition {
29
30 /**
31 * Convenience cache for storing the input this reference is contained
32 * within so that it can be cached
33 */
34 protected InputStream input;
35
36 protected FileBlockReference(String type, ByteString indexdata) {
37 super(type, indexdata);
38 }
39
40 public FileBlock read() throws IOException {
41 return read(input);
42 }
43
44 static FileBlockPosition newInstance(FileBlockBase base, InputStream input,
45 long offset, int length) {
46 FileBlockReference out = new FileBlockReference(base.type,
47 base.indexdata);
48 out.datasize = length;
49 out.data_offset = offset;
50 out.input = input;
51 return out;
52 }
53 }
+0
-33
osmosis-osm-binary/src/main/java/org/openstreetmap/osmosis/osmbinary/file/FileFormatException.java less more
0 /** Copyright (c) 2010 Scott A. Crosby. <scott@sacrosby.com>
1
2 This program is free software: you can redistribute it and/or modify
3 it under the terms of the GNU Lesser General Public License as
4 published by the Free Software Foundation, either version 3 of the
5 License, or (at your option) any later version.
6
7 This program is distributed in the hope that it will be useful,
8 but WITHOUT ANY WARRANTY; without even the implied warranty of
9 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 GNU General Public License for more details.
11
12 You should have received a copy of the GNU General Public License
13 along with this program. If not, see <http://www.gnu.org/licenses/>.
14
15 */
16
17 package org.openstreetmap.osmosis.osmbinary.file;
18
19 import java.io.IOException;
20
21 public class FileFormatException extends IOException {
22
23 public FileFormatException(String string) {
24 super(string);
25 }
26
27 /**
28 *
29 */
30 private static final long serialVersionUID = -8128010128748910923L;
31
32 }
+0
-243
osmosis-osm-binary/src/main/java/org/openstreetmap/osmosis/osmbinary/test/BuildTestFile.java less more
0 /** Copyright (c) 2010 Scott A. Crosby. <scott@sacrosby.com>
1
2 This program is free software: you can redistribute it and/or modify
3 it under the terms of the GNU Lesser General Public License as
4 published by the Free Software Foundation, either version 3 of the
5 License, or (at your option) any later version.
6
7 This program is distributed in the hope that it will be useful,
8 but WITHOUT ANY WARRANTY; without even the implied warranty of
9 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 GNU General Public License for more details.
11
12 You should have received a copy of the GNU General Public License
13 along with this program. If not, see <http://www.gnu.org/licenses/>.
14
15 */
16
17 package org.openstreetmap.osmosis.osmbinary.test;
18
19 import java.io.FileNotFoundException;
20 import java.io.FileOutputStream;
21 import java.io.IOException;
22 import java.util.Arrays;
23 import java.util.Collections;
24
25 import com.google.protobuf.ByteString;
26
27 import org.openstreetmap.osmosis.osmbinary.Fileformat.Blob;
28 import org.openstreetmap.osmosis.osmbinary.Fileformat.BlobHeader;
29 import org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes;
30 import org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBlock;
31 import org.openstreetmap.osmosis.osmbinary.Osmformat.Info;
32 import org.openstreetmap.osmosis.osmbinary.Osmformat.Node;
33 import org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveBlock;
34 import org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveBlock.Builder;
35 import org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup;
36 import org.openstreetmap.osmosis.osmbinary.Osmformat.Relation;
37 import org.openstreetmap.osmosis.osmbinary.Osmformat.Relation.MemberType;
38 import org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable;
39 import org.openstreetmap.osmosis.osmbinary.Osmformat.Way;
40 import org.openstreetmap.osmosis.osmbinary.file.BlockOutputStream;
41 import org.openstreetmap.osmosis.osmbinary.file.FileBlock;
42
43 public class BuildTestFile {
44 BlockOutputStream output;
45 public static final long BILLION = 1000000000L;
46
47 StringTable makeStringTable(String prefix) {
48 return
49 StringTable.newBuilder()
50 .addS(ByteString.copyFromUtf8("")) // Never used.
51 .addS(ByteString.copyFromUtf8(prefix+"Offset1"))
52 .addS(ByteString.copyFromUtf8(prefix+"Offset2"))
53 .addS(ByteString.copyFromUtf8(prefix+"Offset3"))
54 .addS(ByteString.copyFromUtf8(prefix+"Offset4"))
55 .addS(ByteString.copyFromUtf8(prefix+"Offset5"))
56 .addS(ByteString.copyFromUtf8(prefix+"Offset6"))
57 .addS(ByteString.copyFromUtf8(prefix+"Offset7"))
58 .addS(ByteString.copyFromUtf8(prefix+"Offset8"))
59 .build();
60 }
61 void makeSimpleFileBlock1() throws IOException {
62 PrimitiveBlock.Builder b1 = PrimitiveBlock.newBuilder();
63 b1.setStringtable(makeStringTable("B1"));
64
65 b1.addPrimitivegroup(
66 PrimitiveGroup.newBuilder()
67 .addNodes(Node.newBuilder()
68 .setId(101).setLat(13*10*1000*1000).setLon(-14*10*1000*1000)
69 .addKeys(1).addVals(2))
70 .addNodes(Node.newBuilder()
71 .setId(101).setLat(12345678).setLon(-23456789)) // Should be 1.2345678 degrees lat and -2.3456789 lon.
72 );
73 b1.addPrimitivegroup(
74 PrimitiveGroup.newBuilder()
75 .addWays(Way.newBuilder()
76 .setId(201)
77 .addRefs(101).addRefs(1).addRefs(-1).addRefs(10).addRefs(-20) // Delta coded. Should be 101, 102, 101, 111, 91.
78 .addKeys(2).addVals(1).addKeys(3).addVals(4))
79 .addWays(Way.newBuilder()
80 .setId(-301)
81 .addRefs(211).addRefs(1).addRefs(-1).addRefs(10).addRefs(-300) // Delta coded. Should be 211, 212, 211, 221, -79
82 .addKeys(4).addVals(3).addKeys(5).addVals(6))
83 .addWays(Way.newBuilder()
84 .setId(401).addRefs(211).addRefs(1))
85 .addWays(Way.newBuilder()
86 .setId(501))
87 );
88
89 b1.addPrimitivegroup(
90 PrimitiveGroup.newBuilder()
91 .addRelations(Relation.newBuilder()
92 .setId(601)
93 .addTypes(MemberType.NODE).addMemids(50).addRolesSid(2)
94 .addTypes(MemberType.NODE).addMemids(3).addRolesSid(3)
95 .addTypes(MemberType.WAY).addMemids(3).addRolesSid(4)
96 .addTypes(MemberType.RELATION).addMemids(3).addRolesSid(5))
97 .addRelations(Relation.newBuilder()
98 .setId(701)
99 .addTypes(MemberType.RELATION).addMemids(60).addRolesSid(6)
100 .addTypes(MemberType.RELATION).addMemids(5).addRolesSid(7)
101 .addKeys(1).addVals(2)));
102
103 b1.addPrimitivegroup(
104 PrimitiveGroup.newBuilder()
105 .setDense(DenseNodes.newBuilder()
106 .addId(1001).addId(110).addId(-2000).addId(8889)
107 .addLat(12*10000000).addLat(1500000).addLat(-12*10000000).addLat(-12*10000000)
108 .addLon(-12*10000000).addLon(2500000).addLon(13*10000000).addLon(2*10000000)
109 .addKeysVals(1).addKeysVals(2).addKeysVals(0)
110 .addKeysVals(0)
111 .addKeysVals(2).addKeysVals(3).addKeysVals(4).addKeysVals(5).addKeysVals(0)
112 .addKeysVals(3).addKeysVals(3).addKeysVals(0)
113 ));
114
115 output.write(FileBlock.newInstance("OSMData", b1.build().toByteString(),null));
116
117 PrimitiveBlock.Builder b2 = PrimitiveBlock.newBuilder();
118 b2.setLatOffset(10*BILLION + 109208300)
119 .setLonOffset(20*BILLION + 901802700)
120 .setGranularity(1200);
121 b2.setStringtable(makeStringTable("B2"));
122
123 // Test out granularity stuff.
124 b2.addPrimitivegroup(
125 PrimitiveGroup.newBuilder()
126 .addNodes(Node.newBuilder().setId(100000).setLat(0).setLon(0))
127 .addNodes(Node.newBuilder().setId(100001).setLat(1000).setLon(2000))
128 .addNodes(Node.newBuilder().setId(100002).setLat(1001).setLon(2001))
129 .addNodes(Node.newBuilder().setId(100003).setLat(1002).setLon(2002))
130 .addNodes(Node.newBuilder().setId(100004).setLat(1003).setLon(2003))
131 .addNodes(Node.newBuilder().setId(100005).setLat(1004).setLon(2004)));
132
133
134 output.write(FileBlock.newInstance("OSMData", b2.build().toByteString(),null));
135 }
136
137
138 BuildTestFile(String name, String compress) throws IOException {
139 output = new BlockOutputStream(new FileOutputStream(name));
140 output.setCompress(compress);
141 HeaderBlock.Builder b = HeaderBlock.newBuilder();
142 b.addRequiredFeatures("OsmSchema-V0.6").addRequiredFeatures("DenseNodes").setSource("QuickBrownFox");
143 output.write(FileBlock.newInstance("OSMHeader",b.build().toByteString(),null));
144 }
145
146
147 public static void main(String[] args) {
148 try {
149 BuildTestFile out1a = new BuildTestFile("TestFile1-deflate.osm.pbf","deflate");
150 out1a.makeSimpleFileBlock1();
151 out1a.output.close();
152
153 BuildTestFile out1b = new BuildTestFile("TestFile1-none.osm.pbf","none");
154 out1b.makeSimpleFileBlock1();
155 out1b.output.close();
156
157 BuildTestFile out2 = new BuildTestFile("TestFile2-uncom.osm.pbf","deflate");
158 out2.makeGranFileBlock1();
159 out2.output.close();
160
161
162 } catch (IOException e) {
163 // TODO Auto-generated catch block
164 e.printStackTrace();
165 }
166 }
167
168
169 void makeGranFileBlock1() throws IOException {
170 PrimitiveBlock.Builder b1 = PrimitiveBlock.newBuilder();
171 b1.setLatOffset(10*BILLION + 109208300)
172 .setLonOffset(20*BILLION + 901802700)
173 .setGranularity(1200)
174 .setDateGranularity(2500);
175 b1.setStringtable(makeStringTable("C1"));
176
177 b1.addPrimitivegroup(
178 PrimitiveGroup.newBuilder()
179 .addNodes(Node.newBuilder()
180 .setId(100001)
181 .setLat(1000).setLon(2000)
182 .setInfo(Info.newBuilder()
183 .setTimestamp(1001)
184 .setChangeset(-12)
185 .setUid(21)
186 .setUserSid(6)
187 .build())
188 .build())
189 .addNodes(Node.newBuilder()
190 .setId(100002)
191 .setLat(1001).setLon(2001)
192 .setInfo(Info.newBuilder()
193 .setVersion(102)
194 .setTimestamp(1002)
195 .setChangeset(12)
196 .setUid(-21)
197 .setUserSid(5)
198 .build())
199 .build())
200 .addNodes(Node.newBuilder()
201 .setId(100003)
202 .setLat(1003).setLon(2003)
203 .setInfo(Info.newBuilder()
204 .setVersion(103)
205 .setUserSid(4)
206 .build())
207 .build())
208 )
209
210 ;
211
212 // The same, but with different granularities.
213 PrimitiveBlock.Builder b2 = PrimitiveBlock.newBuilder();
214 b2.setLatOffset(12*BILLION + 303)
215 .setLonOffset(22*BILLION + 404)
216 .setGranularity(1401)
217 .setDateGranularity(3003);
218 b2.setStringtable(makeStringTable("C2"));
219 b2.addPrimitivegroup(
220 PrimitiveGroup.newBuilder()
221 .addNodes(Node.newBuilder()
222 .setId(100001)
223 .addKeys(1).addVals(2)
224 .addKeys(1).addVals(3) // Support multiple vals for a key.
225 .addKeys(3).addVals(4)
226 .setLat(1000).setLon(2000)
227 .build())
228 .addNodes(Node.newBuilder()
229 .setId(100002)
230 .setLat(1001).setLon(2001)
231 .build())
232 .addNodes(Node.newBuilder()
233 .setId(100003)
234 .setLat(1003).setLon(2003)
235 .addKeys(5).addVals(6)
236 .build())
237 );
238 output.write(FileBlock.newInstance("OSMData", b1.build().toByteString(),null));
239 output.write(FileBlock.newInstance("OSMData", b2.build().toByteString(),null));
240 }
241
242 }
+0
-56
osmosis-osm-binary/src/main/protobuf/fileformat.proto less more
0 /** Copyright (c) 2010 Scott A. Crosby. <scott@sacrosby.com>
1
2 This program is free software: you can redistribute it and/or modify
3 it under the terms of the GNU Lesser General Public License as
4 published by the Free Software Foundation, either version 3 of the
5 License, or (at your option) any later version.
6
7 This program is distributed in the hope that it will be useful,
8 but WITHOUT ANY WARRANTY; without even the implied warranty of
9 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 GNU Lesser General Public License for more details.
11
12 You should have received a copy of the GNU Lesser General Public License
13 along with this program. If not, see <http://www.gnu.org/licenses/>.
14
15 */
16
17 syntax = "proto2";
18
19 //option optimize_for = LITE_RUNTIME;
20 option java_package = "org.openstreetmap.osmosis.osmbinary";
21 package OSMPBF;
22
23 //protoc --java_out=../.. fileformat.proto
24
25
26 //
27 // STORAGE LAYER: Storing primitives.
28 //
29
30 message Blob {
31 optional bytes raw = 1; // No compression
32 optional int32 raw_size = 2; // When compressed, the uncompressed size
33
34 // Possible compressed versions of the data.
35 optional bytes zlib_data = 3;
36
37 // PROPOSED feature for LZMA compressed data. SUPPORT IS NOT REQUIRED.
38 optional bytes lzma_data = 4;
39
40 // Formerly used for bzip2 compressed data. Depreciated in 2010.
41 optional bytes OBSOLETE_bzip2_data = 5 [deprecated=true]; // Don't reuse this tag number.
42 }
43
44 /* A file contains an sequence of fileblock headers, each prefixed by
45 their length in network byte order, followed by a data block
46 containing the actual data. types staring with a "_" are reserved.
47 */
48
49 message BlobHeader {
50 required string type = 1;
51 optional bytes indexdata = 2;
52 required int32 datasize = 3;
53 }
54
55
+0
-265
osmosis-osm-binary/src/main/protobuf/osmformat.proto less more
0 /** Copyright (c) 2010 Scott A. Crosby. <scott@sacrosby.com>
1
2 This program is free software: you can redistribute it and/or modify
3 it under the terms of the GNU Lesser General Public License as
4 published by the Free Software Foundation, either version 3 of the
5 License, or (at your option) any later version.
6
7 This program is distributed in the hope that it will be useful,
8 but WITHOUT ANY WARRANTY; without even the implied warranty of
9 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 GNU Lesser General Public License for more details.
11
12 You should have received a copy of the GNU Lesser General Public License
13 along with this program. If not, see <http://www.gnu.org/licenses/>.
14
15 */
16
17 syntax = "proto2";
18
19 //option optimize_for = LITE_RUNTIME;
20 option java_package = "org.openstreetmap.osmosis.osmbinary";
21 package OSMPBF;
22
23 /* OSM Binary file format
24
25 This is the master schema file of the OSM binary file format. This
26 file is designed to support limited random-access and future
27 extendability.
28
29 A binary OSM file consists of a sequence of FileBlocks (please see
30 fileformat.proto). The first fileblock contains a serialized instance
31 of HeaderBlock, followed by a sequence of PrimitiveBlock blocks that
32 contain the primitives.
33
34 Each primitiveblock is designed to be independently parsable. It
35 contains a string table storing all strings in that block (keys and
36 values in tags, roles in relations, usernames, etc.) as well as
37 metadata containing the precision of coordinates or timestamps in that
38 block.
39
40 A primitiveblock contains a sequence of primitive groups, each
41 containing primitives of the same type (nodes, densenodes, ways,
42 relations). Coordinates are stored in signed 64-bit integers. Lat&lon
43 are measured in units <granularity> nanodegrees. The default of
44 granularity of 100 nanodegrees corresponds to about 1cm on the ground,
45 and a full lat or lon fits into 32 bits.
46
47 Converting an integer to a latitude or longitude uses the formula:
48 $OUT = IN * granularity / 10**9$. Many encoding schemes use delta
49 coding when representing nodes and relations.
50
51 */
52
53 //////////////////////////////////////////////////////////////////////////
54 //////////////////////////////////////////////////////////////////////////
55
56 /* Contains the file header. */
57
58 message HeaderBlock {
59 optional HeaderBBox bbox = 1;
60 /* Additional tags to aid in parsing this dataset */
61 repeated string required_features = 4;
62 repeated string optional_features = 5;
63
64 optional string writingprogram = 16;
65 optional string source = 17; // From the bbox field.
66
67 /* Tags that allow continuing an Osmosis replication */
68
69 // replication timestamp, expressed in seconds since the epoch,
70 // otherwise the same value as in the "timestamp=..." field
71 // in the state.txt file used by Osmosis
72 optional int64 osmosis_replication_timestamp = 32;
73
74 // replication sequence number (sequenceNumber in state.txt)
75 optional int64 osmosis_replication_sequence_number = 33;
76
77 // replication base URL (from Osmosis' configuration.txt file)
78 optional string osmosis_replication_base_url = 34;
79 }
80
81
82 /** The bounding box field in the OSM header. BBOX, as used in the OSM
83 header. Units are always in nanodegrees -- they do not obey
84 granularity rules. */
85
86 message HeaderBBox {
87 required sint64 left = 1;
88 required sint64 right = 2;
89 required sint64 top = 3;
90 required sint64 bottom = 4;
91 }
92
93
94 ///////////////////////////////////////////////////////////////////////
95 ///////////////////////////////////////////////////////////////////////
96
97
98 message PrimitiveBlock {
99 required StringTable stringtable = 1;
100 repeated PrimitiveGroup primitivegroup = 2;
101
102 // Granularity, units of nanodegrees, used to store coordinates in this block
103 optional int32 granularity = 17 [default=100];
104 // Offset value between the output coordinates coordinates and the granularity grid in unites of nanodegrees.
105 optional int64 lat_offset = 19 [default=0];
106 optional int64 lon_offset = 20 [default=0];
107
108 // Granularity of dates, normally represented in units of milliseconds since the 1970 epoch.
109 optional int32 date_granularity = 18 [default=1000];
110
111
112 // Proposed extension:
113 //optional BBox bbox = XX;
114 }
115
116 // Group of OSMPrimitives. All primitives in a group must be the same type.
117 message PrimitiveGroup {
118 repeated Node nodes = 1;
119 optional DenseNodes dense = 2;
120 repeated Way ways = 3;
121 repeated Relation relations = 4;
122 repeated ChangeSet changesets = 5;
123 }
124
125
126 /** String table, contains the common strings in each block.
127
128 Note that we reserve index '0' as a delimiter, so the entry at that
129 index in the table is ALWAYS blank and unused.
130
131 */
132 message StringTable {
133 repeated bytes s = 1;
134 }
135
136 /* Optional metadata that may be included into each primitive. */
137 message Info {
138 optional int32 version = 1 [default = -1];
139 optional int64 timestamp = 2;
140 optional int64 changeset = 3;
141 optional int32 uid = 4;
142 optional uint32 user_sid = 5; // String IDs
143
144 // The visible flag is used to store history information. It indicates that
145 // the current object version has been created by a delete operation on the
146 // OSM API.
147 // When a writer sets this flag, it MUST add a required_features tag with
148 // value "HistoricalInformation" to the HeaderBlock.
149 // If this flag is not available for some object it MUST be assumed to be
150 // true if the file has the required_features tag "HistoricalInformation"
151 // set.
152 optional bool visible = 6;
153 }
154
155 /** Optional metadata that may be included into each primitive. Special dense format used in DenseNodes. */
156 message DenseInfo {
157 repeated int32 version = 1 [packed = true];
158 repeated sint64 timestamp = 2 [packed = true]; // DELTA coded
159 repeated sint64 changeset = 3 [packed = true]; // DELTA coded
160 repeated sint32 uid = 4 [packed = true]; // DELTA coded
161 repeated sint32 user_sid = 5 [packed = true]; // String IDs for usernames. DELTA coded
162
163 // The visible flag is used to store history information. It indicates that
164 // the current object version has been created by a delete operation on the
165 // OSM API.
166 // When a writer sets this flag, it MUST add a required_features tag with
167 // value "HistoricalInformation" to the HeaderBlock.
168 // If this flag is not available for some object it MUST be assumed to be
169 // true if the file has the required_features tag "HistoricalInformation"
170 // set.
171 repeated bool visible = 6 [packed = true];
172 }
173
174
175 // THIS IS STUB DESIGN FOR CHANGESETS. NOT USED RIGHT NOW.
176 // TODO: REMOVE THIS?
177 message ChangeSet {
178 required int64 id = 1;
179 //
180 // // Parallel arrays.
181 // repeated uint32 keys = 2 [packed = true]; // String IDs.
182 // repeated uint32 vals = 3 [packed = true]; // String IDs.
183 //
184 // optional Info info = 4;
185
186 // optional int64 created_at = 8;
187 // optional int64 closetime_delta = 9;
188 // optional bool open = 10;
189 // optional HeaderBBox bbox = 11;
190 }
191
192
193 message Node {
194 required sint64 id = 1;
195 // Parallel arrays.
196 repeated uint32 keys = 2 [packed = true]; // String IDs.
197 repeated uint32 vals = 3 [packed = true]; // String IDs.
198
199 optional Info info = 4; // May be omitted in omitmeta
200
201 required sint64 lat = 8;
202 required sint64 lon = 9;
203 }
204
205 /* Used to densly represent a sequence of nodes that do not have any tags.
206
207 We represent these nodes columnwise as five columns: ID's, lats, and
208 lons, all delta coded. When metadata is not omitted,
209
210 We encode keys & vals for all nodes as a single array of integers
211 containing key-stringid and val-stringid, using a stringid of 0 as a
212 delimiter between nodes.
213
214 ( (<keyid> <valid>)* '0' )*
215 */
216
217 message DenseNodes {
218 repeated sint64 id = 1 [packed = true]; // DELTA coded
219
220 //repeated Info info = 4;
221 optional DenseInfo denseinfo = 5;
222
223 repeated sint64 lat = 8 [packed = true]; // DELTA coded
224 repeated sint64 lon = 9 [packed = true]; // DELTA coded
225
226 // Special packing of keys and vals into one array. May be empty if all nodes in this block are tagless.
227 repeated int32 keys_vals = 10 [packed = true];
228 }
229
230
231 message Way {
232 required int64 id = 1;
233 // Parallel arrays.
234 repeated uint32 keys = 2 [packed = true];
235 repeated uint32 vals = 3 [packed = true];
236
237 optional Info info = 4;
238
239 repeated sint64 refs = 8 [packed = true]; // DELTA coded
240
241 repeated sint64 lat = 9 [packed = true];
242 repeated sint64 lon = 10 [packed = true];
243 }
244
245 message Relation {
246 enum MemberType {
247 NODE = 0;
248 WAY = 1;
249 RELATION = 2;
250 }
251 required int64 id = 1;
252
253 // Parallel arrays.
254 repeated uint32 keys = 2 [packed = true];
255 repeated uint32 vals = 3 [packed = true];
256
257 optional Info info = 4;
258
259 // Parallel arrays
260 repeated int32 roles_sid = 8 [packed = true];
261 repeated sint64 memids = 9 [packed = true]; // DELTA encoded
262 repeated MemberType types = 10 [packed = true];
263 }
264
00 dependencies {
11 compile project(':osmosis-core')
2 compile project(':osmosis-osm-binary')
32 compile group: 'com.google.protobuf', name: 'protobuf-java', version: dependencyVersionProtobuf
3 compile group: 'org.openstreetmap.pbf', name: 'osmpbf', version: dependencyVersionOsmPbf
44 testCompile project(':osmosis-testutil')
55 testCompile project(':osmosis-xml')
66 }
44 import java.util.Date;
55 import java.util.List;
66
7 import crosby.binary.BinaryParser;
8 import crosby.binary.Osmformat;
79 import org.openstreetmap.osmosis.core.OsmosisConstants;
810 import org.openstreetmap.osmosis.core.OsmosisRuntimeException;
911 import org.openstreetmap.osmosis.core.container.v0_6.BoundContainer;
2224 import org.openstreetmap.osmosis.core.domain.v0_6.WayNode;
2325 import org.openstreetmap.osmosis.core.task.v0_6.Sink;
2426
25 import org.openstreetmap.osmosis.osmbinary.BinaryParser;
26 import org.openstreetmap.osmosis.osmbinary.Osmformat;
27 import org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo;
28
2927 /** Class that reads and parses binary files and sends the contained entities to the sink. */
3028 public class OsmosisBinaryParser extends BinaryParser {
3129
9088 // Stuff for dense info
9189 long lasttimestamp = 0, lastchangeset = 0;
9290 int lastuserSid = 0, lastuid = 0;
93 DenseInfo di = null;
91 Osmformat.DenseInfo di = null;
9492 if (nodes.hasDenseinfo()) {
9593 di = nodes.getDenseinfo();
9694 }
44 import java.io.InputStream;
55 import java.util.Collections;
66
7 import crosby.binary.file.BlockInputStream;
78 import org.openstreetmap.osmosis.core.OsmosisRuntimeException;
89 import org.openstreetmap.osmosis.core.task.v0_6.RunnableSource;
910 import org.openstreetmap.osmosis.core.task.v0_6.Sink;
1011
11 import org.openstreetmap.osmosis.osmbinary.file.BlockInputStream;
12
13 /** Glue code that implements a task that connects an InputStream a containing binary-format data to a Sink.
12 /** Glue code that implements a task that connects an InputStream a containing binary-format data to a Sink.
1413 * @author crosby
1514 *
1615 */
88 import java.util.logging.Level;
99 import java.util.logging.Logger;
1010
11 import crosby.binary.BinarySerializer;
12 import crosby.binary.Osmformat;
13 import crosby.binary.StringTable;
14 import crosby.binary.file.BlockOutputStream;
15 import crosby.binary.file.FileBlock;
1116 import org.openstreetmap.osmosis.core.OsmosisConstants;
1217 import org.openstreetmap.osmosis.core.OsmosisRuntimeException;
1318 import org.openstreetmap.osmosis.core.container.v0_6.BoundContainer;
2833 import org.openstreetmap.osmosis.core.domain.v0_6.WayNode;
2934 import org.openstreetmap.osmosis.core.task.v0_6.Sink;
3035
31 import org.openstreetmap.osmosis.osmbinary.BinarySerializer;
32 import org.openstreetmap.osmosis.osmbinary.Osmformat;
33 import org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo;
34 import org.openstreetmap.osmosis.osmbinary.StringTable;
35 import org.openstreetmap.osmosis.osmbinary.Osmformat.Relation.MemberType;
36 import org.openstreetmap.osmosis.osmbinary.file.BlockOutputStream;
37 import org.openstreetmap.osmosis.osmbinary.file.FileBlock;
38
3936 /**
4037 * Receives data from the Osmosis pipeline and stores it in the PBF format.
4138 */
9996 }
10097 }
10198 private static final int MAXWARN = 100;
102 public void serializeMetadataDense(DenseInfo.Builder b, List<? extends Entity> entities) {
99 public void serializeMetadataDense(Osmformat.DenseInfo.Builder b, List<? extends Entity> entities) {
103100 if (omit_metadata) {
104101 return;
105102 }
212209
213210 /**
214211 * Serialize all nodes in the non-dense format.
215 *
216 * @param parentbuilder Add to this PrimitiveBlock.
217212 */
218213 public Osmformat.PrimitiveGroup serializeNonDense() {
219214 if (contents.size() == 0) {
311306 bi.addMemids(id - lastid);
312307 lastid = id;
313308 if (j.getMemberType() == EntityType.Node) {
314 bi.addTypes(MemberType.NODE);
309 bi.addTypes(Osmformat.Relation.MemberType.NODE);
315310 } else if (j.getMemberType() == EntityType.Way) {
316 bi.addTypes(MemberType.WAY);
311 bi.addTypes(Osmformat.Relation.MemberType.WAY);
317312 } else if (j.getMemberType() == EntityType.Relation) {
318 bi.addTypes(MemberType.RELATION);
313 bi.addTypes(Osmformat.Relation.MemberType.RELATION);
319314 } else {
320315 assert (false); // Software bug: Unknown entity.
321316 }
44 import java.io.FileNotFoundException;
55 import java.io.FileOutputStream;
66
7 import crosby.binary.file.BlockOutputStream;
78 import org.openstreetmap.osmosis.core.OsmosisRuntimeException;
89 import org.openstreetmap.osmosis.core.pipeline.common.TaskConfiguration;
910 import org.openstreetmap.osmosis.core.pipeline.common.TaskManager;
1011 import org.openstreetmap.osmosis.core.pipeline.common.TaskManagerFactory;
1112 import org.openstreetmap.osmosis.core.pipeline.v0_6.SinkManager;
12
13 import org.openstreetmap.osmosis.osmbinary.file.BlockOutputStream;
1413
1514 /**
1615 * The task manager factory for a binary (PBF) writer.
00 dependencies {
11 compile project(':osmosis-core')
2 compile project(':osmosis-osm-binary')
32 compile group: 'com.google.guava', name: 'guava', version: dependencyVersionGuava
43 compile group: 'com.google.protobuf', name: 'protobuf-java', version: dependencyVersionProtobuf
54 compile group: 'commons-io', name: 'commons-io', version: dependencyVersionCommonsIo
5 compile group: 'org.openstreetmap.pbf', name: 'osmpbf', version: dependencyVersionOsmPbf
66 testCompile project(':osmosis-pbf')
77 testCompile project(':osmosis-testutil')
88 testCompile project(':osmosis-xml')
1111 import java.util.function.Supplier;
1212
1313 import com.google.common.util.concurrent.MoreExecutors;
14 import crosby.binary.Osmformat;
1415 import org.openstreetmap.osmosis.core.OsmosisRuntimeException;
1516 import org.openstreetmap.osmosis.core.container.v0_6.BoundContainer;
1617 import org.openstreetmap.osmosis.core.task.v0_6.RunnableSource;
1718 import org.openstreetmap.osmosis.core.task.v0_6.Sink;
18 import org.openstreetmap.osmosis.osmbinary.Osmformat;
1919 import org.openstreetmap.osmosis.pbf2.v0_6.impl.HeaderBoundReader;
2020 import org.openstreetmap.osmosis.pbf2.v0_6.impl.HeaderMetadataReader;
2121 import org.openstreetmap.osmosis.pbf2.v0_6.impl.HeaderSeeker;
00 // This software is released into the Public Domain. See copying.txt for details.
11 package org.openstreetmap.osmosis.pbf2.v0_6.impl;
22
3 import crosby.binary.Fileformat;
34 import org.openstreetmap.osmosis.core.OsmosisRuntimeException;
4 import org.openstreetmap.osmosis.osmbinary.Fileformat;
55
66 import java.util.function.Function;
77 import java.util.zip.DataFormatException;
88 import java.util.zip.Inflater;
99
1010 /**
11 * Obtains the raw uncompressed data from a {@link org.openstreetmap.osmosis.osmbinary.Fileformat.Blob}.
11 * Obtains the raw uncompressed data from a {@link Fileformat.Blob}.
1212 */
1313 public class BlobDecompressor implements Function<Fileformat.Blob, byte[]> {
1414 @Override
11 package org.openstreetmap.osmosis.pbf2.v0_6.impl;
22
33 import com.google.protobuf.InvalidProtocolBufferException;
4 import crosby.binary.Fileformat;
5 import crosby.binary.Osmformat;
46 import org.openstreetmap.osmosis.core.OsmosisRuntimeException;
5 import org.openstreetmap.osmosis.osmbinary.Fileformat;
6 import org.openstreetmap.osmosis.osmbinary.Osmformat;
77
88 import java.util.function.Function;
99
00 // This software is released into the Public Domain. See copying.txt for details.
11 package org.openstreetmap.osmosis.pbf2.v0_6.impl;
22
3 import crosby.binary.Osmformat;
34 import org.openstreetmap.osmosis.core.container.v0_6.BoundContainer;
45 import org.openstreetmap.osmosis.core.domain.v0_6.Bound;
5 import org.openstreetmap.osmosis.osmbinary.Osmformat;
66
77 import java.util.function.Function;
88
99 /**
10 * Obtains {@link Bound} data from a PBF {@link org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBlock}.
10 * Obtains {@link Bound} data from a PBF {@link Osmformat.HeaderBlock}.
1111 */
1212 public class HeaderBoundReader implements Function<Osmformat.HeaderBlock, BoundContainer> {
1313 private static final double COORDINATE_SCALING_FACTOR = 0.000000001;
00 // This software is released into the Public Domain. See copying.txt for details.
11 package org.openstreetmap.osmosis.pbf2.v0_6.impl;
22
3 import crosby.binary.Osmformat;
34 import org.openstreetmap.osmosis.core.OsmosisRuntimeException;
45 import org.openstreetmap.osmosis.core.domain.v0_6.WayNode;
5 import org.openstreetmap.osmosis.osmbinary.Osmformat;
66
77 import java.util.ArrayList;
88 import java.util.Arrays;
1414
1515 /**
1616 * Obtains metadata suitable for passing to {@link org.openstreetmap.osmosis.core.task.v0_6.Sink#initialize(Map)} from
17 * a PBF {@link org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBlock}.
17 * a PBF {@link Osmformat.HeaderBlock}.
1818 */
1919 public class HeaderMetadataReader implements Function<Osmformat.HeaderBlock, Map<String, Object>> {
2020 private static final List<String> SUPPORTED_FEATURES =
00 // This software is released into the Public Domain. See copying.txt for details.
11 package org.openstreetmap.osmosis.pbf2.v0_6.impl;
22
3 import crosby.binary.Osmformat;
34 import org.openstreetmap.osmosis.core.OsmosisRuntimeException;
4 import org.openstreetmap.osmosis.osmbinary.Osmformat;
55
66 import java.util.Optional;
77 import java.util.function.Function;
00 // This software is released into the Public Domain. See copying.txt for details.
11 package org.openstreetmap.osmosis.pbf2.v0_6.impl;
22
3 import crosby.binary.Osmformat;
34 import org.openstreetmap.osmosis.core.OsmosisRuntimeException;
45 import org.openstreetmap.osmosis.core.container.v0_6.EntityContainer;
56 import org.openstreetmap.osmosis.core.container.v0_6.NodeContainer;
1112 import org.openstreetmap.osmosis.core.domain.v0_6.RelationMember;
1213 import org.openstreetmap.osmosis.core.domain.v0_6.Tag;
1314 import org.openstreetmap.osmosis.core.domain.v0_6.WayNode;
14 import org.openstreetmap.osmosis.osmbinary.Osmformat;
15 import org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo;
16 import org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes;
17 import org.openstreetmap.osmosis.osmbinary.Osmformat.Info;
18 import org.openstreetmap.osmosis.osmbinary.Osmformat.Node;
19 import org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup;
20 import org.openstreetmap.osmosis.osmbinary.Osmformat.Relation;
21 import org.openstreetmap.osmosis.osmbinary.Osmformat.Relation.MemberType;
22 import org.openstreetmap.osmosis.osmbinary.Osmformat.Way;
2315
2416 import java.util.ArrayList;
2517 import java.util.Collection;
8779 }
8880
8981
90 private CommonEntityData buildCommonEntityData(long entityId, List<Integer> keys, List<Integer> values, Info info,
91 PbfFieldDecoder fieldDecoder) {
82 private CommonEntityData buildCommonEntityData(long entityId, List<Integer> keys, List<Integer> values,
83 Osmformat.Info info, PbfFieldDecoder fieldDecoder) {
9284 OsmUser user;
9385 CommonEntityData entityData;
9486
120112 }
121113
122114
123 private void processNodes(List<Node> nodes, PbfFieldDecoder fieldDecoder) {
124 for (Node node : nodes) {
115 private void processNodes(List<Osmformat.Node> nodes, PbfFieldDecoder fieldDecoder) {
116 for (Osmformat.Node node : nodes) {
125117 org.openstreetmap.osmosis.core.domain.v0_6.Node osmNode;
126118 CommonEntityData entityData;
127119
142134 }
143135
144136
145 private void processNodes(DenseNodes nodes, PbfFieldDecoder fieldDecoder) {
137 private void processNodes(Osmformat.DenseNodes nodes, PbfFieldDecoder fieldDecoder) {
146138 List<Long> idList = nodes.getIdList();
147139 List<Long> latList = nodes.getLatList();
148140 List<Long> lonList = nodes.getLonList();
155147
156148 Iterator<Integer> keysValuesIterator = nodes.getKeysValsList().iterator();
157149
158 DenseInfo denseInfo;
150 Osmformat.DenseInfo denseInfo;
159151 if (nodes.hasDenseinfo()) {
160152 denseInfo = nodes.getDenseinfo();
161153 } else {
228220 }
229221
230222
231 private void processWays(List<Way> ways, PbfFieldDecoder fieldDecoder) {
232 for (Way way : ways) {
223 private void processWays(List<Osmformat.Way> ways, PbfFieldDecoder fieldDecoder) {
224 for (Osmformat.Way way : ways) {
233225 org.openstreetmap.osmosis.core.domain.v0_6.Way osmWay;
234226 CommonEntityData entityData;
235227
272264 }
273265
274266 private void buildRelationMembers(org.openstreetmap.osmosis.core.domain.v0_6.Relation relation,
275 List<Long> memberIds, List<Integer> memberRoles, List<MemberType> memberTypes,
267 List<Long> memberIds, List<Integer> memberRoles, List<Osmformat.Relation.MemberType> memberTypes,
276268 PbfFieldDecoder fieldDecoder) {
277269
278270 List<RelationMember> members = relation.getMembers();
285277
286278 Iterator<Long> memberIdIterator = memberIds.iterator();
287279 Iterator<Integer> memberRoleIterator = memberRoles.iterator();
288 Iterator<MemberType> memberTypeIterator = memberTypes.iterator();
280 Iterator<Osmformat.Relation.MemberType> memberTypeIterator = memberTypes.iterator();
289281
290282 // Build up the list of relation members for the way. The member ids are
291283 // delta encoded meaning that each id is stored as a delta against
292284 // the previous one.
293285 long memberId = 0;
294286 while (memberIdIterator.hasNext()) {
295 MemberType memberType = memberTypeIterator.next();
287 Osmformat.Relation.MemberType memberType = memberTypeIterator.next();
296288 memberId += memberIdIterator.next();
297289 EntityType entityType;
298290 RelationMember member;
299291
300 if (memberType == MemberType.NODE) {
292 if (memberType == Osmformat.Relation.MemberType.NODE) {
301293 entityType = EntityType.Node;
302 } else if (memberType == MemberType.WAY) {
294 } else if (memberType == Osmformat.Relation.MemberType.WAY) {
303295 entityType = EntityType.Way;
304 } else if (memberType == MemberType.RELATION) {
296 } else if (memberType == Osmformat.Relation.MemberType.RELATION) {
305297 entityType = EntityType.Relation;
306298 } else {
307299 throw new OsmosisRuntimeException("Member type of " + memberType + " is not supported.");
314306 }
315307
316308
317 private void processRelations(List<Relation> relations, PbfFieldDecoder fieldDecoder) {
318 for (Relation relation : relations) {
309 private void processRelations(List<Osmformat.Relation> relations, PbfFieldDecoder fieldDecoder) {
310 for (Osmformat.Relation relation : relations) {
319311 org.openstreetmap.osmosis.core.domain.v0_6.Relation osmRelation;
320312 CommonEntityData entityData;
321313
342334 private void processOsmPrimitives(Osmformat.PrimitiveBlock block) {
343335 PbfFieldDecoder fieldDecoder = new PbfFieldDecoder(block);
344336
345 for (PrimitiveGroup primitiveGroup : block.getPrimitivegroupList()) {
337 for (Osmformat.PrimitiveGroup primitiveGroup : block.getPrimitivegroupList()) {
346338 log.finer("Processing OSM primitive group.");
347339 processNodes(primitiveGroup.getDense(), fieldDecoder);
348340 processNodes(primitiveGroup.getNodesList(), fieldDecoder);
00 // This software is released into the Public Domain. See copying.txt for details.
11 package org.openstreetmap.osmosis.pbf2.v0_6.impl;
22
3 import org.openstreetmap.osmosis.osmbinary.Osmformat;
3 import crosby.binary.Osmformat;
44
55 import java.util.Optional;
66
77 /**
8 * Contains the results of parsing a {@link org.openstreetmap.osmosis.osmbinary.Fileformat.Blob}.
8 * Contains the results of parsing a {@link crosby.binary.Fileformat.Blob}.
99 */
1010 public class PbfBlock {
1111 private Optional<Osmformat.HeaderBlock> headerBlock;
00 // This software is released into the Public Domain. See copying.txt for details.
11 package org.openstreetmap.osmosis.pbf2.v0_6.impl;
22
3 import crosby.binary.Osmformat;
4
35 import java.util.Date;
4
5 import org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveBlock;
6 import org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable;
7
8
96
107 /**
118 * Manages decoding of the lower level PBF data structures.
2926 * @param primitiveBlock
3027 * The primitive block containing the fields to be decoded.
3128 */
32 public PbfFieldDecoder(PrimitiveBlock primitiveBlock) {
29 public PbfFieldDecoder(Osmformat.PrimitiveBlock primitiveBlock) {
3330 this.coordGranularity = primitiveBlock.getGranularity();
3431 this.coordLatitudeOffset = primitiveBlock.getLatOffset();
3532 this.coordLongitudeOffset = primitiveBlock.getLonOffset();
3633 this.dateGranularity = primitiveBlock.getDateGranularity();
3734
38 StringTable stringTable = primitiveBlock.getStringtable();
35 Osmformat.StringTable stringTable = primitiveBlock.getStringtable();
3936 strings = new String[stringTable.getSCount()];
4037 for (int i = 0; i < strings.length; i++) {
4138 strings[i] = stringTable.getS(i).toStringUtf8();
22
33 /**
44 * Represents a single piece of raw blob data extracted from the PBF stream. It has not yet been decoded into a
5 * {@link org.openstreetmap.osmosis.osmbinary.Fileformat.Blob} object. We delay this additional parsing until later when
5 * {@link crosby.binary.Fileformat.Blob} object. We delay this additional parsing until later when
66 * we can spread the work across multiple threads.
77 *
88 * @author Brett Henderson
77 import java.util.logging.Level;
88 import java.util.logging.Logger;
99
10 import crosby.binary.Fileformat;
1011 import org.openstreetmap.osmosis.core.OsmosisRuntimeException;
1112 import org.openstreetmap.osmosis.core.lifecycle.Closeable;
12 import org.openstreetmap.osmosis.osmbinary.Fileformat;
13 import org.openstreetmap.osmosis.osmbinary.Fileformat.BlobHeader;
14
1513
1614 /**
1715 * Parses a PBF data stream and extracts the raw data of each blob in sequence
4240 }
4341
4442
45 private BlobHeader readHeader(int headerLength) throws IOException {
43 private Fileformat.BlobHeader readHeader(int headerLength) throws IOException {
4644 byte[] headerBuffer = new byte[headerLength];
4745 dis.readFully(headerBuffer);
4846
49 BlobHeader blobHeader = Fileformat.BlobHeader.parseFrom(headerBuffer);
50
51 return blobHeader;
47 return Fileformat.BlobHeader.parseFrom(headerBuffer);
5248 }
5349
5450
55 private byte[] readRawBlob(BlobHeader blobHeader) throws IOException {
51 private byte[] readRawBlob(Fileformat.BlobHeader blobHeader) throws IOException {
5652 byte[] rawBlob = new byte[blobHeader.getDatasize()];
5753
5854 dis.readFully(rawBlob);
7773 if (log.isLoggable(Level.FINER)) {
7874 log.finer("Reading header for blob " + dataBlockCount++);
7975 }
80 BlobHeader blobHeader = readHeader(headerLength);
76 Fileformat.BlobHeader blobHeader = readHeader(headerLength);
8177
8278 if (log.isLoggable(Level.FINER)) {
8379 log.finer("Processing blob of type " + blobHeader.getType() + ".");
0 Pending changes
1 Use GitHub actions instead of Travis CI for continuous integration.
2 Improve Gradle performance by enabling parallel execution, build cache and on-demand configuration.
3 Replace osmosis-osm-binary package with dependency on org.openstreetmap.pbf:osmpbf from Maven Central. Note that the org.openstreetmap.pbf:osmpbf dependency will break compatibility with Android 7 and earlier.
4
05 0.48.3
16 Fix broken SQL code in pgsnapshot_schema_0.6_changes.sql (#73)
27
44 include 'osmosis-dataset'
55 include 'osmosis-extract'
66 include 'osmosis-hstore-jdbc'
7 include 'osmosis-osm-binary'
87 include 'osmosis-pbf'
98 include 'osmosis-pbf2'
109 include 'osmosis-pgsimple'