PageRenderTime 50ms CodeModel.GetById 13ms RepoModel.GetById 0ms app.codeStats 0ms

/DataExtractionOSM/src/crosby/binary/Osmformat.java

https://code.google.com/
Java | 1867 lines | 1672 code | 144 blank | 51 comment | 191 complexity | 54d56381d9c38b968647c996f570ad78 MD5 | raw file
Possible License(s): MIT
  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. // source: src/osmformat.proto
  3. package crosby.binary;
  4. public final class Osmformat {
  5. private Osmformat() {}
  6. public static void registerAllExtensions(
  7. com.google.protobuf.ExtensionRegistry registry) {
  8. }
  9. public static final class HeaderBlock extends
  10. com.google.protobuf.GeneratedMessage {
  11. // Use HeaderBlock.newBuilder() to construct.
  12. private HeaderBlock() {
  13. initFields();
  14. }
  15. private HeaderBlock(boolean noInit) {}
  16. private static final HeaderBlock defaultInstance;
  17. public static HeaderBlock getDefaultInstance() {
  18. return defaultInstance;
  19. }
  20. @Override
  21. public HeaderBlock getDefaultInstanceForType() {
  22. return defaultInstance;
  23. }
  24. public static final com.google.protobuf.Descriptors.Descriptor
  25. getDescriptor() {
  26. return crosby.binary.Osmformat.internal_static_HeaderBlock_descriptor;
  27. }
  28. @Override
  29. protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
  30. internalGetFieldAccessorTable() {
  31. return crosby.binary.Osmformat.internal_static_HeaderBlock_fieldAccessorTable;
  32. }
  33. // optional .HeaderBBox bbox = 1;
  34. public static final int BBOX_FIELD_NUMBER = 1;
  35. private boolean hasBbox;
  36. private crosby.binary.Osmformat.HeaderBBox bbox_;
  37. public boolean hasBbox() { return hasBbox; }
  38. public crosby.binary.Osmformat.HeaderBBox getBbox() { return bbox_; }
  39. // repeated string required_features = 4;
  40. public static final int REQUIRED_FEATURES_FIELD_NUMBER = 4;
  41. private java.util.List<java.lang.String> requiredFeatures_ =
  42. java.util.Collections.emptyList();
  43. public java.util.List<java.lang.String> getRequiredFeaturesList() {
  44. return requiredFeatures_;
  45. }
  46. public int getRequiredFeaturesCount() { return requiredFeatures_.size(); }
  47. public java.lang.String getRequiredFeatures(int index) {
  48. return requiredFeatures_.get(index);
  49. }
  50. // repeated string optional_features = 5;
  51. public static final int OPTIONAL_FEATURES_FIELD_NUMBER = 5;
  52. private java.util.List<java.lang.String> optionalFeatures_ =
  53. java.util.Collections.emptyList();
  54. public java.util.List<java.lang.String> getOptionalFeaturesList() {
  55. return optionalFeatures_;
  56. }
  57. public int getOptionalFeaturesCount() { return optionalFeatures_.size(); }
  58. public java.lang.String getOptionalFeatures(int index) {
  59. return optionalFeatures_.get(index);
  60. }
  61. // optional string writingprogram = 16;
  62. public static final int WRITINGPROGRAM_FIELD_NUMBER = 16;
  63. private boolean hasWritingprogram;
  64. private java.lang.String writingprogram_ = "";
  65. public boolean hasWritingprogram() { return hasWritingprogram; }
  66. public java.lang.String getWritingprogram() { return writingprogram_; }
  67. // optional string source = 17;
  68. public static final int SOURCE_FIELD_NUMBER = 17;
  69. private boolean hasSource;
  70. private java.lang.String source_ = "";
  71. public boolean hasSource() { return hasSource; }
  72. public java.lang.String getSource() { return source_; }
  73. private void initFields() {
  74. bbox_ = crosby.binary.Osmformat.HeaderBBox.getDefaultInstance();
  75. }
  76. @Override
  77. public final boolean isInitialized() {
  78. if (hasBbox()) {
  79. if (!getBbox().isInitialized()) return false;
  80. }
  81. return true;
  82. }
  83. @Override
  84. public void writeTo(com.google.protobuf.CodedOutputStream output)
  85. throws java.io.IOException {
  86. getSerializedSize();
  87. if (hasBbox()) {
  88. output.writeMessage(1, getBbox());
  89. }
  90. for (java.lang.String element : getRequiredFeaturesList()) {
  91. output.writeString(4, element);
  92. }
  93. for (java.lang.String element : getOptionalFeaturesList()) {
  94. output.writeString(5, element);
  95. }
  96. if (hasWritingprogram()) {
  97. output.writeString(16, getWritingprogram());
  98. }
  99. if (hasSource()) {
  100. output.writeString(17, getSource());
  101. }
  102. getUnknownFields().writeTo(output);
  103. }
  104. private int memoizedSerializedSize = -1;
  105. @Override
  106. public int getSerializedSize() {
  107. int size = memoizedSerializedSize;
  108. if (size != -1) return size;
  109. size = 0;
  110. if (hasBbox()) {
  111. size += com.google.protobuf.CodedOutputStream
  112. .computeMessageSize(1, getBbox());
  113. }
  114. {
  115. int dataSize = 0;
  116. for (java.lang.String element : getRequiredFeaturesList()) {
  117. dataSize += com.google.protobuf.CodedOutputStream
  118. .computeStringSizeNoTag(element);
  119. }
  120. size += dataSize;
  121. size += 1 * getRequiredFeaturesList().size();
  122. }
  123. {
  124. int dataSize = 0;
  125. for (java.lang.String element : getOptionalFeaturesList()) {
  126. dataSize += com.google.protobuf.CodedOutputStream
  127. .computeStringSizeNoTag(element);
  128. }
  129. size += dataSize;
  130. size += 1 * getOptionalFeaturesList().size();
  131. }
  132. if (hasWritingprogram()) {
  133. size += com.google.protobuf.CodedOutputStream
  134. .computeStringSize(16, getWritingprogram());
  135. }
  136. if (hasSource()) {
  137. size += com.google.protobuf.CodedOutputStream
  138. .computeStringSize(17, getSource());
  139. }
  140. size += getUnknownFields().getSerializedSize();
  141. memoizedSerializedSize = size;
  142. return size;
  143. }
  144. public static crosby.binary.Osmformat.HeaderBlock parseFrom(
  145. com.google.protobuf.ByteString data)
  146. throws com.google.protobuf.InvalidProtocolBufferException {
  147. return newBuilder().mergeFrom(data).buildParsed();
  148. }
  149. public static crosby.binary.Osmformat.HeaderBlock parseFrom(
  150. com.google.protobuf.ByteString data,
  151. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  152. throws com.google.protobuf.InvalidProtocolBufferException {
  153. return newBuilder().mergeFrom(data, extensionRegistry)
  154. .buildParsed();
  155. }
  156. public static crosby.binary.Osmformat.HeaderBlock parseFrom(byte[] data)
  157. throws com.google.protobuf.InvalidProtocolBufferException {
  158. return newBuilder().mergeFrom(data).buildParsed();
  159. }
  160. public static crosby.binary.Osmformat.HeaderBlock parseFrom(
  161. byte[] data,
  162. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  163. throws com.google.protobuf.InvalidProtocolBufferException {
  164. return newBuilder().mergeFrom(data, extensionRegistry)
  165. .buildParsed();
  166. }
  167. public static crosby.binary.Osmformat.HeaderBlock parseFrom(java.io.InputStream input)
  168. throws java.io.IOException {
  169. return newBuilder().mergeFrom(input).buildParsed();
  170. }
  171. public static crosby.binary.Osmformat.HeaderBlock parseFrom(
  172. java.io.InputStream input,
  173. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  174. throws java.io.IOException {
  175. return newBuilder().mergeFrom(input, extensionRegistry)
  176. .buildParsed();
  177. }
  178. public static crosby.binary.Osmformat.HeaderBlock parseDelimitedFrom(java.io.InputStream input)
  179. throws java.io.IOException {
  180. Builder builder = newBuilder();
  181. if (builder.mergeDelimitedFrom(input)) {
  182. return builder.buildParsed();
  183. } else {
  184. return null;
  185. }
  186. }
  187. public static crosby.binary.Osmformat.HeaderBlock parseDelimitedFrom(
  188. java.io.InputStream input,
  189. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  190. throws java.io.IOException {
  191. Builder builder = newBuilder();
  192. if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
  193. return builder.buildParsed();
  194. } else {
  195. return null;
  196. }
  197. }
  198. public static crosby.binary.Osmformat.HeaderBlock parseFrom(
  199. com.google.protobuf.CodedInputStream input)
  200. throws java.io.IOException {
  201. return newBuilder().mergeFrom(input).buildParsed();
  202. }
  203. public static crosby.binary.Osmformat.HeaderBlock parseFrom(
  204. com.google.protobuf.CodedInputStream input,
  205. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  206. throws java.io.IOException {
  207. return newBuilder().mergeFrom(input, extensionRegistry)
  208. .buildParsed();
  209. }
  210. public static Builder newBuilder() { return Builder.create(); }
  211. @Override
  212. public Builder newBuilderForType() { return newBuilder(); }
  213. public static Builder newBuilder(crosby.binary.Osmformat.HeaderBlock prototype) {
  214. return newBuilder().mergeFrom(prototype);
  215. }
  216. @Override
  217. public Builder toBuilder() { return newBuilder(this); }
  218. public static final class Builder extends
  219. com.google.protobuf.GeneratedMessage.Builder<Builder> {
  220. private crosby.binary.Osmformat.HeaderBlock result;
  221. // Construct using crosby.binary.Osmformat.HeaderBlock.newBuilder()
  222. private Builder() {}
  223. private static Builder create() {
  224. Builder builder = new Builder();
  225. builder.result = new crosby.binary.Osmformat.HeaderBlock();
  226. return builder;
  227. }
  228. @Override
  229. protected crosby.binary.Osmformat.HeaderBlock internalGetResult() {
  230. return result;
  231. }
  232. @Override
  233. public Builder clear() {
  234. if (result == null) {
  235. throw new IllegalStateException(
  236. "Cannot call clear() after build().");
  237. }
  238. result = new crosby.binary.Osmformat.HeaderBlock();
  239. return this;
  240. }
  241. @Override
  242. public Builder clone() {
  243. return create().mergeFrom(result);
  244. }
  245. @Override
  246. public com.google.protobuf.Descriptors.Descriptor
  247. getDescriptorForType() {
  248. return crosby.binary.Osmformat.HeaderBlock.getDescriptor();
  249. }
  250. @Override
  251. public crosby.binary.Osmformat.HeaderBlock getDefaultInstanceForType() {
  252. return crosby.binary.Osmformat.HeaderBlock.getDefaultInstance();
  253. }
  254. @Override
  255. public boolean isInitialized() {
  256. return result.isInitialized();
  257. }
  258. @Override
  259. public crosby.binary.Osmformat.HeaderBlock build() {
  260. if (result != null && !isInitialized()) {
  261. throw newUninitializedMessageException(result);
  262. }
  263. return buildPartial();
  264. }
  265. private crosby.binary.Osmformat.HeaderBlock buildParsed()
  266. throws com.google.protobuf.InvalidProtocolBufferException {
  267. if (!isInitialized()) {
  268. throw newUninitializedMessageException(
  269. result).asInvalidProtocolBufferException();
  270. }
  271. return buildPartial();
  272. }
  273. @Override
  274. public crosby.binary.Osmformat.HeaderBlock buildPartial() {
  275. if (result == null) {
  276. throw new IllegalStateException(
  277. "build() has already been called on this Builder.");
  278. }
  279. if (result.requiredFeatures_ != java.util.Collections.EMPTY_LIST) {
  280. result.requiredFeatures_ =
  281. java.util.Collections.unmodifiableList(result.requiredFeatures_);
  282. }
  283. if (result.optionalFeatures_ != java.util.Collections.EMPTY_LIST) {
  284. result.optionalFeatures_ =
  285. java.util.Collections.unmodifiableList(result.optionalFeatures_);
  286. }
  287. crosby.binary.Osmformat.HeaderBlock returnMe = result;
  288. result = null;
  289. return returnMe;
  290. }
  291. @Override
  292. public Builder mergeFrom(com.google.protobuf.Message other) {
  293. if (other instanceof crosby.binary.Osmformat.HeaderBlock) {
  294. return mergeFrom((crosby.binary.Osmformat.HeaderBlock)other);
  295. } else {
  296. super.mergeFrom(other);
  297. return this;
  298. }
  299. }
  300. public Builder mergeFrom(crosby.binary.Osmformat.HeaderBlock other) {
  301. if (other == crosby.binary.Osmformat.HeaderBlock.getDefaultInstance()) return this;
  302. if (other.hasBbox()) {
  303. mergeBbox(other.getBbox());
  304. }
  305. if (!other.requiredFeatures_.isEmpty()) {
  306. if (result.requiredFeatures_.isEmpty()) {
  307. result.requiredFeatures_ = new java.util.ArrayList<java.lang.String>();
  308. }
  309. result.requiredFeatures_.addAll(other.requiredFeatures_);
  310. }
  311. if (!other.optionalFeatures_.isEmpty()) {
  312. if (result.optionalFeatures_.isEmpty()) {
  313. result.optionalFeatures_ = new java.util.ArrayList<java.lang.String>();
  314. }
  315. result.optionalFeatures_.addAll(other.optionalFeatures_);
  316. }
  317. if (other.hasWritingprogram()) {
  318. setWritingprogram(other.getWritingprogram());
  319. }
  320. if (other.hasSource()) {
  321. setSource(other.getSource());
  322. }
  323. this.mergeUnknownFields(other.getUnknownFields());
  324. return this;
  325. }
  326. @Override
  327. public Builder mergeFrom(
  328. com.google.protobuf.CodedInputStream input,
  329. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  330. throws java.io.IOException {
  331. com.google.protobuf.UnknownFieldSet.Builder unknownFields =
  332. com.google.protobuf.UnknownFieldSet.newBuilder(
  333. this.getUnknownFields());
  334. while (true) {
  335. int tag = input.readTag();
  336. switch (tag) {
  337. case 0:
  338. this.setUnknownFields(unknownFields.build());
  339. return this;
  340. default: {
  341. if (!parseUnknownField(input, unknownFields,
  342. extensionRegistry, tag)) {
  343. this.setUnknownFields(unknownFields.build());
  344. return this;
  345. }
  346. break;
  347. }
  348. case 10: {
  349. crosby.binary.Osmformat.HeaderBBox.Builder subBuilder = crosby.binary.Osmformat.HeaderBBox.newBuilder();
  350. if (hasBbox()) {
  351. subBuilder.mergeFrom(getBbox());
  352. }
  353. input.readMessage(subBuilder, extensionRegistry);
  354. setBbox(subBuilder.buildPartial());
  355. break;
  356. }
  357. case 34: {
  358. addRequiredFeatures(input.readString());
  359. break;
  360. }
  361. case 42: {
  362. addOptionalFeatures(input.readString());
  363. break;
  364. }
  365. case 130: {
  366. setWritingprogram(input.readString());
  367. break;
  368. }
  369. case 138: {
  370. setSource(input.readString());
  371. break;
  372. }
  373. }
  374. }
  375. }
  376. // optional .HeaderBBox bbox = 1;
  377. public boolean hasBbox() {
  378. return result.hasBbox();
  379. }
  380. public crosby.binary.Osmformat.HeaderBBox getBbox() {
  381. return result.getBbox();
  382. }
  383. public Builder setBbox(crosby.binary.Osmformat.HeaderBBox value) {
  384. if (value == null) {
  385. throw new NullPointerException();
  386. }
  387. result.hasBbox = true;
  388. result.bbox_ = value;
  389. return this;
  390. }
  391. public Builder setBbox(crosby.binary.Osmformat.HeaderBBox.Builder builderForValue) {
  392. result.hasBbox = true;
  393. result.bbox_ = builderForValue.build();
  394. return this;
  395. }
  396. public Builder mergeBbox(crosby.binary.Osmformat.HeaderBBox value) {
  397. if (result.hasBbox() &&
  398. result.bbox_ != crosby.binary.Osmformat.HeaderBBox.getDefaultInstance()) {
  399. result.bbox_ =
  400. crosby.binary.Osmformat.HeaderBBox.newBuilder(result.bbox_).mergeFrom(value).buildPartial();
  401. } else {
  402. result.bbox_ = value;
  403. }
  404. result.hasBbox = true;
  405. return this;
  406. }
  407. public Builder clearBbox() {
  408. result.hasBbox = false;
  409. result.bbox_ = crosby.binary.Osmformat.HeaderBBox.getDefaultInstance();
  410. return this;
  411. }
  412. // repeated string required_features = 4;
  413. public java.util.List<java.lang.String> getRequiredFeaturesList() {
  414. return java.util.Collections.unmodifiableList(result.requiredFeatures_);
  415. }
  416. public int getRequiredFeaturesCount() {
  417. return result.getRequiredFeaturesCount();
  418. }
  419. public java.lang.String getRequiredFeatures(int index) {
  420. return result.getRequiredFeatures(index);
  421. }
  422. public Builder setRequiredFeatures(int index, java.lang.String value) {
  423. if (value == null) {
  424. throw new NullPointerException();
  425. }
  426. result.requiredFeatures_.set(index, value);
  427. return this;
  428. }
  429. public Builder addRequiredFeatures(java.lang.String value) {
  430. if (value == null) {
  431. throw new NullPointerException();
  432. }
  433. if (result.requiredFeatures_.isEmpty()) {
  434. result.requiredFeatures_ = new java.util.ArrayList<java.lang.String>();
  435. }
  436. result.requiredFeatures_.add(value);
  437. return this;
  438. }
  439. public Builder addAllRequiredFeatures(
  440. java.lang.Iterable<? extends java.lang.String> values) {
  441. if (result.requiredFeatures_.isEmpty()) {
  442. result.requiredFeatures_ = new java.util.ArrayList<java.lang.String>();
  443. }
  444. super.addAll(values, result.requiredFeatures_);
  445. return this;
  446. }
  447. public Builder clearRequiredFeatures() {
  448. result.requiredFeatures_ = java.util.Collections.emptyList();
  449. return this;
  450. }
  451. // repeated string optional_features = 5;
  452. public java.util.List<java.lang.String> getOptionalFeaturesList() {
  453. return java.util.Collections.unmodifiableList(result.optionalFeatures_);
  454. }
  455. public int getOptionalFeaturesCount() {
  456. return result.getOptionalFeaturesCount();
  457. }
  458. public java.lang.String getOptionalFeatures(int index) {
  459. return result.getOptionalFeatures(index);
  460. }
  461. public Builder setOptionalFeatures(int index, java.lang.String value) {
  462. if (value == null) {
  463. throw new NullPointerException();
  464. }
  465. result.optionalFeatures_.set(index, value);
  466. return this;
  467. }
  468. public Builder addOptionalFeatures(java.lang.String value) {
  469. if (value == null) {
  470. throw new NullPointerException();
  471. }
  472. if (result.optionalFeatures_.isEmpty()) {
  473. result.optionalFeatures_ = new java.util.ArrayList<java.lang.String>();
  474. }
  475. result.optionalFeatures_.add(value);
  476. return this;
  477. }
  478. public Builder addAllOptionalFeatures(
  479. java.lang.Iterable<? extends java.lang.String> values) {
  480. if (result.optionalFeatures_.isEmpty()) {
  481. result.optionalFeatures_ = new java.util.ArrayList<java.lang.String>();
  482. }
  483. super.addAll(values, result.optionalFeatures_);
  484. return this;
  485. }
  486. public Builder clearOptionalFeatures() {
  487. result.optionalFeatures_ = java.util.Collections.emptyList();
  488. return this;
  489. }
  490. // optional string writingprogram = 16;
  491. public boolean hasWritingprogram() {
  492. return result.hasWritingprogram();
  493. }
  494. public java.lang.String getWritingprogram() {
  495. return result.getWritingprogram();
  496. }
  497. public Builder setWritingprogram(java.lang.String value) {
  498. if (value == null) {
  499. throw new NullPointerException();
  500. }
  501. result.hasWritingprogram = true;
  502. result.writingprogram_ = value;
  503. return this;
  504. }
  505. public Builder clearWritingprogram() {
  506. result.hasWritingprogram = false;
  507. result.writingprogram_ = getDefaultInstance().getWritingprogram();
  508. return this;
  509. }
  510. // optional string source = 17;
  511. public boolean hasSource() {
  512. return result.hasSource();
  513. }
  514. public java.lang.String getSource() {
  515. return result.getSource();
  516. }
  517. public Builder setSource(java.lang.String value) {
  518. if (value == null) {
  519. throw new NullPointerException();
  520. }
  521. result.hasSource = true;
  522. result.source_ = value;
  523. return this;
  524. }
  525. public Builder clearSource() {
  526. result.hasSource = false;
  527. result.source_ = getDefaultInstance().getSource();
  528. return this;
  529. }
  530. // @@protoc_insertion_point(builder_scope:HeaderBlock)
  531. }
  532. static {
  533. defaultInstance = new HeaderBlock(true);
  534. crosby.binary.Osmformat.internalForceInit();
  535. defaultInstance.initFields();
  536. }
  537. // @@protoc_insertion_point(class_scope:HeaderBlock)
  538. }
  539. public static final class HeaderBBox extends
  540. com.google.protobuf.GeneratedMessage {
  541. // Use HeaderBBox.newBuilder() to construct.
  542. private HeaderBBox() {
  543. initFields();
  544. }
  545. private HeaderBBox(boolean noInit) {}
  546. private static final HeaderBBox defaultInstance;
  547. public static HeaderBBox getDefaultInstance() {
  548. return defaultInstance;
  549. }
  550. @Override
  551. public HeaderBBox getDefaultInstanceForType() {
  552. return defaultInstance;
  553. }
  554. public static final com.google.protobuf.Descriptors.Descriptor
  555. getDescriptor() {
  556. return crosby.binary.Osmformat.internal_static_HeaderBBox_descriptor;
  557. }
  558. @Override
  559. protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
  560. internalGetFieldAccessorTable() {
  561. return crosby.binary.Osmformat.internal_static_HeaderBBox_fieldAccessorTable;
  562. }
  563. // required sint64 left = 1;
  564. public static final int LEFT_FIELD_NUMBER = 1;
  565. private boolean hasLeft;
  566. private long left_ = 0L;
  567. public boolean hasLeft() { return hasLeft; }
  568. public long getLeft() { return left_; }
  569. // required sint64 right = 2;
  570. public static final int RIGHT_FIELD_NUMBER = 2;
  571. private boolean hasRight;
  572. private long right_ = 0L;
  573. public boolean hasRight() { return hasRight; }
  574. public long getRight() { return right_; }
  575. // required sint64 top = 3;
  576. public static final int TOP_FIELD_NUMBER = 3;
  577. private boolean hasTop;
  578. private long top_ = 0L;
  579. public boolean hasTop() { return hasTop; }
  580. public long getTop() { return top_; }
  581. // required sint64 bottom = 4;
  582. public static final int BOTTOM_FIELD_NUMBER = 4;
  583. private boolean hasBottom;
  584. private long bottom_ = 0L;
  585. public boolean hasBottom() { return hasBottom; }
  586. public long getBottom() { return bottom_; }
  587. private void initFields() {
  588. }
  589. @Override
  590. public final boolean isInitialized() {
  591. if (!hasLeft) return false;
  592. if (!hasRight) return false;
  593. if (!hasTop) return false;
  594. if (!hasBottom) return false;
  595. return true;
  596. }
  597. @Override
  598. public void writeTo(com.google.protobuf.CodedOutputStream output)
  599. throws java.io.IOException {
  600. getSerializedSize();
  601. if (hasLeft()) {
  602. output.writeSInt64(1, getLeft());
  603. }
  604. if (hasRight()) {
  605. output.writeSInt64(2, getRight());
  606. }
  607. if (hasTop()) {
  608. output.writeSInt64(3, getTop());
  609. }
  610. if (hasBottom()) {
  611. output.writeSInt64(4, getBottom());
  612. }
  613. getUnknownFields().writeTo(output);
  614. }
  615. private int memoizedSerializedSize = -1;
  616. @Override
  617. public int getSerializedSize() {
  618. int size = memoizedSerializedSize;
  619. if (size != -1) return size;
  620. size = 0;
  621. if (hasLeft()) {
  622. size += com.google.protobuf.CodedOutputStream
  623. .computeSInt64Size(1, getLeft());
  624. }
  625. if (hasRight()) {
  626. size += com.google.protobuf.CodedOutputStream
  627. .computeSInt64Size(2, getRight());
  628. }
  629. if (hasTop()) {
  630. size += com.google.protobuf.CodedOutputStream
  631. .computeSInt64Size(3, getTop());
  632. }
  633. if (hasBottom()) {
  634. size += com.google.protobuf.CodedOutputStream
  635. .computeSInt64Size(4, getBottom());
  636. }
  637. size += getUnknownFields().getSerializedSize();
  638. memoizedSerializedSize = size;
  639. return size;
  640. }
  641. public static crosby.binary.Osmformat.HeaderBBox parseFrom(
  642. com.google.protobuf.ByteString data)
  643. throws com.google.protobuf.InvalidProtocolBufferException {
  644. return newBuilder().mergeFrom(data).buildParsed();
  645. }
  646. public static crosby.binary.Osmformat.HeaderBBox parseFrom(
  647. com.google.protobuf.ByteString data,
  648. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  649. throws com.google.protobuf.InvalidProtocolBufferException {
  650. return newBuilder().mergeFrom(data, extensionRegistry)
  651. .buildParsed();
  652. }
  653. public static crosby.binary.Osmformat.HeaderBBox parseFrom(byte[] data)
  654. throws com.google.protobuf.InvalidProtocolBufferException {
  655. return newBuilder().mergeFrom(data).buildParsed();
  656. }
  657. public static crosby.binary.Osmformat.HeaderBBox parseFrom(
  658. byte[] data,
  659. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  660. throws com.google.protobuf.InvalidProtocolBufferException {
  661. return newBuilder().mergeFrom(data, extensionRegistry)
  662. .buildParsed();
  663. }
  664. public static crosby.binary.Osmformat.HeaderBBox parseFrom(java.io.InputStream input)
  665. throws java.io.IOException {
  666. return newBuilder().mergeFrom(input).buildParsed();
  667. }
  668. public static crosby.binary.Osmformat.HeaderBBox parseFrom(
  669. java.io.InputStream input,
  670. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  671. throws java.io.IOException {
  672. return newBuilder().mergeFrom(input, extensionRegistry)
  673. .buildParsed();
  674. }
  675. public static crosby.binary.Osmformat.HeaderBBox parseDelimitedFrom(java.io.InputStream input)
  676. throws java.io.IOException {
  677. Builder builder = newBuilder();
  678. if (builder.mergeDelimitedFrom(input)) {
  679. return builder.buildParsed();
  680. } else {
  681. return null;
  682. }
  683. }
  684. public static crosby.binary.Osmformat.HeaderBBox parseDelimitedFrom(
  685. java.io.InputStream input,
  686. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  687. throws java.io.IOException {
  688. Builder builder = newBuilder();
  689. if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
  690. return builder.buildParsed();
  691. } else {
  692. return null;
  693. }
  694. }
  695. public static crosby.binary.Osmformat.HeaderBBox parseFrom(
  696. com.google.protobuf.CodedInputStream input)
  697. throws java.io.IOException {
  698. return newBuilder().mergeFrom(input).buildParsed();
  699. }
  700. public static crosby.binary.Osmformat.HeaderBBox parseFrom(
  701. com.google.protobuf.CodedInputStream input,
  702. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  703. throws java.io.IOException {
  704. return newBuilder().mergeFrom(input, extensionRegistry)
  705. .buildParsed();
  706. }
  707. public static Builder newBuilder() { return Builder.create(); }
  708. @Override
  709. public Builder newBuilderForType() { return newBuilder(); }
  710. public static Builder newBuilder(crosby.binary.Osmformat.HeaderBBox prototype) {
  711. return newBuilder().mergeFrom(prototype);
  712. }
  713. @Override
  714. public Builder toBuilder() { return newBuilder(this); }
  715. public static final class Builder extends
  716. com.google.protobuf.GeneratedMessage.Builder<Builder> {
  717. private crosby.binary.Osmformat.HeaderBBox result;
  718. // Construct using crosby.binary.Osmformat.HeaderBBox.newBuilder()
  719. private Builder() {}
  720. private static Builder create() {
  721. Builder builder = new Builder();
  722. builder.result = new crosby.binary.Osmformat.HeaderBBox();
  723. return builder;
  724. }
  725. @Override
  726. protected crosby.binary.Osmformat.HeaderBBox internalGetResult() {
  727. return result;
  728. }
  729. @Override
  730. public Builder clear() {
  731. if (result == null) {
  732. throw new IllegalStateException(
  733. "Cannot call clear() after build().");
  734. }
  735. result = new crosby.binary.Osmformat.HeaderBBox();
  736. return this;
  737. }
  738. @Override
  739. public Builder clone() {
  740. return create().mergeFrom(result);
  741. }
  742. @Override
  743. public com.google.protobuf.Descriptors.Descriptor
  744. getDescriptorForType() {
  745. return crosby.binary.Osmformat.HeaderBBox.getDescriptor();
  746. }
  747. @Override
  748. public crosby.binary.Osmformat.HeaderBBox getDefaultInstanceForType() {
  749. return crosby.binary.Osmformat.HeaderBBox.getDefaultInstance();
  750. }
  751. @Override
  752. public boolean isInitialized() {
  753. return result.isInitialized();
  754. }
  755. @Override
  756. public crosby.binary.Osmformat.HeaderBBox build() {
  757. if (result != null && !isInitialized()) {
  758. throw newUninitializedMessageException(result);
  759. }
  760. return buildPartial();
  761. }
  762. private crosby.binary.Osmformat.HeaderBBox buildParsed()
  763. throws com.google.protobuf.InvalidProtocolBufferException {
  764. if (!isInitialized()) {
  765. throw newUninitializedMessageException(
  766. result).asInvalidProtocolBufferException();
  767. }
  768. return buildPartial();
  769. }
  770. @Override
  771. public crosby.binary.Osmformat.HeaderBBox buildPartial() {
  772. if (result == null) {
  773. throw new IllegalStateException(
  774. "build() has already been called on this Builder.");
  775. }
  776. crosby.binary.Osmformat.HeaderBBox returnMe = result;
  777. result = null;
  778. return returnMe;
  779. }
  780. @Override
  781. public Builder mergeFrom(com.google.protobuf.Message other) {
  782. if (other instanceof crosby.binary.Osmformat.HeaderBBox) {
  783. return mergeFrom((crosby.binary.Osmformat.HeaderBBox)other);
  784. } else {
  785. super.mergeFrom(other);
  786. return this;
  787. }
  788. }
  789. public Builder mergeFrom(crosby.binary.Osmformat.HeaderBBox other) {
  790. if (other == crosby.binary.Osmformat.HeaderBBox.getDefaultInstance()) return this;
  791. if (other.hasLeft()) {
  792. setLeft(other.getLeft());
  793. }
  794. if (other.hasRight()) {
  795. setRight(other.getRight());
  796. }
  797. if (other.hasTop()) {
  798. setTop(other.getTop());
  799. }
  800. if (other.hasBottom()) {
  801. setBottom(other.getBottom());
  802. }
  803. this.mergeUnknownFields(other.getUnknownFields());
  804. return this;
  805. }
  806. @Override
  807. public Builder mergeFrom(
  808. com.google.protobuf.CodedInputStream input,
  809. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  810. throws java.io.IOException {
  811. com.google.protobuf.UnknownFieldSet.Builder unknownFields =
  812. com.google.protobuf.UnknownFieldSet.newBuilder(
  813. this.getUnknownFields());
  814. while (true) {
  815. int tag = input.readTag();
  816. switch (tag) {
  817. case 0:
  818. this.setUnknownFields(unknownFields.build());
  819. return this;
  820. default: {
  821. if (!parseUnknownField(input, unknownFields,
  822. extensionRegistry, tag)) {
  823. this.setUnknownFields(unknownFields.build());
  824. return this;
  825. }
  826. break;
  827. }
  828. case 8: {
  829. setLeft(input.readSInt64());
  830. break;
  831. }
  832. case 16: {
  833. setRight(input.readSInt64());
  834. break;
  835. }
  836. case 24: {
  837. setTop(input.readSInt64());
  838. break;
  839. }
  840. case 32: {
  841. setBottom(input.readSInt64());
  842. break;
  843. }
  844. }
  845. }
  846. }
  847. // required sint64 left = 1;
  848. public boolean hasLeft() {
  849. return result.hasLeft();
  850. }
  851. public long getLeft() {
  852. return result.getLeft();
  853. }
  854. public Builder setLeft(long value) {
  855. result.hasLeft = true;
  856. result.left_ = value;
  857. return this;
  858. }
  859. public Builder clearLeft() {
  860. result.hasLeft = false;
  861. result.left_ = 0L;
  862. return this;
  863. }
  864. // required sint64 right = 2;
  865. public boolean hasRight() {
  866. return result.hasRight();
  867. }
  868. public long getRight() {
  869. return result.getRight();
  870. }
  871. public Builder setRight(long value) {
  872. result.hasRight = true;
  873. result.right_ = value;
  874. return this;
  875. }
  876. public Builder clearRight() {
  877. result.hasRight = false;
  878. result.right_ = 0L;
  879. return this;
  880. }
  881. // required sint64 top = 3;
  882. public boolean hasTop() {
  883. return result.hasTop();
  884. }
  885. public long getTop() {
  886. return result.getTop();
  887. }
  888. public Builder setTop(long value) {
  889. result.hasTop = true;
  890. result.top_ = value;
  891. return this;
  892. }
  893. public Builder clearTop() {
  894. result.hasTop = false;
  895. result.top_ = 0L;
  896. return this;
  897. }
  898. // required sint64 bottom = 4;
  899. public boolean hasBottom() {
  900. return result.hasBottom();
  901. }
  902. public long getBottom() {
  903. return result.getBottom();
  904. }
  905. public Builder setBottom(long value) {
  906. result.hasBottom = true;
  907. result.bottom_ = value;
  908. return this;
  909. }
  910. public Builder clearBottom() {
  911. result.hasBottom = false;
  912. result.bottom_ = 0L;
  913. return this;
  914. }
  915. // @@protoc_insertion_point(builder_scope:HeaderBBox)
  916. }
  917. static {
  918. defaultInstance = new HeaderBBox(true);
  919. crosby.binary.Osmformat.internalForceInit();
  920. defaultInstance.initFields();
  921. }
  922. // @@protoc_insertion_point(class_scope:HeaderBBox)
  923. }
  924. public static final class PrimitiveBlock extends
  925. com.google.protobuf.GeneratedMessage {
  926. // Use PrimitiveBlock.newBuilder() to construct.
  927. private PrimitiveBlock() {
  928. initFields();
  929. }
  930. private PrimitiveBlock(boolean noInit) {}
  931. private static final PrimitiveBlock defaultInstance;
  932. public static PrimitiveBlock getDefaultInstance() {
  933. return defaultInstance;
  934. }
  935. @Override
  936. public PrimitiveBlock getDefaultInstanceForType() {
  937. return defaultInstance;
  938. }
  939. public static final com.google.protobuf.Descriptors.Descriptor
  940. getDescriptor() {
  941. return crosby.binary.Osmformat.internal_static_PrimitiveBlock_descriptor;
  942. }
  943. @Override
  944. protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
  945. internalGetFieldAccessorTable() {
  946. return crosby.binary.Osmformat.internal_static_PrimitiveBlock_fieldAccessorTable;
  947. }
  948. // required .StringTable stringtable = 1;
  949. public static final int STRINGTABLE_FIELD_NUMBER = 1;
  950. private boolean hasStringtable;
  951. private crosby.binary.Osmformat.StringTable stringtable_;
  952. public boolean hasStringtable() { return hasStringtable; }
  953. public crosby.binary.Osmformat.StringTable getStringtable() { return stringtable_; }
  954. // repeated .PrimitiveGroup primitivegroup = 2;
  955. public static final int PRIMITIVEGROUP_FIELD_NUMBER = 2;
  956. private java.util.List<crosby.binary.Osmformat.PrimitiveGroup> primitivegroup_ =
  957. java.util.Collections.emptyList();
  958. public java.util.List<crosby.binary.Osmformat.PrimitiveGroup> getPrimitivegroupList() {
  959. return primitivegroup_;
  960. }
  961. public int getPrimitivegroupCount() { return primitivegroup_.size(); }
  962. public crosby.binary.Osmformat.PrimitiveGroup getPrimitivegroup(int index) {
  963. return primitivegroup_.get(index);
  964. }
  965. // optional int32 granularity = 17 [default = 100];
  966. public static final int GRANULARITY_FIELD_NUMBER = 17;
  967. private boolean hasGranularity;
  968. private int granularity_ = 100;
  969. public boolean hasGranularity() { return hasGranularity; }
  970. public int getGranularity() { return granularity_; }
  971. // optional int64 lat_offset = 19 [default = 0];
  972. public static final int LAT_OFFSET_FIELD_NUMBER = 19;
  973. private boolean hasLatOffset;
  974. private long latOffset_ = 0L;
  975. public boolean hasLatOffset() { return hasLatOffset; }
  976. public long getLatOffset() { return latOffset_; }
  977. // optional int64 lon_offset = 20 [default = 0];
  978. public static final int LON_OFFSET_FIELD_NUMBER = 20;
  979. private boolean hasLonOffset;
  980. private long lonOffset_ = 0L;
  981. public boolean hasLonOffset() { return hasLonOffset; }
  982. public long getLonOffset() { return lonOffset_; }
  983. // optional int32 date_granularity = 18 [default = 1000];
  984. public static final int DATE_GRANULARITY_FIELD_NUMBER = 18;
  985. private boolean hasDateGranularity;
  986. private int dateGranularity_ = 1000;
  987. public boolean hasDateGranularity() { return hasDateGranularity; }
  988. public int getDateGranularity() { return dateGranularity_; }
  989. private void initFields() {
  990. stringtable_ = crosby.binary.Osmformat.StringTable.getDefaultInstance();
  991. }
  992. @Override
  993. public final boolean isInitialized() {
  994. if (!hasStringtable) return false;
  995. for (crosby.binary.Osmformat.PrimitiveGroup element : getPrimitivegroupList()) {
  996. if (!element.isInitialized()) return false;
  997. }
  998. return true;
  999. }
  1000. @Override
  1001. public void writeTo(com.google.protobuf.CodedOutputStream output)
  1002. throws java.io.IOException {
  1003. getSerializedSize();
  1004. if (hasStringtable()) {
  1005. output.writeMessage(1, getStringtable());
  1006. }
  1007. for (crosby.binary.Osmformat.PrimitiveGroup element : getPrimitivegroupList()) {
  1008. output.writeMessage(2, element);
  1009. }
  1010. if (hasGranularity()) {
  1011. output.writeInt32(17, getGranularity());
  1012. }
  1013. if (hasDateGranularity()) {
  1014. output.writeInt32(18, getDateGranularity());
  1015. }
  1016. if (hasLatOffset()) {
  1017. output.writeInt64(19, getLatOffset());
  1018. }
  1019. if (hasLonOffset()) {
  1020. output.writeInt64(20, getLonOffset());
  1021. }
  1022. getUnknownFields().writeTo(output);
  1023. }
  1024. private int memoizedSerializedSize = -1;
  1025. @Override
  1026. public int getSerializedSize() {
  1027. int size = memoizedSerializedSize;
  1028. if (size != -1) return size;
  1029. size = 0;
  1030. if (hasStringtable()) {
  1031. size += com.google.protobuf.CodedOutputStream
  1032. .computeMessageSize(1, getStringtable());
  1033. }
  1034. for (crosby.binary.Osmformat.PrimitiveGroup element : getPrimitivegroupList()) {
  1035. size += com.google.protobuf.CodedOutputStream
  1036. .computeMessageSize(2, element);
  1037. }
  1038. if (hasGranularity()) {
  1039. size += com.google.protobuf.CodedOutputStream
  1040. .computeInt32Size(17, getGranularity());
  1041. }
  1042. if (hasDateGranularity()) {
  1043. size += com.google.protobuf.CodedOutputStream
  1044. .computeInt32Size(18, getDateGranularity());
  1045. }
  1046. if (hasLatOffset()) {
  1047. size += com.google.protobuf.CodedOutputStream
  1048. .computeInt64Size(19, getLatOffset());
  1049. }
  1050. if (hasLonOffset()) {
  1051. size += com.google.protobuf.CodedOutputStream
  1052. .computeInt64Size(20, getLonOffset());
  1053. }
  1054. size += getUnknownFields().getSerializedSize();
  1055. memoizedSerializedSize = size;
  1056. return size;
  1057. }
  1058. public static crosby.binary.Osmformat.PrimitiveBlock parseFrom(
  1059. com.google.protobuf.ByteString data)
  1060. throws com.google.protobuf.InvalidProtocolBufferException {
  1061. return newBuilder().mergeFrom(data).buildParsed();
  1062. }
  1063. public static crosby.binary.Osmformat.PrimitiveBlock parseFrom(
  1064. com.google.protobuf.ByteString data,
  1065. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  1066. throws com.google.protobuf.InvalidProtocolBufferException {
  1067. return newBuilder().mergeFrom(data, extensionRegistry)
  1068. .buildParsed();
  1069. }
  1070. public static crosby.binary.Osmformat.PrimitiveBlock parseFrom(byte[] data)
  1071. throws com.google.protobuf.InvalidProtocolBufferException {
  1072. return newBuilder().mergeFrom(data).buildParsed();
  1073. }
  1074. public static crosby.binary.Osmformat.PrimitiveBlock parseFrom(
  1075. byte[] data,
  1076. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  1077. throws com.google.protobuf.InvalidProtocolBufferException {
  1078. return newBuilder().mergeFrom(data, extensionRegistry)
  1079. .buildParsed();
  1080. }
  1081. public static crosby.binary.Osmformat.PrimitiveBlock parseFrom(java.io.InputStream input)
  1082. throws java.io.IOException {
  1083. return newBuilder().mergeFrom(input).buildParsed();
  1084. }
  1085. public static crosby.binary.Osmformat.PrimitiveBlock parseFrom(
  1086. java.io.InputStream input,
  1087. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  1088. throws java.io.IOException {
  1089. return newBuilder().mergeFrom(input, extensionRegistry)
  1090. .buildParsed();
  1091. }
  1092. public static crosby.binary.Osmformat.PrimitiveBlock parseDelimitedFrom(java.io.InputStream input)
  1093. throws java.io.IOException {
  1094. Builder builder = newBuilder();
  1095. if (builder.mergeDelimitedFrom(input)) {
  1096. return builder.buildParsed();
  1097. } else {
  1098. return null;
  1099. }
  1100. }
  1101. public static crosby.binary.Osmformat.PrimitiveBlock parseDelimitedFrom(
  1102. java.io.InputStream input,
  1103. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  1104. throws java.io.IOException {
  1105. Builder builder = newBuilder();
  1106. if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
  1107. return builder.buildParsed();
  1108. } else {
  1109. return null;
  1110. }
  1111. }
  1112. public static crosby.binary.Osmformat.PrimitiveBlock parseFrom(
  1113. com.google.protobuf.CodedInputStream input)
  1114. throws java.io.IOException {
  1115. return newBuilder().mergeFrom(input).buildParsed();
  1116. }
  1117. public static crosby.binary.Osmformat.PrimitiveBlock parseFrom(
  1118. com.google.protobuf.CodedInputStream input,
  1119. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  1120. throws java.io.IOException {
  1121. return newBuilder().mergeFrom(input, extensionRegistry)
  1122. .buildParsed();
  1123. }
  1124. public static Builder newBuilder() { return Builder.create(); }
  1125. @Override
  1126. public Builder newBuilderForType() { return newBuilder(); }
  1127. public static Builder newBuilder(crosby.binary.Osmformat.PrimitiveBlock prototype) {
  1128. return newBuilder().mergeFrom(prototype);
  1129. }
  1130. @Override
  1131. public Builder toBuilder() { return newBuilder(this); }
  1132. public static final class Builder extends
  1133. com.google.protobuf.GeneratedMessage.Builder<Builder> {
  1134. private crosby.binary.Osmformat.PrimitiveBlock result;
  1135. // Construct using crosby.binary.Osmformat.PrimitiveBlock.newBuilder()
  1136. private Builder() {}
  1137. private static Builder create() {
  1138. Builder builder = new Builder();
  1139. builder.result = new crosby.binary.Osmformat.PrimitiveBlock();
  1140. return builder;
  1141. }
  1142. @Override
  1143. protected crosby.binary.Osmformat.PrimitiveBlock internalGetResult() {
  1144. return result;
  1145. }
  1146. @Override
  1147. public Builder clear() {
  1148. if (result == null) {
  1149. throw new IllegalStateException(
  1150. "Cannot call clear() after build().");
  1151. }
  1152. result = new crosby.binary.Osmformat.PrimitiveBlock();
  1153. return this;
  1154. }
  1155. @Override
  1156. public Builder clone() {
  1157. return create().mergeFrom(result);
  1158. }
  1159. @Override
  1160. public com.google.protobuf.Descriptors.Descriptor
  1161. getDescriptorForType() {
  1162. return crosby.binary.Osmformat.PrimitiveBlock.getDescriptor();
  1163. }
  1164. @Override
  1165. public crosby.binary.Osmformat.PrimitiveBlock getDefaultInstanceForType() {
  1166. return crosby.binary.Osmformat.PrimitiveBlock.getDefaultInstance();
  1167. }
  1168. @Override
  1169. public boolean isInitialized() {
  1170. return result.isInitialized();
  1171. }
  1172. @Override
  1173. public crosby.binary.Osmformat.PrimitiveBlock build() {
  1174. if (result != null && !isInitialized()) {
  1175. throw newUninitializedMessageException(result);
  1176. }
  1177. return buildPartial();
  1178. }
  1179. private crosby.binary.Osmformat.PrimitiveBlock buildParsed()
  1180. throws com.google.protobuf.InvalidProtocolBufferException {
  1181. if (!isInitialized()) {
  1182. throw newUninitializedMessageException(
  1183. result).asInvalidProtocolBufferException();
  1184. }
  1185. return buildPartial();
  1186. }
  1187. @Override
  1188. public crosby.binary.Osmformat.PrimitiveBlock buildPartial() {
  1189. if (result == null) {
  1190. throw new IllegalStateException(
  1191. "build() has already been called on this Builder.");
  1192. }
  1193. if (result.primitivegroup_ != java.util.Collections.EMPTY_LIST) {
  1194. result.primitivegroup_ =
  1195. java.util.Collections.unmodifiableList(result.primitivegroup_);
  1196. }
  1197. crosby.binary.Osmformat.PrimitiveBlock returnMe = result;
  1198. result = null;
  1199. return returnMe;
  1200. }
  1201. @Override
  1202. public Builder mergeFrom(com.google.protobuf.Message other) {
  1203. if (other instanceof crosby.binary.Osmformat.PrimitiveBlock) {
  1204. return mergeFrom((crosby.binary.Osmformat.PrimitiveBlock)other);
  1205. } else {
  1206. super.mergeFrom(other);
  1207. return this;
  1208. }
  1209. }
  1210. public Builder mergeFrom(crosby.binary.Osmformat.PrimitiveBlock other) {
  1211. if (other == crosby.binary.Osmformat.PrimitiveBlock.getDefaultInstance()) return this;
  1212. if (other.hasStringtable()) {
  1213. mergeStringtable(other.getStringtable());
  1214. }
  1215. if (!other.primitivegroup_.isEmpty()) {
  1216. if (result.primitivegroup_.isEmpty()) {
  1217. result.primitivegroup_ = new java.util.ArrayList<crosby.binary.Osmformat.PrimitiveGroup>();
  1218. }
  1219. result.primitivegroup_.addAll(other.primitivegroup_);
  1220. }
  1221. if (other.hasGranularity()) {
  1222. setGranularity(other.getGranularity());
  1223. }
  1224. if (other.hasLatOffset()) {
  1225. setLatOffset(other.getLatOffset());
  1226. }
  1227. if (other.hasLonOffset()) {
  1228. setLonOffset(other.getLonOffset());
  1229. }
  1230. if (other.hasDateGranularity()) {
  1231. setDateGranularity(other.getDateGranularity());
  1232. }
  1233. this.mergeUnknownFields(other.getUnknownFields());
  1234. return this;
  1235. }
  1236. @Override
  1237. public Builder mergeFrom(
  1238. com.google.protobuf.CodedInputStream input,
  1239. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  1240. throws java.io.IOException {
  1241. com.google.protobuf.UnknownFieldSet.Builder unknownFields =
  1242. com.google.protobuf.UnknownFieldSet.newBuilder(
  1243. this.getUnknownFields());
  1244. while (true) {
  1245. int tag = input.readTag();
  1246. switch (tag) {
  1247. case 0:
  1248. this.setUnknownFields(unknownFields.build());
  1249. return this;
  1250. default: {
  1251. if (!parseUnknownField(input, unknownFields,
  1252. extensionRegistry, tag)) {
  1253. this.setUnknownFields(unknownFields.build());
  1254. return this;
  1255. }
  1256. break;
  1257. }
  1258. case 10: {
  1259. crosby.binary.Osmformat.StringTable.Builder subBuilder = crosby.binary.Osmformat.StringTable.newBuilder();
  1260. if (hasStringtable()) {
  1261. subBuilder.mergeFrom(getStringtable());
  1262. }
  1263. input.readMessage(subBuilder, extensionRegistry);
  1264. setStringtable(subBuilder.buildPartial());
  1265. break;
  1266. }
  1267. case 18: {
  1268. crosby.binary.Osmformat.PrimitiveGroup.Builder subBuilder = crosby.binary.Osmformat.PrimitiveGroup.newBuilder();
  1269. input.readMessage(subBuilder, extensionRegistry);
  1270. addPrimitivegroup(subBuilder.buildPartial());
  1271. break;
  1272. }
  1273. case 136: {
  1274. setGranularity(input.readInt32());
  1275. break;
  1276. }
  1277. case 144: {
  1278. setDateGranularity(input.readInt32());
  1279. break;
  1280. }
  1281. case 152: {
  1282. setLatOffset(input.readInt64());
  1283. break;
  1284. }
  1285. case 160: {
  1286. setLonOffset(input.readInt64());
  1287. break;
  1288. }
  1289. }
  1290. }
  1291. }
  1292. // required .StringTable stringtable = 1;
  1293. public boolean hasStringtable() {
  1294. return result.hasStringtable();
  1295. }
  1296. public crosby.binary.Osmformat.StringTable getStringtable() {
  1297. return result.getStringtable();
  1298. }
  1299. public Builder setStringtable(crosby.binary.Osmformat.StringTable value) {
  1300. if (value == null) {
  1301. throw new NullPointerException();
  1302. }
  1303. result.hasStringtable = true;
  1304. result.stringtable_ = value;
  1305. return this;
  1306. }
  1307. public Builder setStringtable(crosby.binary.Osmformat.StringTable.Builder builderForValue) {
  1308. result.hasStringtable = true;
  1309. result.stringtable_ = builderForValue.build();
  1310. return this;
  1311. }
  1312. public Builder mergeStringtable(crosby.binary.Osmformat.StringTable value) {
  1313. if (result.hasStringtable() &&
  1314. result.stringtable_ != crosby.binary.Osmformat.StringTable.getDefaultInstance()) {
  1315. result.stringtable_ =
  1316. crosby.binary.Osmformat.StringTable.newBuilder(result.stringtable_).mergeFrom(value).buildPartial();
  1317. } else {
  1318. result.stringtable_ = value;
  1319. }
  1320. result.hasStringtable = true;
  1321. return this;
  1322. }
  1323. public Builder clearStringtable() {
  1324. result.hasStringtable = false;
  1325. result.stringtable_ = crosby.binary.Osmformat.StringTable.getDefaultInstance();
  1326. return this;
  1327. }
  1328. // repeated .PrimitiveGroup primitivegroup = 2;
  1329. public java.util.List<crosby.binary.Osmformat.PrimitiveGroup> getPrimitivegroupList() {
  1330. return java.util.Collections.unmodifiableList(result.primitivegroup_);
  1331. }
  1332. public int getPrimitivegroupCount() {
  1333. return result.getPrimitivegroupCount();
  1334. }
  1335. public crosby.binary.Osmformat.PrimitiveGroup getPrimitivegroup(int index) {
  1336. return result.getPrimitivegroup(index);
  1337. }
  1338. public Builder setPrimitivegroup(int index, crosby.binary.Osmformat.PrimitiveGroup value) {
  1339. if (value == null) {
  1340. throw new NullPointerException();
  1341. }
  1342. result.primitivegroup_.set(index, value);
  1343. return this;
  1344. }
  1345. public Builder setPrimitivegroup(int index, crosby.binary.Osmformat.PrimitiveGroup.Builder builderForValue) {
  1346. result.primitivegroup_.set(index, builderForValue.build());
  1347. return this;
  1348. }
  1349. public Builder addPrimitivegroup(crosby.binary.Osmformat.PrimitiveGroup value) {
  1350. if (value == null) {
  1351. throw new NullPointerException();
  1352. }
  1353. if (result.primitivegroup_.isEmpty()) {
  1354. result.primitivegroup_ = new java.util.ArrayList<crosby.binary.Osmformat.PrimitiveGroup>();
  1355. }
  1356. result.primitivegroup_.add(value);
  1357. return this;
  1358. }
  1359. public Builder addPrimitivegroup(crosby.binary.Osmformat.PrimitiveGroup.Builder builderForValue) {
  1360. if (result.primitivegroup_.isEmpty()) {
  1361. result.primitivegroup_ = new java.util.ArrayList<crosby.binary.Osmformat.PrimitiveGroup>();
  1362. }
  1363. result.primitivegroup_.add(builderForValue.build());
  1364. return this;
  1365. }
  1366. public Builder addAllPrimitivegroup(
  1367. java.lang.Iterable<? extends crosby.binary.Osmformat.PrimitiveGroup> values) {
  1368. if (result.primitivegroup_.isEmpty()) {
  1369. result.primitivegroup_ = new java.util.ArrayList<crosby.binary.Osmformat.PrimitiveGroup>();
  1370. }
  1371. super.addAll(values, result.primitivegroup_);
  1372. return this;
  1373. }
  1374. public Builder clearPrimitivegroup() {
  1375. result.primitivegroup_ = java.util.Collections.emptyList();
  1376. return this;
  1377. }
  1378. // optional int32 granularity = 17 [default = 100];
  1379. public boolean hasGranularity() {
  1380. return result.hasGranularity();
  1381. }
  1382. public int getGranularity() {
  1383. return result.getGranularity();
  1384. }
  1385. public Builder setGranularity(int value) {
  1386. result.hasGranularity = true;
  1387. result.granularity_ = value;
  1388. return this;
  1389. }
  1390. public Builder clearGranularity() {
  1391. result.hasGranularity = false;
  1392. result.granularity_ = 100;
  1393. return this;
  1394. }
  1395. // optional int64 lat_offset = 19 [default = 0];
  1396. public boolean hasLatOffset() {
  1397. return result.hasLatOffset();
  1398. }
  1399. public long getLatOffset() {
  1400. return result.getLatOffset();
  1401. }
  1402. public Builder setLatOffset(long value) {
  1403. result.hasLatOffset = true;
  1404. result.latOffset_ = value;
  1405. return this;
  1406. }
  1407. public Builder clearLatOffset() {
  1408. result.hasLatOffset = false;
  1409. result.latOffset_ = 0L;
  1410. return this;
  1411. }
  1412. // optional int64 lon_offset = 20 [default = 0];
  1413. public boolean hasLonOffset() {
  1414. return result.hasLonOffset();
  1415. }
  1416. public long getLonOffset() {
  1417. return result.getLonOffset();
  1418. }
  1419. public Builder setLonOffset(long value) {
  1420. result.hasLonOffset = true;
  1421. result.lonOffset_ = value;
  1422. return this;
  1423. }
  1424. public Builder clearLonOffset() {
  1425. result.hasLonOffset = false;
  1426. result.lonOffset_ = 0L;
  1427. return this;
  1428. }
  1429. // optional int32 date_granularity = 18 [default = 1000];
  1430. public boolean hasDateGranularity() {
  1431. return result.hasDateGranularity();
  1432. }
  1433. public int getDateGranularity() {
  1434. return result.getDateGranularity();
  1435. }
  1436. public Builder setDateGranularity(int value) {
  1437. result.hasDateGranularity = true;
  1438. result.dateGranularity_ = value;
  1439. return this;
  1440. }
  1441. public Builder clearDateGranularity() {
  1442. result.hasDateGranularity = false;
  1443. result.dateGranularity_ = 1000;
  1444. return this;
  1445. }
  1446. // @@protoc_insertion_point(builder_scope:PrimitiveBlock)
  1447. }
  1448. static {
  1449. defaultInstance = new PrimitiveBlock(true);
  1450. crosby.binary.Osmformat.internalForceInit();
  1451. defaultInstance.initFields();
  1452. }
  1453. // @@protoc_insertion_point(class_scope:PrimitiveBlock)
  1454. }
  1455. public static final class PrimitiveGroup extends
  1456. com.google.protobuf.GeneratedMessage {
  1457. // Use PrimitiveGroup.newBuilder() to construct.
  1458. private PrimitiveGroup() {
  1459. initFields();
  1460. }
  1461. private PrimitiveGroup(boolean noInit) {}
  1462. private static final PrimitiveGroup defaultInstance;
  1463. public static PrimitiveGroup getDefaultInstance() {
  1464. return defaultInstance;
  1465. }
  1466. @Override
  1467. public PrimitiveGroup getDefaultInstanceForType() {
  1468. return defaultInstance;
  1469. }
  1470. public static final com.google.protobuf.Descriptors.Descriptor
  1471. getDescriptor() {
  1472. return crosby.binary.Osmformat.internal_static_PrimitiveGroup_descriptor;
  1473. }
  1474. @Override
  1475. protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
  1476. internalGetFieldAccessorTable() {
  1477. return crosby.binary.Osmformat.internal_static_PrimitiveGroup_fieldAccessorTable;
  1478. }
  1479. // repeated .Node nodes = 1;
  1480. public static final int NODES_FIELD_NUMBER = 1;
  1481. private java.util.List<crosby.binary.Osmformat.Node> nodes_ =
  1482. java.util.Collections.emptyList();
  1483. public java.util.List<crosby.binary.Osmformat.Node> getNodesList() {
  1484. return nodes_;
  1485. }
  1486. public int getNodesCount() { return nodes_.size(); }
  1487. public crosby.binary.Osmformat.Node getNodes(int index) {
  1488. return nodes_.get(index);
  1489. }
  1490. // optional .DenseNodes dense = 2;
  1491. public static final int DENSE_FIELD_NUMBER = 2;
  1492. private boolean hasDense;
  1493. private crosby.binary.Osmformat.DenseNodes dense_;
  1494. public boolean hasDense() { return hasDense; }
  1495. public crosby.binary.Osmformat.DenseNodes getDense() { return dense_; }
  1496. // repeated .Way ways = 3;
  1497. public static final int WAYS_FIELD_NUMBER = 3;
  1498. private java.util.List<crosby.binary.Osmformat.Way> ways_ =
  1499. java.util.Collections.emptyList();
  1500. public java.util.List<crosby.binary.Osmformat.Way> getWaysList() {
  1501. return ways_;
  1502. }
  1503. public int getWaysCount() { return ways_.size(); }
  1504. public crosby.binary.Osmformat.Way getWays(int index) {
  1505. return ways_.get(index);
  1506. }
  1507. // repeated .Relation relations = 4;
  1508. public static final int RELATIONS_FIELD_NUMBER = 4;
  1509. private java.util.List<crosby.binary.Osmformat.Relation> relations_ =
  1510. java.util.Collections.emptyList();
  1511. public java.util.List<crosby.binary.Osmformat.Relation> getRelationsList() {
  1512. return relations_;
  1513. }
  1514. public int getRelationsCount() { return relations_.size(); }
  1515. public crosby.binary.Osmformat.Relation getRelations(int index) {
  1516. return relations_.get(index);
  1517. }
  1518. // repeated .ChangeSet changesets = 5;
  1519. public static final int CHANGESETS_FIELD_NUMBER = 5;
  1520. private java.util.List<crosby.binary.Osmformat.ChangeSet> changesets_ =
  1521. java.util.Collections.emptyList();
  1522. public java.util.List<crosby.binary.Osmformat.ChangeSet> getChangesetsList() {
  1523. return changesets_;
  1524. }
  1525. public int getChangesetsCount() { return changesets_.size(); }
  1526. public crosby.binary.Osmformat.ChangeSet getChangesets(int index) {
  1527. return changesets_.get(index);
  1528. }
  1529. private void initFields() {
  1530. dense_ = crosby.binary.Osmformat.DenseNodes.getDefaultInstance();
  1531. }
  1532. @Override
  1533. public final boolean isInitialized() {
  1534. for (crosby.binary.Osmformat.Node element : getNodesList()) {
  1535. if (!element.isInitialized()) return false;
  1536. }
  1537. for (crosby.binary.Osmformat.Way element : getWaysList()) {
  1538. if (!element.isInitialized()) return false;
  1539. }
  1540. for (crosby.binary.Osmformat.Relation element : getRelationsList()) {
  1541. if (!element.isInitialized()) return false;
  1542. }
  1543. for (crosby.binary.Osmformat.ChangeSet element : getChangesetsList()) {
  1544. if (!element.isInitialized()) return false;
  1545. }
  1546. return true;
  1547. }
  1548. @Override
  1549. public void writeTo(com.google.protobuf.CodedOutputStream output)
  1550. throws java.io.IOException {
  1551. getSerializedSize();
  1552. for (crosby.binary.Osmformat.Node element : getNodesList()) {
  1553. output.writeMessage(1, element);
  1554. }
  1555. if (hasDense()) {
  1556. output.writeMessage(2, getDense());
  1557. }
  1558. for (crosby.binary.Osmformat.Way element : getWaysList()) {
  1559. output.writeMessage(3, element);
  1560. }
  1561. for (crosby.binary.Osmformat.Relation element : getRelationsList()) {
  1562. output.writeMessage(4, element);
  1563. }
  1564. for (crosby.binary.Osmformat.ChangeSet element : getChangesetsList()) {
  1565. output.writeMessage(5, element);
  1566. }
  1567. getUnknownFields().writeTo(output);
  1568. }
  1569. private int memoizedSerializedSize = -1;
  1570. @Override
  1571. public int getSerializedSize() {
  1572. int size = memoizedSerializedSize;
  1573. if (size != -1) return size;
  1574. size = 0;
  1575. for (crosby.binary.Osmformat.Node element : getNodesList()) {
  1576. size += com.google.protobuf.CodedOutputStream
  1577. .computeMessageSize(1, element);
  1578. }
  1579. if (hasDense()) {
  1580. size += com.google.protobuf.CodedOutputStream
  1581. .computeMessageSize(2, getDense());
  1582. }
  1583. for (crosby.binary.Osmformat.Way element : getWaysList()) {
  1584. size += com.google.protobuf.CodedOutputStream
  1585. .computeMessageSize(3, element);
  1586. }
  1587. for (crosby.binary.Osmformat.Relation element : getRelationsList()) {
  1588. size += com.google.protobuf.CodedOutputStream
  1589. .computeMessageSize(4, element);
  1590. }
  1591. for (crosby.binary.Osmformat.ChangeSet element : getChangesetsList()) {
  1592. size += com.google.protobuf.CodedOutputStream
  1593. .computeMessageSize(5, element);
  1594. }
  1595. size += getUnknownFields().getSerializedSize();
  1596. memoizedSerializedSize = size;
  1597. return size;
  1598. }
  1599. public static crosby.binary.Osmformat.PrimitiveGroup parseFrom(
  1600. com.google.protobuf.ByteString data)
  1601. throws com.google.protobuf.InvalidProtocolBufferException {
  1602. return newBuilder().mergeFrom(data).buildParsed();
  1603. }
  1604. public static crosby.binary.Osmformat.PrimitiveGroup parseFrom(
  1605. com.google.protobuf.ByteString data,
  1606. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  1607. throws com.google.protobuf.InvalidProtocolBufferException {
  1608. return newBuilder().mergeFrom(data, extensionRegistry)
  1609. .buildParsed();
  1610. }
  1611. public static crosby.binary.Osmformat.PrimitiveGroup parseFrom(byte[] data)
  1612. throws com.google.protobuf.InvalidProtocolBufferException {
  1613. return newBuilder().mergeFrom(data).buildParsed();
  1614. }
  1615. public static crosby.binary.Osmformat.PrimitiveGroup parseFrom(
  1616. byte[] data,
  1617. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  1618. throws com.google.protobuf.InvalidProtocolBufferException {
  1619. return newBuilder().mergeFrom(data, extensionRegistry)
  1620. .buildParsed();
  1621. }
  1622. public static crosby.binary.Osmformat.PrimitiveGroup parseFrom(java.io.InputStream input)
  1623. throws java.io.IOException {
  1624. return newBuilder().mergeFrom(input).buildParsed();
  1625. }
  1626. public static crosby.binary.Osmformat.PrimitiveGroup parseFrom(
  1627. java.io.InputStream input,
  1628. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  1629. throws java.io.IOException {
  1630. return newBuilder().mergeFrom(input, extensionRegistry)
  1631. .buildParsed();
  1632. }
  1633. public static crosby.binary.Osmformat.PrimitiveGroup parseDelimitedFrom(java.io.InputStream input)
  1634. throws java.io.IOException {
  1635. Builder builder = newBuilder();
  1636. if (builder.mergeDelimitedFrom(input)) {
  1637. return builder.buildParsed();
  1638. } else {
  1639. return null;
  1640. }
  1641. }
  1642. public static crosby.binary.Osmformat.PrimitiveGroup parseDelimitedFrom(
  1643. java.io.InputStream input,
  1644. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  1645. throws java.io.IOException {
  1646. Builder builder = newBuilder();
  1647. if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
  1648. return builder.buildParsed();
  1649. } else {
  1650. return null;
  1651. }
  1652. }
  1653. public static crosby.binary.Osmformat.PrimitiveGroup parseFrom(
  1654. com.google.protobuf.CodedInputStream input)
  1655. throws java.io.IOException {
  1656. return newBuilder().mergeFrom(input).buildParsed();
  1657. }
  1658. public static crosby.binary.Osmformat.PrimitiveGroup parseFrom(
  1659. com.google.protobuf.CodedInputStream input,
  1660. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  1661. throws java.io.IOException {
  1662. return newBuilder().mergeFrom(input, extensionRegistry)
  1663. .buildParsed();
  1664. }
  1665. public static Builder newBuilder() { return Builder.create(); }
  1666. @Override
  1667. public Builder newBuilderForType() { return newBuilder(); }
  1668. public static Builder newBuilder(crosby.binary.Osmformat.PrimitiveGroup prototype) {
  1669. return newBuilder().mergeFrom(prototype);
  1670. }
  1671. @Override
  1672. public Builder toBuilder() { return newBuilder(this); }
  1673. public static final class Builder extends
  1674. com.google.protobuf.GeneratedMessage.Builder<Builder> {
  1675. private crosby.binary.Osmformat.PrimitiveGroup result;
  1676. // Construct using crosby.binary.Osmformat.PrimitiveGroup.newBuilder()
  1677. private Builder() {}
  1678. private static Builder create() {
  1679. Builder builder = new Builder();
  1680. builder.result = new crosby.binary.Osmformat.PrimitiveGroup();
  1681. return builder;
  1682. }
  1683. @Override
  1684. protected crosby.binary.Osmformat.PrimitiveGroup internalGetResult() {
  1685. return result;
  1686. }
  1687. @Override
  1688. public Builder clear() {
  1689. if (result == null) {
  1690. throw new IllegalStateException(
  1691. "Cannot call clear() after build().");
  1692. }
  1693. result = new crosby.binary.Osmformat.PrimitiveGroup();
  1694. return this;
  1695. }
  1696. @Override
  1697. public Builder clone() {
  1698. return create().mergeFrom(result);
  1699. }
  1700. @Override
  1701. public com.google.protobuf.Descriptors.Descriptor
  1702. getDescriptorForType() {
  1703. return crosby.binary.Osmformat.PrimitiveGroup.getDescriptor();
  1704. }
  1705. @Override
  1706. public crosby.binary.Osmformat.PrimitiveGroup getDefaultInstanceForType() {
  1707. return crosby.binary.Osmformat.PrimitiveGroup.getDefaultInstance();
  1708. }
  1709. @Override
  1710. public boolean isInitialized() {
  1711. return result.isInitialized();
  1712. }
  1713. @Override
  1714. public crosby.binary.Osmformat.PrimitiveGroup build() {
  1715. if (result != null && !isInitialized()) {
  1716. throw newUninitializedMessageException(result);
  1717. }
  1718. return buildPartial();
  1719. }
  1720. private crosby.binary.Osmformat.PrimitiveGroup buildParsed()
  1721. throws com.google.protobuf.InvalidProtocolBufferException {
  1722. if (!isInitialized()) {
  1723. throw newUninitializedMessageException(