diff --git a/.github/workflows/dockerimage.yml b/.github/workflows/dockerimage.yml deleted file mode 100644 index 47dcffd..0000000 --- a/.github/workflows/dockerimage.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: mtk2garmin-converter docker image - -on: - workflow_dispatch: - push: - paths: - - 'mtk2garmin-converter/**' - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - - name: Login to DockerHub - uses: docker/login-action@v1 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - - name: Build and push - uses: docker/build-push-action@v2 - with: - push: true - context: mtk2garmin-converter - tags: teemupel/mtk2garmin-converter:latest diff --git a/.github/workflows/mtk2garmin-converter.yaml b/.github/workflows/mtk2garmin-converter.yaml new file mode 100644 index 0000000..50f2345 --- /dev/null +++ b/.github/workflows/mtk2garmin-converter.yaml @@ -0,0 +1,31 @@ +name: mtk2garmin-converter docker image + +on: + workflow_dispatch: + push: + paths: + - 'mtk2garmin-converter/**' + - '.github/workflows/mtk2garmin-converter.yaml' +jobs: + build: + runs-on: ubuntu-latest + steps: + - + name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + - + name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - + name: Build and push + uses: docker/build-push-action@v6 + with: + push: true + context: "{{defaultContext}}:mtk2garmin-converter" + tags: teemupel/mtk2garmin-converter:latest diff --git a/.github/workflows/ubuntugis-base.yaml b/.github/workflows/ubuntugis-base.yaml new file mode 100644 index 0000000..2fd128b --- /dev/null +++ b/.github/workflows/ubuntugis-base.yaml @@ -0,0 +1,31 @@ +name: ubuntugis-base docker image + +on: + workflow_dispatch: + push: + paths: + - 'mapcreator/ubuntugis-base/**' + - '.github/workflows/ubuntugis-base.yaml' +jobs: + build: + runs-on: ubuntu-latest + steps: + - + name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + - + name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - + name: Build and push + uses: docker/build-push-action@v6 + with: + push: true + context: "{{defaultContext}}:mapcreator/ubuntugis-base" + tags: teemupel/mtk2garmin-ubuntugis-base:latest diff --git a/mapcreator/convert_docker.sh b/mapcreator/convert_docker.sh index 4cd84ce..1eda653 100755 --- a/mapcreator/convert_docker.sh +++ b/mapcreator/convert_docker.sh @@ -5,7 +5,7 @@ printf -v date '%(%Y%m%d)T' -1 docker compose down -v --remove-orphans -docker pull ghcr.io/osgeo/gdal:ubuntu-full-3.6.3 +docker pull ghcr.io/osgeo/gdal:ubuntu-full-3.10.0 docker build --tag teemupel/mtk2garmin-ubuntugis-base -f ./ubuntugis-base/Dockerfile ./ubuntugis-base docker push teemupel/mtk2garmin-ubuntugis-base diff --git a/mapcreator/docker-compose.yml b/mapcreator/docker-compose.yml index fe01f82..8e57f81 100644 --- a/mapcreator/docker-compose.yml +++ b/mapcreator/docker-compose.yml @@ -1,4 +1,3 @@ -version: '3' services: mml-client: image: teemupel/mml-muutostietopalvelu-client diff --git a/mapcreator/ubuntugis-base/Dockerfile b/mapcreator/ubuntugis-base/Dockerfile index 0dd8843..6712fa5 100644 --- a/mapcreator/ubuntugis-base/Dockerfile +++ b/mapcreator/ubuntugis-base/Dockerfile @@ -1,9 +1,9 @@ -FROM ghcr.io/osgeo/gdal:ubuntu-full-3.6.3 +FROM ghcr.io/osgeo/gdal:ubuntu-full-3.10.0 RUN apt update && apt install -y curl -RUN curl -sL https://deb.nodesource.com/setup_16.x | bash - && \ - apt update && \ +RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash && \ + . /root/.bashrc && nvm install 22 && apt update && apt upgrade -y && \ apt install -y git p7zip-full nodejs default-jdk maven&& \ npm install -g svgo &&\ apt clean diff --git a/mtk2garmin-converter/pom.xml b/mtk2garmin-converter/pom.xml index 8d9839e..22f0f82 100644 --- a/mtk2garmin-converter/pom.xml +++ b/mtk2garmin-converter/pom.xml @@ -8,8 +8,8 @@ http://maven.apache.org UTF-8 - 1.11 - 1.11 + 1.21 + 1.21 @@ -33,30 +33,39 @@ com.typesafe config - 1.4.1 + 1.4.3 org.gdal gdal - 3.1.0 - - - com.google.protobuf - protobuf-java - 3.15.6 + 3.10.0 it.unimi.dsi fastutil - 8.5.4 + 8.5.15 commons-io commons-io - 2.8.0 + 2.18.0 + + + org.openstreetmap.pbf + osmpbf + 1.6.0 + + + org.openstreetmap.osmosis + osmosis-pbf + 0.49.2 + + + org.openstreetmap.osmosis + osmosis-core + 0.49.2 - @@ -86,8 +95,8 @@ org.apache.maven.plugins maven-compiler-plugin - 11 - 11 + 21 + 21 diff --git a/mtk2garmin-converter/src/main/java/org/hylly/mtk2garmin/CachedAdditionalDataSources.java b/mtk2garmin-converter/src/main/java/org/hylly/mtk2garmin/CachedAdditionalDataSources.java index 9a6426e..8044432 100644 --- a/mtk2garmin-converter/src/main/java/org/hylly/mtk2garmin/CachedAdditionalDataSources.java +++ b/mtk2garmin-converter/src/main/java/org/hylly/mtk2garmin/CachedAdditionalDataSources.java @@ -7,7 +7,7 @@ import java.util.stream.Stream; class CachedAdditionalDataSources { - private Logger logger = Logger.getLogger(CachedAdditionalDataSources.class.getName()); + private final Logger logger = Logger.getLogger(CachedAdditionalDataSources.class.getName()); private final Driver memoryd; private final DataSource syvyyskayrat; diff --git a/mtk2garmin-converter/src/main/java/org/hylly/mtk2garmin/FeatureIDProvider.java b/mtk2garmin-converter/src/main/java/org/hylly/mtk2garmin/FeatureIDProvider.java index d5201d3..7978497 100644 --- a/mtk2garmin-converter/src/main/java/org/hylly/mtk2garmin/FeatureIDProvider.java +++ b/mtk2garmin-converter/src/main/java/org/hylly/mtk2garmin/FeatureIDProvider.java @@ -3,9 +3,9 @@ import java.util.concurrent.atomic.AtomicLong; class FeatureIDProvider { - private AtomicLong nodeIDCounter = new AtomicLong(50000000000L); - private AtomicLong wayIDCounter = new AtomicLong(50000000000L); - private AtomicLong relationIDCounter = new AtomicLong(50000000000L); + private final AtomicLong nodeIDCounter = new AtomicLong(50000000000L); + private final AtomicLong wayIDCounter = new AtomicLong(50000000000L); + private final AtomicLong relationIDCounter = new AtomicLong(50000000000L); long getNodeID() { return nodeIDCounter.getAndIncrement(); diff --git a/mtk2garmin-converter/src/main/java/org/hylly/mtk2garmin/GeomHandlerResult.java b/mtk2garmin-converter/src/main/java/org/hylly/mtk2garmin/GeomHandlerResult.java index 4253df1..0fc9920 100644 --- a/mtk2garmin-converter/src/main/java/org/hylly/mtk2garmin/GeomHandlerResult.java +++ b/mtk2garmin-converter/src/main/java/org/hylly/mtk2garmin/GeomHandlerResult.java @@ -3,7 +3,7 @@ import java.util.ArrayList; class GeomHandlerResult { - final ArrayList nodes = new ArrayList<>(); - final ArrayList ways = new ArrayList<>(); - final ArrayList relations = new ArrayList<>(); + final ArrayList lightNodes = new ArrayList<>(); + final ArrayList lightWays = new ArrayList<>(); + final ArrayList lightRelations = new ArrayList<>(); } \ No newline at end of file diff --git a/mtk2garmin-converter/src/main/java/org/hylly/mtk2garmin/GeomUtils.java b/mtk2garmin-converter/src/main/java/org/hylly/mtk2garmin/GeomUtils.java index f377f85..45f4307 100644 --- a/mtk2garmin-converter/src/main/java/org/hylly/mtk2garmin/GeomUtils.java +++ b/mtk2garmin-converter/src/main/java/org/hylly/mtk2garmin/GeomUtils.java @@ -1,11 +1,8 @@ package org.hylly.mtk2garmin; +import org.gdal.ogr.GeomTransformer; import org.gdal.osr.CoordinateTransformation; import org.gdal.osr.SpatialReference; -import org.gdal.osr.osr; - -import java.util.HashMap; -import java.util.Map; import static org.gdal.osr.osrConstants.OAMS_TRADITIONAL_GIS_ORDER; @@ -13,13 +10,18 @@ class GeomUtils { private final double COORD_DELTA_X = 62000.0 - 6e3; private final double COORD_DELTA_Y = 6594000.0; - private final SpatialReference wgs84ref = new SpatialReference(); - - private Map coordinateTransformationCache = new HashMap<>(); + private final SpatialReference sphericmercref = new SpatialReference(); + public final GeomTransformer spherictowgs; GeomUtils() { - this.wgs84ref.SetWellKnownGeogCS("WGS84"); - this.wgs84ref.SetAxisMappingStrategy(OAMS_TRADITIONAL_GIS_ORDER); + SpatialReference wgs84ref = new SpatialReference(); + wgs84ref.SetWellKnownGeogCS("WGS84"); + wgs84ref.SetAxisMappingStrategy(OAMS_TRADITIONAL_GIS_ORDER); + + this.sphericmercref.ImportFromProj4("+proj=merc +a=6378137 +b=6378137 +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +k=1 +units=m +nadgrids=@null +wktext +no_defs +type=crs"); + this.sphericmercref.SetAxisMappingStrategy(OAMS_TRADITIONAL_GIS_ORDER); + + this.spherictowgs = new GeomTransformer(new CoordinateTransformation(sphericmercref, wgs84ref)); } @@ -38,21 +40,6 @@ int xy2grid(double x, double y) { Math.min(ext1[2], ext2[2]), Math.max(ext1[3], ext2[3])}; } - CoordinateTransformation getTransformationToWGS84(String proj4str) { - if (coordinateTransformationCache.containsKey(proj4str)) { - return coordinateTransformationCache.get(proj4str); - } - - SpatialReference from = new SpatialReference(); - from.ImportFromProj4(proj4str); - from.SetAxisMappingStrategy(OAMS_TRADITIONAL_GIS_ORDER); - - CoordinateTransformation transform = new CoordinateTransformation(from, wgs84ref); - - coordinateTransformationCache.put(proj4str, transform); - return transform; - } - long hashCoords(double x, double y) { double COORD_ACC = 2; return calcHash((long) ((int) (x - COORD_DELTA_X) * COORD_ACC), (long) ((int) (y - COORD_DELTA_Y) * COORD_ACC)); @@ -72,4 +59,14 @@ boolean pointInside(double[] searchBBox, double[] search) { return search[0] >= searchBBox[0] && search[0] <= searchBBox[1] && search[1] >= searchBBox[2] && search[1] <= searchBBox[3]; } + + public GeomTransformer getTransformationToSphereMercator(String proj4str) { + SpatialReference from = new SpatialReference(); + from.ImportFromProj4(proj4str); + from.SetAxisMappingStrategy(OAMS_TRADITIONAL_GIS_ORDER); + + CoordinateTransformation transform = new CoordinateTransformation(from, sphericmercref); + + return new GeomTransformer(transform); + } } diff --git a/mtk2garmin-converter/src/main/java/org/hylly/mtk2garmin/LightNode.java b/mtk2garmin-converter/src/main/java/org/hylly/mtk2garmin/LightNode.java new file mode 100644 index 0000000..82df7fe --- /dev/null +++ b/mtk2garmin-converter/src/main/java/org/hylly/mtk2garmin/LightNode.java @@ -0,0 +1,57 @@ +package org.hylly.mtk2garmin; + +import it.unimi.dsi.fastutil.shorts.Short2ShortOpenHashMap; +import org.openstreetmap.osmosis.core.container.v0_6.NodeContainer; +import org.openstreetmap.osmosis.core.domain.v0_6.*; + +import java.util.Date; + +class LightNode { + final long id; + final double lon; + final double lat; + final long hash; + Short2ShortOpenHashMap nodeTags; + boolean wayPart; + + LightNode(long id, long hash, double lon, double lat, boolean wayPart) { + this.id = id; + this.hash = hash; + this.lon = lon; + this.lat = lat; + this.wayPart = wayPart; + } + + void addTag(short key, short value) { + if (nodeTags == null) { + nodeTags = new Short2ShortOpenHashMap(); + } + + nodeTags.put(key, value); + } + + long getId() { + return id; + } + + boolean isWayPart() { + return wayPart; + } + + long getHash() { + return hash; + } + + public NodeContainer toOsmiumEntity(StringTable stringTable, Date timestamp) { + CommonEntityData ced = new CommonEntityData(this.id, -1, timestamp, OsmUser.NONE, 0); + if (nodeTags != null) { + nodeTags.short2ShortEntrySet().forEach(t -> ced.getTags().add(new Tag(stringTable.getStringById(t.getShortKey()), stringTable.getStringById(t.getShortValue())))); + } + + return new NodeContainer(new Node(ced, this.lat, this.lon)); + } + + public WayNode toOsmiumWayNode() { + return new WayNode(this.id, this.lat, this.lon); + } +} diff --git a/mtk2garmin-converter/src/main/java/org/hylly/mtk2garmin/LightRelation.java b/mtk2garmin-converter/src/main/java/org/hylly/mtk2garmin/LightRelation.java new file mode 100644 index 0000000..3cdd334 --- /dev/null +++ b/mtk2garmin-converter/src/main/java/org/hylly/mtk2garmin/LightRelation.java @@ -0,0 +1,35 @@ +package org.hylly.mtk2garmin; + +import it.unimi.dsi.fastutil.shorts.Short2ShortRBTreeMap; +import org.openstreetmap.osmosis.core.container.v0_6.RelationContainer; +import org.openstreetmap.osmosis.core.domain.v0_6.CommonEntityData; +import org.openstreetmap.osmosis.core.domain.v0_6.OsmUser; +import org.openstreetmap.osmosis.core.domain.v0_6.Relation; +import org.openstreetmap.osmosis.core.domain.v0_6.Tag; + +import java.util.ArrayList; +import java.util.Date; + +class LightRelation { + final Short2ShortRBTreeMap tags = new Short2ShortRBTreeMap(); + final ArrayList members = new ArrayList<>(); + long id; + + long getId() { + return id; + } + + void setId(long id) { + this.id = id; + } + + public RelationContainer toOsmiumEntity(StringTable stringTable, Date timestamp) { + CommonEntityData ced = new CommonEntityData(this.id, -1, timestamp, OsmUser.NONE, 0); + tags.short2ShortEntrySet().forEach(t -> ced.getTags().add(new Tag(stringTable.getStringById(t.getShortKey()), stringTable.getStringById(t.getShortValue())))); + + Relation r = new Relation(ced, this.members.stream().map(LightRelationMember::toOsmiumEntity).toList()); + + return new RelationContainer(r); + + } +} diff --git a/mtk2garmin-converter/src/main/java/org/hylly/mtk2garmin/LightRelationMember.java b/mtk2garmin-converter/src/main/java/org/hylly/mtk2garmin/LightRelationMember.java new file mode 100644 index 0000000..dd16ce4 --- /dev/null +++ b/mtk2garmin-converter/src/main/java/org/hylly/mtk2garmin/LightRelationMember.java @@ -0,0 +1,18 @@ +package org.hylly.mtk2garmin; + +import org.openstreetmap.osmosis.core.domain.v0_6.EntityType; +import org.openstreetmap.osmosis.core.domain.v0_6.RelationMember; + +class LightRelationMember { + private final long id; + private final String role; + + public LightRelationMember(long id, String role) { + this.id = id; + this.role = role; + } + + public RelationMember toOsmiumEntity() { + return new RelationMember(this.id, EntityType.Way, this.role); + } +} diff --git a/mtk2garmin-converter/src/main/java/org/hylly/mtk2garmin/LightWay.java b/mtk2garmin-converter/src/main/java/org/hylly/mtk2garmin/LightWay.java new file mode 100644 index 0000000..9803ca7 --- /dev/null +++ b/mtk2garmin-converter/src/main/java/org/hylly/mtk2garmin/LightWay.java @@ -0,0 +1,48 @@ +package org.hylly.mtk2garmin; + +import it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap; +import it.unimi.dsi.fastutil.shorts.Short2ShortOpenHashMap; +import org.openstreetmap.osmosis.core.container.v0_6.WayContainer; +import org.openstreetmap.osmosis.core.domain.v0_6.CommonEntityData; +import org.openstreetmap.osmosis.core.domain.v0_6.OsmUser; +import org.openstreetmap.osmosis.core.domain.v0_6.Tag; +import org.openstreetmap.osmosis.core.domain.v0_6.Way; + +import java.util.ArrayList; +import java.util.Date; + +class LightWay { + final Short2ShortOpenHashMap tags = new Short2ShortOpenHashMap(); + long id; + String role = "all"; + ArrayList refs = new ArrayList<>(); + + public LightWay(long id) { + this.id = id; + } + + String getRole() { + return role; + } + + void setRole(String role) { + this.role = role; + } + + long getId() { + return id; + } + + public Short2ShortOpenHashMap getTags() { + return tags; + } + + public WayContainer toOsmiumEntity(Long2ObjectOpenHashMap nodes, StringTable stringTable, Date timestamp) { + CommonEntityData ced = new CommonEntityData(this.id, -1, timestamp, OsmUser.NONE, 0); + tags.short2ShortEntrySet().forEach(t -> ced.getTags().add(new Tag(stringTable.getStringById(t.getShortKey()), stringTable.getStringById(t.getShortValue())))); + + Way w = new Way(ced, refs.stream().map(nodeHash -> nodes.get(nodeHash.longValue()).toOsmiumWayNode()).toList()); + + return new WayContainer(w); + } +} diff --git a/mtk2garmin-converter/src/main/java/org/hylly/mtk2garmin/MMLTagHandler.java b/mtk2garmin-converter/src/main/java/org/hylly/mtk2garmin/MMLTagHandler.java index e6380af..795628a 100644 --- a/mtk2garmin-converter/src/main/java/org/hylly/mtk2garmin/MMLTagHandler.java +++ b/mtk2garmin-converter/src/main/java/org/hylly/mtk2garmin/MMLTagHandler.java @@ -3,7 +3,7 @@ import it.unimi.dsi.fastutil.objects.ObjectOpenHashSet; import it.unimi.dsi.fastutil.shorts.Short2ObjectMap.Entry; import it.unimi.dsi.fastutil.shorts.Short2ObjectOpenHashMap; -import it.unimi.dsi.fastutil.shorts.Short2ShortRBTreeMap; +import it.unimi.dsi.fastutil.shorts.Short2ShortMap; import java.util.Objects; @@ -56,7 +56,7 @@ public ObjectOpenHashSet getWantedFields() { } @Override - public void addElementTags(Short2ShortRBTreeMap tags, Short2ObjectOpenHashMap fields, String tyyppi, double geomarea) { + public void addElementTags(Short2ShortMap tags, Short2ObjectOpenHashMap fields, String tyyppi, double geomarea) { if (tags.get(teksti_kieli) == fin && !Objects.equals(fields.get(teksti_kieli), "fin")) { return; } @@ -66,7 +66,7 @@ public void addElementTags(Short2ShortRBTreeMap tags, Short2ObjectOpenHashMap stbuilder.addS(ByteString.copyFromUtf8(string))); - - System.out.println(stbuilder.getSCount() + " strings in OSMPBF stringtable from MTK2Garmin stringtable " + stringtable.getStringtableSize()); - //System.out.println(Arrays.deepToString(MTKToGarminConverter.stringTable.toArray())); - //System.out.println(Arrays.deepToString(MTKToGarminConverter.stringTableTranslate.entrySet().toArray())); - return stbuilder.build(); - } - - private Osmformat.PrimitiveBlock createOSMDataBlock( - StringTable stringtable, - Long2ObjectOpenHashMap nodes, Long2ObjectOpenHashMap ways, - Long2ObjectOpenHashMap relations) { - Osmformat.PrimitiveBlock.Builder pbbuilder = Osmformat.PrimitiveBlock - .newBuilder(); - pbbuilder.setGranularity(this.granularity); - pbbuilder.setLatOffset(this.lat_offset); - pbbuilder.setLonOffset(this.lon_offset); - pbbuilder.setDateGranularity(this.date_granularity); - - Osmformat.PrimitiveGroup pg = this.createOSMPrimitiveGroup(stringtable, nodes, ways, - relations); - pbbuilder.addPrimitivegroup(pg); - - pbbuilder.setStringtable(this.buildStringTable(stringtable)); - return pbbuilder.build(); - - } - - private Osmformat.PrimitiveGroup createOSMPrimitiveGroup( - StringTable stringtable, - Long2ObjectOpenHashMap nodes, Long2ObjectOpenHashMap ways, - Long2ObjectOpenHashMap relations) { - Osmformat.PrimitiveGroup.Builder pgbuilder = Osmformat.PrimitiveGroup - .newBuilder(); - if (ways != null) - pgbuilder.addAllWays(this.buildOSMWays(ways)); - if (relations != null) - pgbuilder.addAllRelations(this.buildOSMRelations(stringtable, relations)); - if (nodes != null) - pgbuilder.setDense(this.buildOSMDenseNodes(stringtable, nodes)); - - return pgbuilder.build(); - } - - private Osmformat.DenseNodes buildOSMDenseNodes( - StringTable stringtable, - final Long2ObjectOpenHashMap nodes) { - - Osmformat.DenseNodes.Builder dsb = Osmformat.DenseNodes.newBuilder(); - Osmformat.DenseInfo.Builder dib = Osmformat.DenseInfo.newBuilder(); - - long lid = 0, llat = 0, llon = 0; - - long pbflat, pbflon; - //Long[] node_keys_sorted = ArrayUtils.toObject(nodes.keySet().toLongArray()); - - Node[] nodes_sorted = new Node[nodes.size()]; - nodes.values().toArray(nodes_sorted); - Arrays.sort(nodes_sorted, (n1,n2) -> (int) (n1.getId()-n2.getId())); - - for (Node n : nodes_sorted) { - long id = n.getId(); - dsb.addId(id - lid); - - dib.addVersion(1); - dib.addUid(0); - dib.addUserSid(0); - dib.addTimestamp(0); - dib.addChangeset(0); - - lid = id; - - pbflat = this.topbfcoord(n.getLat()); - pbflon = this.topbfcoord(n.getLon()); - - dsb.addLat(pbflat - llat); - dsb.addLon(pbflon - llon); - - llat = pbflat; - llon = pbflon; - - Short2ShortRBTreeMap ntags = n.getTags(); - if (ntags != null) { - for (Entry t : ntags.short2ShortEntrySet()) { - if (t.getShortKey() > stringtable.getStringtableSize() || t.getShortValue() > stringtable.getStringtableSize()) { - - System.out.println("Node key error! " + t.getShortKey() + " or " + t.getShortValue() + " too large"); - } - dsb.addKeysVals(t.getShortKey()); - dsb.addKeysVals(t.getShortValue()); - } - } - - dsb.addKeysVals(0); - - } - - //System.out.println("Node ids: " + Arrays.toString(dsb.getKeysValsList().toArray())); - dsb.setDenseinfo(dib); - - return dsb.build(); - - } - - private ArrayList buildOSMWays(Long2ObjectOpenHashMap ways) { - ArrayList pbfways = new ArrayList<>(); - Osmformat.Info.Builder wib = Osmformat.Info.newBuilder(); - wib.setVersion(1); - long[] waykeys = ways.keySet().toLongArray(); - Arrays.sort(waykeys); - - for (long wk : waykeys) { - Way w = ways.get(wk); - Osmformat.Way.Builder wb = Osmformat.Way.newBuilder(); - - wb.setId(w.getId()); - wb.setInfo(wib); - - Short2ShortRBTreeMap wtags = w.getTags(); - for (Entry t : wtags.short2ShortEntrySet()) { - wb.addKeys(t.getShortKey()); - wb.addVals(t.getShortValue()); - } - - long lref = 0; - for (int i = 0; i < w.refs.size(); i++) { - long r = w.refs.get(i); - - wb.addRefs(r - lref); - lref = r; - } - - pbfways.add(wb.build()); - } - - return pbfways; - } - - private ArrayList buildOSMRelations( - StringTable stringtable, - Long2ObjectOpenHashMap relations) { - ArrayList pbfrels = new ArrayList<>(); - - Osmformat.Info.Builder rib = Osmformat.Info.newBuilder(); - rib.setVersion(1); - - long[] relkeys = relations.keySet().toLongArray(); - Arrays.sort(relkeys); - for (long rk : relkeys) { - Relation r = relations.get(rk); - Osmformat.Relation.Builder rb = Osmformat.Relation.newBuilder(); - rb.setId(r.getId()); - rb.setInfo(rib); - - Short2ShortRBTreeMap rtags = r.getTags(); - for (Entry t : rtags.short2ShortEntrySet()) { - rb.addKeys(t.getShortKey()); - rb.addVals(t.getShortValue()); - } - - long lmid = 0; - for (RelationMember m : r.getMembers()) { - rb.addRolesSid(stringtable.getStringId(m.getRole())); - rb.addMemids(m.getId() - lmid); - lmid = m.getId(); - switch (m.getType()) { - case "node": - rb.addTypes(Osmformat.Relation.MemberType.NODE); - break; - case "way": - rb.addTypes(Osmformat.Relation.MemberType.WAY); - break; - case "relation": - rb.addTypes(Osmformat.Relation.MemberType.RELATION); - break; - } - } - - pbfrels.add(rb.build()); - } - - return pbfrels; - } - - void writePBFElements(StringTable stringtable, - Long2ObjectOpenHashMap nodes, Long2ObjectOpenHashMap ways, - Long2ObjectOpenHashMap relations) throws IOException { - Osmformat.PrimitiveBlock pb = this - .createOSMDataBlock(stringtable, nodes, ways, relations); - PBFBlob data = this.createBlob("OSMData", pb.toByteArray()); - int header_sersize = data.header.getSerializedSize(); - od.writeInt(header_sersize); - data.header.writeTo(of); - data.body.writeTo(of); - - of.flush(); - } - - void writePBFHeaders() throws IOException { - this.writePBFHeaders(19.0900d, 59.3000d, 31.5900d, 70.1300d); - - } - - private void writePBFHeaders(double minx, double miny, - double maxx, double maxy) throws IOException { - this.of = new BufferedOutputStream(new FileOutputStream(this.outFile)); - this.od = new DataOutputStream(this.of); - - Osmformat.HeaderBlock hb = this.createOSMHeaderBlock(minx, miny, maxx, - maxy); - - PBFBlob head = this.createBlob("OSMHeader", hb.toByteArray()); - int header_sersize = head.header.getSerializedSize(); - od.writeInt(header_sersize); - head.header.writeTo(of); - head.body.writeTo(of); - - } - - void closePBF() throws IOException { - of.close(); - } - - private static class PBFBlob { - private Fileformat.BlobHeader header; - private Fileformat.Blob body; - - PBFBlob(String blobtype, byte[] payload) { - int size = payload.length; - Deflater deflater = new Deflater(); - deflater.setInput(payload); - deflater.finish(); - byte[] out = new byte[size]; - deflater.deflate(out); - - if (!deflater.finished()) { - out = Arrays.copyOf(out, size + size / 64 + 16); - deflater.deflate(out, deflater.getTotalOut(), out.length - - deflater.getTotalOut()); - if (!deflater.finished()) { - throw new Error("Internal error in compressor"); - } - } - ByteString compressed = ByteString.copyFrom(out, 0, - deflater.getTotalOut()); - - Fileformat.Blob.Builder bodybuilder = Fileformat.Blob.newBuilder(); - bodybuilder.setRawSize(size); - bodybuilder.setZlibData(compressed); - deflater.end(); - - this.body = bodybuilder.build(); - - Fileformat.BlobHeader.Builder headbuilder = Fileformat.BlobHeader - .newBuilder(); - - headbuilder.setType(blobtype); - headbuilder.setDatasize(this.body.getSerializedSize()); - - this.header = headbuilder.build(); - - } - } - -} diff --git a/mtk2garmin-converter/src/main/java/org/hylly/mtk2garmin/OSMPBFWriter.java b/mtk2garmin-converter/src/main/java/org/hylly/mtk2garmin/OSMPBFWriter.java index 5045680..cd8eef3 100644 --- a/mtk2garmin-converter/src/main/java/org/hylly/mtk2garmin/OSMPBFWriter.java +++ b/mtk2garmin-converter/src/main/java/org/hylly/mtk2garmin/OSMPBFWriter.java @@ -1,33 +1,54 @@ package org.hylly.mtk2garmin; +import crosby.binary.file.BlockOutputStream; +import crosby.binary.osmosis.OsmosisSerializer; import it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap; +import org.openstreetmap.osmosis.core.container.v0_6.NodeContainer; +import org.openstreetmap.osmosis.core.container.v0_6.RelationContainer; +import org.openstreetmap.osmosis.core.container.v0_6.WayContainer; import java.io.File; +import java.io.FileNotFoundException; +import java.io.FileOutputStream; import java.io.IOException; +import java.util.Comparator; +import java.util.Date; +import java.util.Map; +import java.util.stream.Stream; public class OSMPBFWriter { - private final File outFile; - private final OSMPBF op; + private final FileOutputStream outputStream; + private final OsmosisSerializer osmosisSerializer; + private final Date timestamp = new Date(); - OSMPBFWriter(File outFile) { - this.outFile = outFile; - op = new OSMPBF(this.outFile); + OSMPBFWriter(File outFile) throws FileNotFoundException { + this.outputStream = new FileOutputStream(outFile); + this.osmosisSerializer = new OsmosisSerializer(new BlockOutputStream(this.outputStream)); } - void startWritingOSMPBF() throws IOException { - op.writePBFHeaders(); + void startWritingOSMPBF() { + this.osmosisSerializer.writeEmptyHeaderIfNeeded(); } - void writeOSMPBFElements(StringTable stringtable, Long2ObjectOpenHashMap nodes, Long2ObjectOpenHashMap ways, Long2ObjectOpenHashMap relations) throws IOException { - op.writePBFElements(stringtable, nodes, null, null); - op.writePBFElements(stringtable, null, ways, null); - op.writePBFElements(stringtable, null, null, relations); - - // this.initElements(); + void writeOSMPBFElements( + StringTable stringTable, + Long2ObjectOpenHashMap nodes, + Long2ObjectOpenHashMap ways, + Long2ObjectOpenHashMap relations + ) { + Stream osmiumNodes = nodes.long2ObjectEntrySet().stream().parallel().map(Map.Entry::getValue).sorted(Comparator.comparingLong(LightNode::getId)).map(n -> n.toOsmiumEntity(stringTable, timestamp)); + osmiumNodes.sequential().forEach(this.osmosisSerializer::process); + + Stream osmiumsWays = ways.long2ObjectEntrySet().stream().parallel().map(Map.Entry::getValue).sorted(Comparator.comparingLong(LightWay::getId)).map(w -> w.toOsmiumEntity(nodes, stringTable, timestamp)); + osmiumsWays.sequential().forEach(this.osmosisSerializer::process); + + Stream osmiumRelations = relations.long2ObjectEntrySet().stream().map(Map.Entry::getValue).sorted(Comparator.comparingLong(LightRelation::getId)).map(r -> r.toOsmiumEntity(stringTable, timestamp)); + osmiumRelations.sequential().forEach(this.osmosisSerializer::process); } void closeOSMPBFFile() throws IOException { - op.closePBF(); + this.osmosisSerializer.complete(); + this.outputStream.close(); } } diff --git a/mtk2garmin-converter/src/main/java/org/hylly/mtk2garmin/Relation.java b/mtk2garmin-converter/src/main/java/org/hylly/mtk2garmin/Relation.java deleted file mode 100644 index 3ab1ba4..0000000 --- a/mtk2garmin-converter/src/main/java/org/hylly/mtk2garmin/Relation.java +++ /dev/null @@ -1,27 +0,0 @@ -package org.hylly.mtk2garmin; - -import it.unimi.dsi.fastutil.shorts.Short2ShortRBTreeMap; - -import java.util.ArrayList; - -class Relation { - final Short2ShortRBTreeMap tags = new Short2ShortRBTreeMap(); - final ArrayList members = new ArrayList<>(); - long id; - - long getId() { - return id; - } - - void setId(long id) { - this.id = id; - } - - Short2ShortRBTreeMap getTags() { - return tags; - } - - ArrayList getMembers() { - return members; - } -} diff --git a/mtk2garmin-converter/src/main/java/org/hylly/mtk2garmin/RelationMember.java b/mtk2garmin-converter/src/main/java/org/hylly/mtk2garmin/RelationMember.java deleted file mode 100644 index b568757..0000000 --- a/mtk2garmin-converter/src/main/java/org/hylly/mtk2garmin/RelationMember.java +++ /dev/null @@ -1,31 +0,0 @@ -package org.hylly.mtk2garmin; - -class RelationMember { - long id; - String type; - String role; - - long getId() { - return id; - } - - void setId(long id) { - this.id = id; - } - - public String getType() { - return type; - } - - void setType() { - this.type = "way"; - } - - String getRole() { - return role; - } - - void setRole(String role) { - this.role = role; - } -} diff --git a/mtk2garmin-converter/src/main/java/org/hylly/mtk2garmin/ShapeRetkeilyTagHandler.java b/mtk2garmin-converter/src/main/java/org/hylly/mtk2garmin/ShapeRetkeilyTagHandler.java index 6027ffe..7458e8d 100644 --- a/mtk2garmin-converter/src/main/java/org/hylly/mtk2garmin/ShapeRetkeilyTagHandler.java +++ b/mtk2garmin-converter/src/main/java/org/hylly/mtk2garmin/ShapeRetkeilyTagHandler.java @@ -3,7 +3,7 @@ import it.unimi.dsi.fastutil.objects.ObjectOpenHashSet; import it.unimi.dsi.fastutil.shorts.Short2ObjectMap.Entry; import it.unimi.dsi.fastutil.shorts.Short2ObjectOpenHashMap; -import it.unimi.dsi.fastutil.shorts.Short2ShortRBTreeMap; +import it.unimi.dsi.fastutil.shorts.Short2ShortMap; import java.util.Arrays; @@ -29,7 +29,7 @@ public ObjectOpenHashSet getWantedFields() { } @Override - public void addElementTags(Short2ShortRBTreeMap tags, Short2ObjectOpenHashMap fields, String tyyppi, double geomarea) { + public void addElementTags(Short2ShortMap tags, Short2ObjectOpenHashMap fields, String tyyppi, double geomarea) { for (Entry k : fields.short2ObjectEntrySet()) { String val = k.getValue(); diff --git a/mtk2garmin-converter/src/main/java/org/hylly/mtk2garmin/ShapeSyvyysTagHandler.java b/mtk2garmin-converter/src/main/java/org/hylly/mtk2garmin/ShapeSyvyysTagHandler.java index ba7f121..cc3be55 100644 --- a/mtk2garmin-converter/src/main/java/org/hylly/mtk2garmin/ShapeSyvyysTagHandler.java +++ b/mtk2garmin-converter/src/main/java/org/hylly/mtk2garmin/ShapeSyvyysTagHandler.java @@ -3,7 +3,7 @@ import it.unimi.dsi.fastutil.objects.ObjectOpenHashSet; import it.unimi.dsi.fastutil.shorts.Short2ObjectMap.Entry; import it.unimi.dsi.fastutil.shorts.Short2ObjectOpenHashMap; -import it.unimi.dsi.fastutil.shorts.Short2ShortRBTreeMap; +import it.unimi.dsi.fastutil.shorts.Short2ShortMap; import java.util.Arrays; @@ -31,14 +31,14 @@ public ObjectOpenHashSet getWantedFields() { } @Override - public void addElementTags(Short2ShortRBTreeMap tags, Short2ObjectOpenHashMap fields, String tyyppi, double geomarea) { + public void addElementTags(Short2ShortMap tags, Short2ObjectOpenHashMap fields, String tyyppi, double geomarea) { for (Entry k : fields.short2ObjectEntrySet()) { String val = k.getValue(); short key = k.getShortKey(); if (key == depthContour || key == depthSounding) { key = ele; - val = String.format("%.1f", Float.valueOf(Float.parseFloat(val))); + val = String.format("%.1f", Float.parseFloat(val)); } diff --git a/mtk2garmin-converter/src/main/java/org/hylly/mtk2garmin/SingleCellConverter.java b/mtk2garmin-converter/src/main/java/org/hylly/mtk2garmin/SingleCellConverter.java index 8c78a2b..35fa6d8 100644 --- a/mtk2garmin-converter/src/main/java/org/hylly/mtk2garmin/SingleCellConverter.java +++ b/mtk2garmin-converter/src/main/java/org/hylly/mtk2garmin/SingleCellConverter.java @@ -4,7 +4,6 @@ import it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap; import it.unimi.dsi.fastutil.shorts.Short2ObjectOpenHashMap; import org.gdal.ogr.*; -import org.gdal.osr.CoordinateTransformation; import org.gdal.osr.SpatialReference; import java.io.File; @@ -19,7 +18,7 @@ public class SingleCellConverter { private final boolean isValidCell; - private Logger logger = Logger.getLogger(CachedAdditionalDataSources.class.getName()); + private final Logger logger = Logger.getLogger(SingleCellConverter.class.getName()); private final File cellFile; private final Path outdir; @@ -52,10 +51,11 @@ public class SingleCellConverter { private final Set rightLetters = new HashSet<>( Arrays.asList("E", "F", "G", "H")); - private final Long2ObjectOpenHashMap nodes = new Long2ObjectOpenHashMap<>(50000); - private final Long2ObjectOpenHashMap ways = new Long2ObjectOpenHashMap<>(5000); - private final Long2ObjectOpenHashMap relations = new Long2ObjectOpenHashMap<>(500); - private CoordinateTransformation srctowgs; + private final Long2ObjectOpenHashMap nodes = new Long2ObjectOpenHashMap<>(50000); + private final Long2ObjectOpenHashMap ways = new Long2ObjectOpenHashMap<>(5000); + private final Long2ObjectOpenHashMap relations = new Long2ObjectOpenHashMap<>(500); + private GeomTransformer sphericToWGS; + private GeomTransformer srcToSphericMerc; SingleCellConverter( File cellFile, @@ -137,19 +137,14 @@ void doConvert() throws IOException { } private TagHandlerI getTagHandlerForDatasource(DataSource ds) { - switch (ds.GetLayer(0).GetName()) { - case "syvyyskayra_v": - case "syvyyspiste_p": - return syvyysTagHandler; - case "kesaretkeilyreitit": - case "ulkoilureitit": - case "luontopolut": - case "point_dump": - return retkeilyTagHandler; - default: + return switch (ds.GetLayer(0).GetName()) { + case "syvyyskayra_v", "syvyyspiste_p" -> syvyysTagHandler; + case "kesaretkeilyreitit", "ulkoilureitit", "luontopolut", "point_dump" -> retkeilyTagHandler; + default -> { logger.severe("Unknown cached datasource ds name " + ds.GetLayer(0).GetName()); - return null; - } + yield null; + } + }; } private DataSource startReadingOGRFile(String fn) { @@ -207,7 +202,7 @@ private DataSource readOGRsource(StringTable stringtable, DataSource ods, Featur ignored_fields.addAll(ignoredFields); - if (lyr.TestCapability(ogr.OLCIgnoreFields) && ignoredFields.size() > 0) { + if (lyr.TestCapability(ogr.OLCIgnoreFields) && !ignoredFields.isEmpty()) { lyr.SetIgnoredFields(ignoredFields); } @@ -223,7 +218,7 @@ private DataSource readOGRsource(StringTable stringtable, DataSource ods, Featur logger.severe("NULL feature encountered on layer " + lyr.GetName()); return; } - if (!this.handleFeature(stringtable, lyr.GetName(), fieldMapping, feat, featurePreprocess, tagHandler)) { + if (!this.handleFeature(stringtable, lyr.GetName(), fieldMapping, feat, tagHandler)) { System.out.println("BREAK"); breakLayerLoop.set(true); } @@ -243,7 +238,7 @@ private void printCounts() { } private boolean handleFeature(StringTable stringtable, String lyrname, ArrayList fieldMapping, Feature feat, - FeaturePreprocessI featurePreprocess, TagHandlerI tagHandler) { + TagHandlerI tagHandler) { Short2ObjectOpenHashMap fields = new Short2ObjectOpenHashMap<>(); Geometry geom; for (Field f : fieldMapping) { @@ -256,14 +251,15 @@ private boolean handleFeature(StringTable stringtable, String lyrname, ArrayList if (geom == null) return true; - - geom = geom.SimplifyPreserveTopology(0.5); - - if (srctowgs == null) { + if (sphericToWGS == null || srcToSphericMerc == null) { SpatialReference sref = geom.GetSpatialReference(); - srctowgs = this.geomUtils.getTransformationToWGS84(sref.ExportToProj4()); + sphericToWGS = this.geomUtils.spherictowgs; + srcToSphericMerc = this.geomUtils.getTransformationToSphereMercator(sref.ExportToProj4()); } + geom = geom.Transform(srcToSphericMerc); + geom = geom.SimplifyPreserveTopology(0.5); + GeomHandlerResult ghr; if (geom == null) return true; @@ -285,9 +281,9 @@ private boolean handleFeature(StringTable stringtable, String lyrname, ArrayList short tyyppi_value_id = stringtable.getStringId(tyyppi); - for (Node n : ghr.nodes) { + for (LightNode n : ghr.lightNodes) { - if (!n.isWaypart()) { + if (!n.isWayPart()) { n.addTag(tyyppi_string_id, tyyppi_value_id); tagHandler.addElementTags(n.nodeTags, fields, tyyppi, geomarea); } @@ -297,7 +293,7 @@ private boolean handleFeature(StringTable stringtable, String lyrname, ArrayList } } - for (Way w : ghr.ways) { + for (LightWay w : ghr.lightWays) { if (!w.getRole().equals("inner")) { w.tags.put(tyyppi_string_id, tyyppi_value_id); tagHandler.addElementTags(w.tags, fields, tyyppi, geomarea); @@ -307,7 +303,7 @@ private boolean handleFeature(StringTable stringtable, String lyrname, ArrayList } } - for (Relation r : ghr.relations) { + for (LightRelation r : ghr.lightRelations) { r.tags.put(tyyppi_string_id, tyyppi_value_id); tagHandler.addElementTags(r.tags, fields, tyyppi, geomarea); @@ -323,61 +319,55 @@ private GeomHandlerResult handleSingleGeom(Geometry geom) { GeomHandlerResult ghr = new GeomHandlerResult(); - if (geom.IsEmpty()) + Geometry wgsgeom = geom.Transform(sphericToWGS); + if (geom.IsEmpty() || wgsgeom.IsEmpty()) { return ghr; + } - boolean ispoint = geom.GetGeometryType() == ogr.wkbPoint || geom.GetGeometryType() == ogr.wkbPoint25D; - - double[][] srcpoints = geom.GetPoints(); - double[][] wgspoints = geom.GetPoints(); + boolean isPoint = geom.GetGeometryType() == ogr.wkbPoint || geom.GetGeometryType() == ogr.wkbPoint25D; - srctowgs.TransformPoints(wgspoints); - Way w = null; + LightWay w = null; long wid; - if (!ispoint) { + if (!isPoint) { wid = featureIDProvider.getWayID(); - w = new Way(); - w.id = wid; + w = new LightWay(wid); } - for (int i = 0; i < srcpoints.length; i++) { + for (int i = 0; i < geom.GetPointCount(); i++) { - long phash = geomUtils.hashCoords(srcpoints[i][0], srcpoints[i][1]); - int pcell = geomUtils.xy2grid(srcpoints[i][0], srcpoints[i][1]); + long phash = geomUtils.hashCoords(geom.GetX(i), geom.GetY(i)); + int pcell = geomUtils.xy2grid(geom.GetX(i), geom.GetY(i)); if (!nodes.containsKey(phash)) { nodeCache.ensureGrid(pcell); Optional cachedNodeId = nodeCache.getNodeId(pcell,phash); - long nodeid; + long nodeID; if (cachedNodeId.isPresent()) { - nodeid = cachedNodeId.get(); + nodeID = cachedNodeId.get(); } else { - nodeid = featureIDProvider.getNodeID(); - if (this.nodeNearCellBorder(srcpoints[i])) { - nodeCache.addNodeId(pcell, phash, nodeid); + nodeID = featureIDProvider.getNodeID(); + if (this.nodeNearCellBorder(geom.GetPoint(i))) { + nodeCache.addNodeId(pcell, phash, nodeID); } } - Node n = new Node(nodeid, phash, pcell, wgspoints[i][0], wgspoints[i][1], !ispoint); + LightNode n = new LightNode(nodeID, phash, wgsgeom.GetX(i), wgsgeom.GetY(i), !isPoint); nodes.put(phash, n); - ghr.nodes.add(n); - if (!ispoint) { - w.refs.add(n.getId()); - } + ghr.lightNodes.add(n); } else { - Node n = nodes.get(phash); - n.waypart = n.waypart || !ispoint; - ghr.nodes.add(n); - if (!ispoint) { - w.refs.add(n.getId()); - } + LightNode n = nodes.get(phash); + n.wayPart = n.wayPart || !isPoint; + ghr.lightNodes.add(n); + } + if (!isPoint) { + w.refs.add(phash); } } if (w != null) { - ghr.ways.add(w); + ghr.lightWays.add(w); } return ghr; @@ -405,14 +395,14 @@ private GeomHandlerResult handleMultiGeom(short type, short multipolygon, Geomet for (int i = 0; i < geom.GetGeometryCount(); i++) { igeom = geom.GetGeometryRef(i); ighr = this.handleSingleGeom(igeom); - ghr.nodes.addAll(ighr.nodes); - ghr.ways.addAll(ighr.ways); + ghr.lightNodes.addAll(ighr.lightNodes); + ghr.lightWays.addAll(ighr.lightWays); } return ghr; } long rid = featureIDProvider.getRelationID(); - Relation r = new Relation(); + LightRelation r = new LightRelation(); r.setId(rid); r.tags.put(type, multipolygon); @@ -420,23 +410,20 @@ private GeomHandlerResult handleMultiGeom(short type, short multipolygon, Geomet igeom = geom.GetGeometryRef(i); ighr = this.handleSingleGeom(igeom); - if (ighr.ways.size() == 0) { + if (ighr.lightWays.isEmpty()) { return new GeomHandlerResult(); } - ighr.ways.get(0).setRole((i == 0 ? "outer" : "inner")); - - ghr.nodes.addAll(ighr.nodes); - ghr.ways.addAll(ighr.ways); + String role = i == 0 ? "outer" : "inner"; + ighr.lightWays.getFirst().setRole(role); - RelationMember rm = new RelationMember(); + ghr.lightNodes.addAll(ighr.lightNodes); + ghr.lightWays.addAll(ighr.lightWays); - rm.setId(ighr.ways.get(0).getId()); - rm.setType(); - rm.setRole((i == 0 ? "outer" : "inner")); + LightRelationMember rm = new LightRelationMember(ighr.lightWays.getFirst().getId(), role); r.members.add(rm); } - ghr.relations.add(r); + ghr.lightRelations.add(r); return ghr; } diff --git a/mtk2garmin-converter/src/main/java/org/hylly/mtk2garmin/StringTable.java b/mtk2garmin-converter/src/main/java/org/hylly/mtk2garmin/StringTable.java index 54557ee..8126a35 100644 --- a/mtk2garmin-converter/src/main/java/org/hylly/mtk2garmin/StringTable.java +++ b/mtk2garmin-converter/src/main/java/org/hylly/mtk2garmin/StringTable.java @@ -7,7 +7,6 @@ class StringTable { private final Object2ShortOpenHashMap stringTableTranslate = new Object2ShortOpenHashMap<>(); private final ObjectArrayList stringTable = new ObjectArrayList<>(); - StringTable() { stringTable.add(""); } @@ -24,17 +23,9 @@ short getStringId(String stringKey) { } - String getStringById(int id) { return this.stringTable.get(id); } - ObjectArrayList getStringTable() { - return stringTable; - } - - int getStringtableSize() { - return stringTable.size(); - } } diff --git a/mtk2garmin-converter/src/main/java/org/hylly/mtk2garmin/TagHandlerI.java b/mtk2garmin-converter/src/main/java/org/hylly/mtk2garmin/TagHandlerI.java index 5efb785..15cdb01 100644 --- a/mtk2garmin-converter/src/main/java/org/hylly/mtk2garmin/TagHandlerI.java +++ b/mtk2garmin-converter/src/main/java/org/hylly/mtk2garmin/TagHandlerI.java @@ -3,10 +3,10 @@ import it.unimi.dsi.fastutil.objects.ObjectOpenHashSet; import it.unimi.dsi.fastutil.shorts.Short2ObjectOpenHashMap; -import it.unimi.dsi.fastutil.shorts.Short2ShortRBTreeMap; +import it.unimi.dsi.fastutil.shorts.Short2ShortMap; interface TagHandlerI { ObjectOpenHashSet getWantedFields(); - void addElementTags(Short2ShortRBTreeMap tags, Short2ObjectOpenHashMap fields, String tyyppi, double geomarea); + void addElementTags(Short2ShortMap tags, Short2ObjectOpenHashMap fields, String tyyppi, double geomarea); } diff --git a/mtk2garmin-converter/src/main/java/org/hylly/mtk2garmin/Way.java b/mtk2garmin-converter/src/main/java/org/hylly/mtk2garmin/Way.java deleted file mode 100644 index ff79c3f..0000000 --- a/mtk2garmin-converter/src/main/java/org/hylly/mtk2garmin/Way.java +++ /dev/null @@ -1,33 +0,0 @@ -package org.hylly.mtk2garmin; - -import it.unimi.dsi.fastutil.longs.LongArrayList; -import it.unimi.dsi.fastutil.shorts.Short2ShortRBTreeMap; - -import java.util.ArrayList; - -class Way { - final Short2ShortRBTreeMap tags = new Short2ShortRBTreeMap(); - long id; - String role = "all"; - ArrayList refs = new ArrayList<>(); - - Way() { - - } - - String getRole() { - return role; - } - - void setRole(String role) { - this.role = role; - } - - long getId() { - return id; - } - - public Short2ShortRBTreeMap getTags() { - return tags; - } -} diff --git a/mtk2garmin-converter/src/main/java/org/openstreetmap/osmosis/osmbinary/Fileformat.java b/mtk2garmin-converter/src/main/java/org/openstreetmap/osmosis/osmbinary/Fileformat.java deleted file mode 100644 index 8d26fd6..0000000 --- a/mtk2garmin-converter/src/main/java/org/openstreetmap/osmosis/osmbinary/Fileformat.java +++ /dev/null @@ -1,1948 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: fileformat.proto - -package org.openstreetmap.osmosis.osmbinary; - -public final class Fileformat { - private Fileformat() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - public interface BlobOrBuilder extends - // @@protoc_insertion_point(interface_extends:OSMPBF.Blob) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * No compression
-     * 
- * - * optional bytes raw = 1; - * @return Whether the raw field is set. - */ - boolean hasRaw(); - /** - *
-     * No compression
-     * 
- * - * optional bytes raw = 1; - * @return The raw. - */ - com.google.protobuf.ByteString getRaw(); - - /** - *
-     * When compressed, the uncompressed size
-     * 
- * - * optional int32 raw_size = 2; - * @return Whether the rawSize field is set. - */ - boolean hasRawSize(); - /** - *
-     * When compressed, the uncompressed size
-     * 
- * - * optional int32 raw_size = 2; - * @return The rawSize. - */ - int getRawSize(); - - /** - *
-     * Possible compressed versions of the data.
-     * 
- * - * optional bytes zlib_data = 3; - * @return Whether the zlibData field is set. - */ - boolean hasZlibData(); - /** - *
-     * Possible compressed versions of the data.
-     * 
- * - * optional bytes zlib_data = 3; - * @return The zlibData. - */ - com.google.protobuf.ByteString getZlibData(); - - /** - *
-     * PROPOSED feature for LZMA compressed data. SUPPORT IS NOT REQUIRED.
-     * 
- * - * optional bytes lzma_data = 4; - * @return Whether the lzmaData field is set. - */ - boolean hasLzmaData(); - /** - *
-     * PROPOSED feature for LZMA compressed data. SUPPORT IS NOT REQUIRED.
-     * 
- * - * optional bytes lzma_data = 4; - * @return The lzmaData. - */ - com.google.protobuf.ByteString getLzmaData(); - - /** - *
-     * Formerly used for bzip2 compressed data. Depreciated in 2010.
-     * 
- * - * optional bytes OBSOLETE_bzip2_data = 5 [deprecated = true]; - * @return Whether the oBSOLETEBzip2Data field is set. - */ - @Deprecated boolean hasOBSOLETEBzip2Data(); - /** - *
-     * Formerly used for bzip2 compressed data. Depreciated in 2010.
-     * 
- * - * optional bytes OBSOLETE_bzip2_data = 5 [deprecated = true]; - * @return The oBSOLETEBzip2Data. - */ - @Deprecated com.google.protobuf.ByteString getOBSOLETEBzip2Data(); - } - /** - * Protobuf type {@code OSMPBF.Blob} - */ - public static final class Blob extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:OSMPBF.Blob) - BlobOrBuilder { - private static final long serialVersionUID = 0L; - // Use Blob.newBuilder() to construct. - private Blob(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Blob() { - raw_ = com.google.protobuf.ByteString.EMPTY; - zlibData_ = com.google.protobuf.ByteString.EMPTY; - lzmaData_ = com.google.protobuf.ByteString.EMPTY; - oBSOLETEBzip2Data_ = com.google.protobuf.ByteString.EMPTY; - } - - @Override - @SuppressWarnings({"unused"}) - protected Object newInstance( - UnusedPrivateParameter unused) { - return new Blob(); - } - - @Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Blob( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - bitField0_ |= 0x00000001; - raw_ = input.readBytes(); - break; - } - case 16: { - bitField0_ |= 0x00000002; - rawSize_ = input.readInt32(); - break; - } - case 26: { - bitField0_ |= 0x00000004; - zlibData_ = input.readBytes(); - break; - } - case 34: { - bitField0_ |= 0x00000008; - lzmaData_ = input.readBytes(); - break; - } - case 42: { - bitField0_ |= 0x00000010; - oBSOLETEBzip2Data_ = input.readBytes(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return Fileformat.internal_static_OSMPBF_Blob_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return Fileformat.internal_static_OSMPBF_Blob_fieldAccessorTable - .ensureFieldAccessorsInitialized( - Fileformat.Blob.class, Fileformat.Blob.Builder.class); - } - - private int bitField0_; - public static final int RAW_FIELD_NUMBER = 1; - private com.google.protobuf.ByteString raw_; - /** - *
-     * No compression
-     * 
- * - * optional bytes raw = 1; - * @return Whether the raw field is set. - */ - public boolean hasRaw() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-     * No compression
-     * 
- * - * optional bytes raw = 1; - * @return The raw. - */ - public com.google.protobuf.ByteString getRaw() { - return raw_; - } - - public static final int RAW_SIZE_FIELD_NUMBER = 2; - private int rawSize_; - /** - *
-     * When compressed, the uncompressed size
-     * 
- * - * optional int32 raw_size = 2; - * @return Whether the rawSize field is set. - */ - public boolean hasRawSize() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - *
-     * When compressed, the uncompressed size
-     * 
- * - * optional int32 raw_size = 2; - * @return The rawSize. - */ - public int getRawSize() { - return rawSize_; - } - - public static final int ZLIB_DATA_FIELD_NUMBER = 3; - private com.google.protobuf.ByteString zlibData_; - /** - *
-     * Possible compressed versions of the data.
-     * 
- * - * optional bytes zlib_data = 3; - * @return Whether the zlibData field is set. - */ - public boolean hasZlibData() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - *
-     * Possible compressed versions of the data.
-     * 
- * - * optional bytes zlib_data = 3; - * @return The zlibData. - */ - public com.google.protobuf.ByteString getZlibData() { - return zlibData_; - } - - public static final int LZMA_DATA_FIELD_NUMBER = 4; - private com.google.protobuf.ByteString lzmaData_; - /** - *
-     * PROPOSED feature for LZMA compressed data. SUPPORT IS NOT REQUIRED.
-     * 
- * - * optional bytes lzma_data = 4; - * @return Whether the lzmaData field is set. - */ - public boolean hasLzmaData() { - return ((bitField0_ & 0x00000008) != 0); - } - /** - *
-     * PROPOSED feature for LZMA compressed data. SUPPORT IS NOT REQUIRED.
-     * 
- * - * optional bytes lzma_data = 4; - * @return The lzmaData. - */ - public com.google.protobuf.ByteString getLzmaData() { - return lzmaData_; - } - - public static final int OBSOLETE_BZIP2_DATA_FIELD_NUMBER = 5; - private com.google.protobuf.ByteString oBSOLETEBzip2Data_; - /** - *
-     * Formerly used for bzip2 compressed data. Depreciated in 2010.
-     * 
- * - * optional bytes OBSOLETE_bzip2_data = 5 [deprecated = true]; - * @return Whether the oBSOLETEBzip2Data field is set. - */ - @Deprecated public boolean hasOBSOLETEBzip2Data() { - return ((bitField0_ & 0x00000010) != 0); - } - /** - *
-     * Formerly used for bzip2 compressed data. Depreciated in 2010.
-     * 
- * - * optional bytes OBSOLETE_bzip2_data = 5 [deprecated = true]; - * @return The oBSOLETEBzip2Data. - */ - @Deprecated public com.google.protobuf.ByteString getOBSOLETEBzip2Data() { - return oBSOLETEBzip2Data_; - } - - private byte memoizedIsInitialized = -1; - @Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) != 0)) { - output.writeBytes(1, raw_); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeInt32(2, rawSize_); - } - if (((bitField0_ & 0x00000004) != 0)) { - output.writeBytes(3, zlibData_); - } - if (((bitField0_ & 0x00000008) != 0)) { - output.writeBytes(4, lzmaData_); - } - if (((bitField0_ & 0x00000010) != 0)) { - output.writeBytes(5, oBSOLETEBzip2Data_); - } - unknownFields.writeTo(output); - } - - @Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, raw_); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, rawSize_); - } - if (((bitField0_ & 0x00000004) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(3, zlibData_); - } - if (((bitField0_ & 0x00000008) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(4, lzmaData_); - } - if (((bitField0_ & 0x00000010) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(5, oBSOLETEBzip2Data_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @Override - public boolean equals(final Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof Fileformat.Blob)) { - return super.equals(obj); - } - Fileformat.Blob other = (Fileformat.Blob) obj; - - if (hasRaw() != other.hasRaw()) return false; - if (hasRaw()) { - if (!getRaw() - .equals(other.getRaw())) return false; - } - if (hasRawSize() != other.hasRawSize()) return false; - if (hasRawSize()) { - if (getRawSize() - != other.getRawSize()) return false; - } - if (hasZlibData() != other.hasZlibData()) return false; - if (hasZlibData()) { - if (!getZlibData() - .equals(other.getZlibData())) return false; - } - if (hasLzmaData() != other.hasLzmaData()) return false; - if (hasLzmaData()) { - if (!getLzmaData() - .equals(other.getLzmaData())) return false; - } - if (hasOBSOLETEBzip2Data() != other.hasOBSOLETEBzip2Data()) return false; - if (hasOBSOLETEBzip2Data()) { - if (!getOBSOLETEBzip2Data() - .equals(other.getOBSOLETEBzip2Data())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasRaw()) { - hash = (37 * hash) + RAW_FIELD_NUMBER; - hash = (53 * hash) + getRaw().hashCode(); - } - if (hasRawSize()) { - hash = (37 * hash) + RAW_SIZE_FIELD_NUMBER; - hash = (53 * hash) + getRawSize(); - } - if (hasZlibData()) { - hash = (37 * hash) + ZLIB_DATA_FIELD_NUMBER; - hash = (53 * hash) + getZlibData().hashCode(); - } - if (hasLzmaData()) { - hash = (37 * hash) + LZMA_DATA_FIELD_NUMBER; - hash = (53 * hash) + getLzmaData().hashCode(); - } - if (hasOBSOLETEBzip2Data()) { - hash = (37 * hash) + OBSOLETE_BZIP2_DATA_FIELD_NUMBER; - hash = (53 * hash) + getOBSOLETEBzip2Data().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static Fileformat.Blob parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static Fileformat.Blob parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static Fileformat.Blob parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static Fileformat.Blob parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static Fileformat.Blob parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static Fileformat.Blob parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static Fileformat.Blob parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static Fileformat.Blob parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static Fileformat.Blob parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static Fileformat.Blob parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static Fileformat.Blob parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static Fileformat.Blob parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(Fileformat.Blob prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @Override - protected Builder newBuilderForType( - BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code OSMPBF.Blob} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:OSMPBF.Blob) - Fileformat.BlobOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return Fileformat.internal_static_OSMPBF_Blob_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return Fileformat.internal_static_OSMPBF_Blob_fieldAccessorTable - .ensureFieldAccessorsInitialized( - Fileformat.Blob.class, Fileformat.Blob.Builder.class); - } - - // Construct using Fileformat.Blob.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @Override - public Builder clear() { - super.clear(); - raw_ = com.google.protobuf.ByteString.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - rawSize_ = 0; - bitField0_ = (bitField0_ & ~0x00000002); - zlibData_ = com.google.protobuf.ByteString.EMPTY; - bitField0_ = (bitField0_ & ~0x00000004); - lzmaData_ = com.google.protobuf.ByteString.EMPTY; - bitField0_ = (bitField0_ & ~0x00000008); - oBSOLETEBzip2Data_ = com.google.protobuf.ByteString.EMPTY; - bitField0_ = (bitField0_ & ~0x00000010); - return this; - } - - @Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return Fileformat.internal_static_OSMPBF_Blob_descriptor; - } - - @Override - public Fileformat.Blob getDefaultInstanceForType() { - return Fileformat.Blob.getDefaultInstance(); - } - - @Override - public Fileformat.Blob build() { - Fileformat.Blob result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @Override - public Fileformat.Blob buildPartial() { - Fileformat.Blob result = new Fileformat.Blob(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - to_bitField0_ |= 0x00000001; - } - result.raw_ = raw_; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.rawSize_ = rawSize_; - to_bitField0_ |= 0x00000002; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - to_bitField0_ |= 0x00000004; - } - result.zlibData_ = zlibData_; - if (((from_bitField0_ & 0x00000008) != 0)) { - to_bitField0_ |= 0x00000008; - } - result.lzmaData_ = lzmaData_; - if (((from_bitField0_ & 0x00000010) != 0)) { - to_bitField0_ |= 0x00000010; - } - result.oBSOLETEBzip2Data_ = oBSOLETEBzip2Data_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - @Override - public Builder clone() { - return super.clone(); - } - @Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.setField(field, value); - } - @Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, Object value) { - return super.setRepeatedField(field, index, value); - } - @Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.addRepeatedField(field, value); - } - @Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof Fileformat.Blob) { - return mergeFrom((Fileformat.Blob)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(Fileformat.Blob other) { - if (other == Fileformat.Blob.getDefaultInstance()) return this; - if (other.hasRaw()) { - setRaw(other.getRaw()); - } - if (other.hasRawSize()) { - setRawSize(other.getRawSize()); - } - if (other.hasZlibData()) { - setZlibData(other.getZlibData()); - } - if (other.hasLzmaData()) { - setLzmaData(other.getLzmaData()); - } - if (other.hasOBSOLETEBzip2Data()) { - setOBSOLETEBzip2Data(other.getOBSOLETEBzip2Data()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @Override - public final boolean isInitialized() { - return true; - } - - @Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - Fileformat.Blob parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (Fileformat.Blob) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.protobuf.ByteString raw_ = com.google.protobuf.ByteString.EMPTY; - /** - *
-       * No compression
-       * 
- * - * optional bytes raw = 1; - * @return Whether the raw field is set. - */ - public boolean hasRaw() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-       * No compression
-       * 
- * - * optional bytes raw = 1; - * @return The raw. - */ - public com.google.protobuf.ByteString getRaw() { - return raw_; - } - /** - *
-       * No compression
-       * 
- * - * optional bytes raw = 1; - * @param value The raw to set. - * @return This builder for chaining. - */ - public Builder setRaw(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - raw_ = value; - onChanged(); - return this; - } - /** - *
-       * No compression
-       * 
- * - * optional bytes raw = 1; - * @return This builder for chaining. - */ - public Builder clearRaw() { - bitField0_ = (bitField0_ & ~0x00000001); - raw_ = getDefaultInstance().getRaw(); - onChanged(); - return this; - } - - private int rawSize_ ; - /** - *
-       * When compressed, the uncompressed size
-       * 
- * - * optional int32 raw_size = 2; - * @return Whether the rawSize field is set. - */ - public boolean hasRawSize() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - *
-       * When compressed, the uncompressed size
-       * 
- * - * optional int32 raw_size = 2; - * @return The rawSize. - */ - public int getRawSize() { - return rawSize_; - } - /** - *
-       * When compressed, the uncompressed size
-       * 
- * - * optional int32 raw_size = 2; - * @param value The rawSize to set. - * @return This builder for chaining. - */ - public Builder setRawSize(int value) { - bitField0_ |= 0x00000002; - rawSize_ = value; - onChanged(); - return this; - } - /** - *
-       * When compressed, the uncompressed size
-       * 
- * - * optional int32 raw_size = 2; - * @return This builder for chaining. - */ - public Builder clearRawSize() { - bitField0_ = (bitField0_ & ~0x00000002); - rawSize_ = 0; - onChanged(); - return this; - } - - private com.google.protobuf.ByteString zlibData_ = com.google.protobuf.ByteString.EMPTY; - /** - *
-       * Possible compressed versions of the data.
-       * 
- * - * optional bytes zlib_data = 3; - * @return Whether the zlibData field is set. - */ - public boolean hasZlibData() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - *
-       * Possible compressed versions of the data.
-       * 
- * - * optional bytes zlib_data = 3; - * @return The zlibData. - */ - public com.google.protobuf.ByteString getZlibData() { - return zlibData_; - } - /** - *
-       * Possible compressed versions of the data.
-       * 
- * - * optional bytes zlib_data = 3; - * @param value The zlibData to set. - * @return This builder for chaining. - */ - public Builder setZlibData(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000004; - zlibData_ = value; - onChanged(); - return this; - } - /** - *
-       * Possible compressed versions of the data.
-       * 
- * - * optional bytes zlib_data = 3; - * @return This builder for chaining. - */ - public Builder clearZlibData() { - bitField0_ = (bitField0_ & ~0x00000004); - zlibData_ = getDefaultInstance().getZlibData(); - onChanged(); - return this; - } - - private com.google.protobuf.ByteString lzmaData_ = com.google.protobuf.ByteString.EMPTY; - /** - *
-       * PROPOSED feature for LZMA compressed data. SUPPORT IS NOT REQUIRED.
-       * 
- * - * optional bytes lzma_data = 4; - * @return Whether the lzmaData field is set. - */ - public boolean hasLzmaData() { - return ((bitField0_ & 0x00000008) != 0); - } - /** - *
-       * PROPOSED feature for LZMA compressed data. SUPPORT IS NOT REQUIRED.
-       * 
- * - * optional bytes lzma_data = 4; - * @return The lzmaData. - */ - public com.google.protobuf.ByteString getLzmaData() { - return lzmaData_; - } - /** - *
-       * PROPOSED feature for LZMA compressed data. SUPPORT IS NOT REQUIRED.
-       * 
- * - * optional bytes lzma_data = 4; - * @param value The lzmaData to set. - * @return This builder for chaining. - */ - public Builder setLzmaData(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000008; - lzmaData_ = value; - onChanged(); - return this; - } - /** - *
-       * PROPOSED feature for LZMA compressed data. SUPPORT IS NOT REQUIRED.
-       * 
- * - * optional bytes lzma_data = 4; - * @return This builder for chaining. - */ - public Builder clearLzmaData() { - bitField0_ = (bitField0_ & ~0x00000008); - lzmaData_ = getDefaultInstance().getLzmaData(); - onChanged(); - return this; - } - - private com.google.protobuf.ByteString oBSOLETEBzip2Data_ = com.google.protobuf.ByteString.EMPTY; - /** - *
-       * Formerly used for bzip2 compressed data. Depreciated in 2010.
-       * 
- * - * optional bytes OBSOLETE_bzip2_data = 5 [deprecated = true]; - * @return Whether the oBSOLETEBzip2Data field is set. - */ - @Deprecated public boolean hasOBSOLETEBzip2Data() { - return ((bitField0_ & 0x00000010) != 0); - } - /** - *
-       * Formerly used for bzip2 compressed data. Depreciated in 2010.
-       * 
- * - * optional bytes OBSOLETE_bzip2_data = 5 [deprecated = true]; - * @return The oBSOLETEBzip2Data. - */ - @Deprecated public com.google.protobuf.ByteString getOBSOLETEBzip2Data() { - return oBSOLETEBzip2Data_; - } - /** - *
-       * Formerly used for bzip2 compressed data. Depreciated in 2010.
-       * 
- * - * optional bytes OBSOLETE_bzip2_data = 5 [deprecated = true]; - * @param value The oBSOLETEBzip2Data to set. - * @return This builder for chaining. - */ - @Deprecated public Builder setOBSOLETEBzip2Data(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000010; - oBSOLETEBzip2Data_ = value; - onChanged(); - return this; - } - /** - *
-       * Formerly used for bzip2 compressed data. Depreciated in 2010.
-       * 
- * - * optional bytes OBSOLETE_bzip2_data = 5 [deprecated = true]; - * @return This builder for chaining. - */ - @Deprecated public Builder clearOBSOLETEBzip2Data() { - bitField0_ = (bitField0_ & ~0x00000010); - oBSOLETEBzip2Data_ = getDefaultInstance().getOBSOLETEBzip2Data(); - onChanged(); - return this; - } - @Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:OSMPBF.Blob) - } - - // @@protoc_insertion_point(class_scope:OSMPBF.Blob) - private static final Fileformat.Blob DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new Fileformat.Blob(); - } - - public static Fileformat.Blob getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - @Deprecated public static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @Override - public Blob parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Blob(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @Override - public Fileformat.Blob getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface BlobHeaderOrBuilder extends - // @@protoc_insertion_point(interface_extends:OSMPBF.BlobHeader) - com.google.protobuf.MessageOrBuilder { - - /** - * required string type = 1; - * @return Whether the type field is set. - */ - boolean hasType(); - /** - * required string type = 1; - * @return The type. - */ - String getType(); - /** - * required string type = 1; - * @return The bytes for type. - */ - com.google.protobuf.ByteString - getTypeBytes(); - - /** - * optional bytes indexdata = 2; - * @return Whether the indexdata field is set. - */ - boolean hasIndexdata(); - /** - * optional bytes indexdata = 2; - * @return The indexdata. - */ - com.google.protobuf.ByteString getIndexdata(); - - /** - * required int32 datasize = 3; - * @return Whether the datasize field is set. - */ - boolean hasDatasize(); - /** - * required int32 datasize = 3; - * @return The datasize. - */ - int getDatasize(); - } - /** - * Protobuf type {@code OSMPBF.BlobHeader} - */ - public static final class BlobHeader extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:OSMPBF.BlobHeader) - BlobHeaderOrBuilder { - private static final long serialVersionUID = 0L; - // Use BlobHeader.newBuilder() to construct. - private BlobHeader(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private BlobHeader() { - type_ = ""; - indexdata_ = com.google.protobuf.ByteString.EMPTY; - } - - @Override - @SuppressWarnings({"unused"}) - protected Object newInstance( - UnusedPrivateParameter unused) { - return new BlobHeader(); - } - - @Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private BlobHeader( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000001; - type_ = bs; - break; - } - case 18: { - bitField0_ |= 0x00000002; - indexdata_ = input.readBytes(); - break; - } - case 24: { - bitField0_ |= 0x00000004; - datasize_ = input.readInt32(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return Fileformat.internal_static_OSMPBF_BlobHeader_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return Fileformat.internal_static_OSMPBF_BlobHeader_fieldAccessorTable - .ensureFieldAccessorsInitialized( - Fileformat.BlobHeader.class, Fileformat.BlobHeader.Builder.class); - } - - private int bitField0_; - public static final int TYPE_FIELD_NUMBER = 1; - private volatile Object type_; - /** - * required string type = 1; - * @return Whether the type field is set. - */ - public boolean hasType() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * required string type = 1; - * @return The type. - */ - public String getType() { - Object ref = type_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - type_ = s; - } - return s; - } - } - /** - * required string type = 1; - * @return The bytes for type. - */ - public com.google.protobuf.ByteString - getTypeBytes() { - Object ref = type_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (String) ref); - type_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int INDEXDATA_FIELD_NUMBER = 2; - private com.google.protobuf.ByteString indexdata_; - /** - * optional bytes indexdata = 2; - * @return Whether the indexdata field is set. - */ - public boolean hasIndexdata() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * optional bytes indexdata = 2; - * @return The indexdata. - */ - public com.google.protobuf.ByteString getIndexdata() { - return indexdata_; - } - - public static final int DATASIZE_FIELD_NUMBER = 3; - private int datasize_; - /** - * required int32 datasize = 3; - * @return Whether the datasize field is set. - */ - public boolean hasDatasize() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - * required int32 datasize = 3; - * @return The datasize. - */ - public int getDatasize() { - return datasize_; - } - - private byte memoizedIsInitialized = -1; - @Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - if (!hasType()) { - memoizedIsInitialized = 0; - return false; - } - if (!hasDatasize()) { - memoizedIsInitialized = 0; - return false; - } - memoizedIsInitialized = 1; - return true; - } - - @Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) != 0)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, type_); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeBytes(2, indexdata_); - } - if (((bitField0_ & 0x00000004) != 0)) { - output.writeInt32(3, datasize_); - } - unknownFields.writeTo(output); - } - - @Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, type_); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, indexdata_); - } - if (((bitField0_ & 0x00000004) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(3, datasize_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @Override - public boolean equals(final Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof Fileformat.BlobHeader)) { - return super.equals(obj); - } - Fileformat.BlobHeader other = (Fileformat.BlobHeader) obj; - - if (hasType() != other.hasType()) return false; - if (hasType()) { - if (!getType() - .equals(other.getType())) return false; - } - if (hasIndexdata() != other.hasIndexdata()) return false; - if (hasIndexdata()) { - if (!getIndexdata() - .equals(other.getIndexdata())) return false; - } - if (hasDatasize() != other.hasDatasize()) return false; - if (hasDatasize()) { - if (getDatasize() - != other.getDatasize()) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasType()) { - hash = (37 * hash) + TYPE_FIELD_NUMBER; - hash = (53 * hash) + getType().hashCode(); - } - if (hasIndexdata()) { - hash = (37 * hash) + INDEXDATA_FIELD_NUMBER; - hash = (53 * hash) + getIndexdata().hashCode(); - } - if (hasDatasize()) { - hash = (37 * hash) + DATASIZE_FIELD_NUMBER; - hash = (53 * hash) + getDatasize(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static Fileformat.BlobHeader parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static Fileformat.BlobHeader parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static Fileformat.BlobHeader parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static Fileformat.BlobHeader parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static Fileformat.BlobHeader parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static Fileformat.BlobHeader parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static Fileformat.BlobHeader parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static Fileformat.BlobHeader parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static Fileformat.BlobHeader parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static Fileformat.BlobHeader parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static Fileformat.BlobHeader parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static Fileformat.BlobHeader parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(Fileformat.BlobHeader prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @Override - protected Builder newBuilderForType( - BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code OSMPBF.BlobHeader} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:OSMPBF.BlobHeader) - Fileformat.BlobHeaderOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return Fileformat.internal_static_OSMPBF_BlobHeader_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return Fileformat.internal_static_OSMPBF_BlobHeader_fieldAccessorTable - .ensureFieldAccessorsInitialized( - Fileformat.BlobHeader.class, Fileformat.BlobHeader.Builder.class); - } - - // Construct using Fileformat.BlobHeader.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @Override - public Builder clear() { - super.clear(); - type_ = ""; - bitField0_ = (bitField0_ & ~0x00000001); - indexdata_ = com.google.protobuf.ByteString.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - datasize_ = 0; - bitField0_ = (bitField0_ & ~0x00000004); - return this; - } - - @Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return Fileformat.internal_static_OSMPBF_BlobHeader_descriptor; - } - - @Override - public Fileformat.BlobHeader getDefaultInstanceForType() { - return Fileformat.BlobHeader.getDefaultInstance(); - } - - @Override - public Fileformat.BlobHeader build() { - Fileformat.BlobHeader result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @Override - public Fileformat.BlobHeader buildPartial() { - Fileformat.BlobHeader result = new Fileformat.BlobHeader(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - to_bitField0_ |= 0x00000001; - } - result.type_ = type_; - if (((from_bitField0_ & 0x00000002) != 0)) { - to_bitField0_ |= 0x00000002; - } - result.indexdata_ = indexdata_; - if (((from_bitField0_ & 0x00000004) != 0)) { - result.datasize_ = datasize_; - to_bitField0_ |= 0x00000004; - } - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - @Override - public Builder clone() { - return super.clone(); - } - @Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.setField(field, value); - } - @Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, Object value) { - return super.setRepeatedField(field, index, value); - } - @Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.addRepeatedField(field, value); - } - @Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof Fileformat.BlobHeader) { - return mergeFrom((Fileformat.BlobHeader)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(Fileformat.BlobHeader other) { - if (other == Fileformat.BlobHeader.getDefaultInstance()) return this; - if (other.hasType()) { - bitField0_ |= 0x00000001; - type_ = other.type_; - onChanged(); - } - if (other.hasIndexdata()) { - setIndexdata(other.getIndexdata()); - } - if (other.hasDatasize()) { - setDatasize(other.getDatasize()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @Override - public final boolean isInitialized() { - if (!hasType()) { - return false; - } - if (!hasDatasize()) { - return false; - } - return true; - } - - @Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - Fileformat.BlobHeader parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (Fileformat.BlobHeader) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private Object type_ = ""; - /** - * required string type = 1; - * @return Whether the type field is set. - */ - public boolean hasType() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * required string type = 1; - * @return The type. - */ - public String getType() { - Object ref = type_; - if (!(ref instanceof String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - type_ = s; - } - return s; - } else { - return (String) ref; - } - } - /** - * required string type = 1; - * @return The bytes for type. - */ - public com.google.protobuf.ByteString - getTypeBytes() { - Object ref = type_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (String) ref); - type_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * required string type = 1; - * @param value The type to set. - * @return This builder for chaining. - */ - public Builder setType( - String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - type_ = value; - onChanged(); - return this; - } - /** - * required string type = 1; - * @return This builder for chaining. - */ - public Builder clearType() { - bitField0_ = (bitField0_ & ~0x00000001); - type_ = getDefaultInstance().getType(); - onChanged(); - return this; - } - /** - * required string type = 1; - * @param value The bytes for type to set. - * @return This builder for chaining. - */ - public Builder setTypeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - type_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.ByteString indexdata_ = com.google.protobuf.ByteString.EMPTY; - /** - * optional bytes indexdata = 2; - * @return Whether the indexdata field is set. - */ - public boolean hasIndexdata() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * optional bytes indexdata = 2; - * @return The indexdata. - */ - public com.google.protobuf.ByteString getIndexdata() { - return indexdata_; - } - /** - * optional bytes indexdata = 2; - * @param value The indexdata to set. - * @return This builder for chaining. - */ - public Builder setIndexdata(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - indexdata_ = value; - onChanged(); - return this; - } - /** - * optional bytes indexdata = 2; - * @return This builder for chaining. - */ - public Builder clearIndexdata() { - bitField0_ = (bitField0_ & ~0x00000002); - indexdata_ = getDefaultInstance().getIndexdata(); - onChanged(); - return this; - } - - private int datasize_ ; - /** - * required int32 datasize = 3; - * @return Whether the datasize field is set. - */ - public boolean hasDatasize() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - * required int32 datasize = 3; - * @return The datasize. - */ - public int getDatasize() { - return datasize_; - } - /** - * required int32 datasize = 3; - * @param value The datasize to set. - * @return This builder for chaining. - */ - public Builder setDatasize(int value) { - bitField0_ |= 0x00000004; - datasize_ = value; - onChanged(); - return this; - } - /** - * required int32 datasize = 3; - * @return This builder for chaining. - */ - public Builder clearDatasize() { - bitField0_ = (bitField0_ & ~0x00000004); - datasize_ = 0; - onChanged(); - return this; - } - @Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:OSMPBF.BlobHeader) - } - - // @@protoc_insertion_point(class_scope:OSMPBF.BlobHeader) - private static final Fileformat.BlobHeader DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new Fileformat.BlobHeader(); - } - - public static Fileformat.BlobHeader getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - @Deprecated public static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @Override - public BlobHeader parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new BlobHeader(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @Override - public Fileformat.BlobHeader getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_OSMPBF_Blob_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_OSMPBF_Blob_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_OSMPBF_BlobHeader_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_OSMPBF_BlobHeader_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - String[] descriptorData = { - "\n\020fileformat.proto\022\006OSMPBF\"l\n\004Blob\022\013\n\003ra" + - "w\030\001 \001(\014\022\020\n\010raw_size\030\002 \001(\005\022\021\n\tzlib_data\030\003" + - " \001(\014\022\021\n\tlzma_data\030\004 \001(\014\022\037\n\023OBSOLETE_bzip" + - "2_data\030\005 \001(\014B\002\030\001\"?\n\nBlobHeader\022\014\n\004type\030\001" + - " \002(\t\022\021\n\tindexdata\030\002 \001(\014\022\020\n\010datasize\030\003 \002(" + - "\005B\021\n\rcrosby.binaryH\003" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - }); - internal_static_OSMPBF_Blob_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_OSMPBF_Blob_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_OSMPBF_Blob_descriptor, - new String[] { "Raw", "RawSize", "ZlibData", "LzmaData", "OBSOLETEBzip2Data", }); - internal_static_OSMPBF_BlobHeader_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_OSMPBF_BlobHeader_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_OSMPBF_BlobHeader_descriptor, - new String[] { "Type", "Indexdata", "Datasize", }); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/mtk2garmin-converter/src/main/java/org/openstreetmap/osmosis/osmbinary/Osmformat.java b/mtk2garmin-converter/src/main/java/org/openstreetmap/osmosis/osmbinary/Osmformat.java deleted file mode 100644 index bc3ee63..0000000 --- a/mtk2garmin-converter/src/main/java/org/openstreetmap/osmosis/osmbinary/Osmformat.java +++ /dev/null @@ -1,17545 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: proto - -package org.openstreetmap.osmosis.osmbinary; - -public final class Osmformat { - private Osmformat() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - public interface HeaderBlockOrBuilder extends - // @@protoc_insertion_point(interface_extends:OSMPBF.HeaderBlock) - com.google.protobuf.MessageOrBuilder { - - /** - * optional .OSMPBF.HeaderBBox bbox = 1; - * @return Whether the bbox field is set. - */ - boolean hasBbox(); - /** - * optional .OSMPBF.HeaderBBox bbox = 1; - * @return The bbox. - */ - HeaderBBox getBbox(); - /** - * optional .OSMPBF.HeaderBBox bbox = 1; - */ - HeaderBBoxOrBuilder getBboxOrBuilder(); - - /** - *
-     * Additional tags to aid in parsing this dataset 
-     * 
- * - * repeated string required_features = 4; - * @return A list containing the requiredFeatures. - */ - java.util.List - getRequiredFeaturesList(); - /** - *
-     * Additional tags to aid in parsing this dataset 
-     * 
- * - * repeated string required_features = 4; - * @return The count of requiredFeatures. - */ - int getRequiredFeaturesCount(); - /** - *
-     * Additional tags to aid in parsing this dataset 
-     * 
- * - * repeated string required_features = 4; - * @param index The index of the element to return. - * @return The requiredFeatures at the given index. - */ - String getRequiredFeatures(int index); - /** - *
-     * Additional tags to aid in parsing this dataset 
-     * 
- * - * repeated string required_features = 4; - * @param index The index of the value to return. - * @return The bytes of the requiredFeatures at the given index. - */ - com.google.protobuf.ByteString - getRequiredFeaturesBytes(int index); - - /** - * repeated string optional_features = 5; - * @return A list containing the optionalFeatures. - */ - java.util.List - getOptionalFeaturesList(); - /** - * repeated string optional_features = 5; - * @return The count of optionalFeatures. - */ - int getOptionalFeaturesCount(); - /** - * repeated string optional_features = 5; - * @param index The index of the element to return. - * @return The optionalFeatures at the given index. - */ - String getOptionalFeatures(int index); - /** - * repeated string optional_features = 5; - * @param index The index of the value to return. - * @return The bytes of the optionalFeatures at the given index. - */ - com.google.protobuf.ByteString - getOptionalFeaturesBytes(int index); - - /** - * optional string writingprogram = 16; - * @return Whether the writingprogram field is set. - */ - boolean hasWritingprogram(); - /** - * optional string writingprogram = 16; - * @return The writingprogram. - */ - String getWritingprogram(); - /** - * optional string writingprogram = 16; - * @return The bytes for writingprogram. - */ - com.google.protobuf.ByteString - getWritingprogramBytes(); - - /** - *
-     * From the bbox field.
-     * 
- * - * optional string source = 17; - * @return Whether the source field is set. - */ - boolean hasSource(); - /** - *
-     * From the bbox field.
-     * 
- * - * optional string source = 17; - * @return The source. - */ - String getSource(); - /** - *
-     * From the bbox field.
-     * 
- * - * optional string source = 17; - * @return The bytes for source. - */ - com.google.protobuf.ByteString - getSourceBytes(); - - /** - *
-     * replication timestamp, expressed in seconds since the epoch, 
-     * otherwise the same value as in the "timestamp=..." field
-     * in the state.txt file used by Osmosis
-     * 
- * - * optional int64 osmosis_replication_timestamp = 32; - * @return Whether the osmosisReplicationTimestamp field is set. - */ - boolean hasOsmosisReplicationTimestamp(); - /** - *
-     * replication timestamp, expressed in seconds since the epoch, 
-     * otherwise the same value as in the "timestamp=..." field
-     * in the state.txt file used by Osmosis
-     * 
- * - * optional int64 osmosis_replication_timestamp = 32; - * @return The osmosisReplicationTimestamp. - */ - long getOsmosisReplicationTimestamp(); - - /** - *
-     * replication sequence number (sequenceNumber in state.txt)
-     * 
- * - * optional int64 osmosis_replication_sequence_number = 33; - * @return Whether the osmosisReplicationSequenceNumber field is set. - */ - boolean hasOsmosisReplicationSequenceNumber(); - /** - *
-     * replication sequence number (sequenceNumber in state.txt)
-     * 
- * - * optional int64 osmosis_replication_sequence_number = 33; - * @return The osmosisReplicationSequenceNumber. - */ - long getOsmosisReplicationSequenceNumber(); - - /** - *
-     * replication base URL (from Osmosis' configuration.txt file)
-     * 
- * - * optional string osmosis_replication_base_url = 34; - * @return Whether the osmosisReplicationBaseUrl field is set. - */ - boolean hasOsmosisReplicationBaseUrl(); - /** - *
-     * replication base URL (from Osmosis' configuration.txt file)
-     * 
- * - * optional string osmosis_replication_base_url = 34; - * @return The osmosisReplicationBaseUrl. - */ - String getOsmosisReplicationBaseUrl(); - /** - *
-     * replication base URL (from Osmosis' configuration.txt file)
-     * 
- * - * optional string osmosis_replication_base_url = 34; - * @return The bytes for osmosisReplicationBaseUrl. - */ - com.google.protobuf.ByteString - getOsmosisReplicationBaseUrlBytes(); - } - /** - * Protobuf type {@code OSMPBF.HeaderBlock} - */ - public static final class HeaderBlock extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:OSMPBF.HeaderBlock) - HeaderBlockOrBuilder { - private static final long serialVersionUID = 0L; - // Use HeaderBlock.newBuilder() to construct. - private HeaderBlock(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private HeaderBlock() { - requiredFeatures_ = com.google.protobuf.LazyStringArrayList.EMPTY; - optionalFeatures_ = com.google.protobuf.LazyStringArrayList.EMPTY; - writingprogram_ = ""; - source_ = ""; - osmosisReplicationBaseUrl_ = ""; - } - - @Override - @SuppressWarnings({"unused"}) - protected Object newInstance( - UnusedPrivateParameter unused) { - return new HeaderBlock(); - } - - @Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private HeaderBlock( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - HeaderBBox.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = bbox_.toBuilder(); - } - bbox_ = input.readMessage(HeaderBBox.PARSER, extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(bbox_); - bbox_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - break; - } - case 34: { - com.google.protobuf.ByteString bs = input.readBytes(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - requiredFeatures_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - requiredFeatures_.add(bs); - break; - } - case 42: { - com.google.protobuf.ByteString bs = input.readBytes(); - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - optionalFeatures_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000004; - } - optionalFeatures_.add(bs); - break; - } - case 130: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000002; - writingprogram_ = bs; - break; - } - case 138: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000004; - source_ = bs; - break; - } - case 256: { - bitField0_ |= 0x00000008; - osmosisReplicationTimestamp_ = input.readInt64(); - break; - } - case 264: { - bitField0_ |= 0x00000010; - osmosisReplicationSequenceNumber_ = input.readInt64(); - break; - } - case 274: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000020; - osmosisReplicationBaseUrl_ = bs; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000002) != 0)) { - requiredFeatures_ = requiredFeatures_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000004) != 0)) { - optionalFeatures_ = optionalFeatures_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return internal_static_OSMPBF_HeaderBlock_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return internal_static_OSMPBF_HeaderBlock_fieldAccessorTable - .ensureFieldAccessorsInitialized( - HeaderBlock.class, HeaderBlock.Builder.class); - } - - private int bitField0_; - public static final int BBOX_FIELD_NUMBER = 1; - private HeaderBBox bbox_; - /** - * optional .OSMPBF.HeaderBBox bbox = 1; - * @return Whether the bbox field is set. - */ - public boolean hasBbox() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * optional .OSMPBF.HeaderBBox bbox = 1; - * @return The bbox. - */ - public HeaderBBox getBbox() { - return bbox_ == null ? HeaderBBox.getDefaultInstance() : bbox_; - } - /** - * optional .OSMPBF.HeaderBBox bbox = 1; - */ - public HeaderBBoxOrBuilder getBboxOrBuilder() { - return bbox_ == null ? HeaderBBox.getDefaultInstance() : bbox_; - } - - public static final int REQUIRED_FEATURES_FIELD_NUMBER = 4; - private com.google.protobuf.LazyStringList requiredFeatures_; - /** - *
-     * Additional tags to aid in parsing this dataset 
-     * 
- * - * repeated string required_features = 4; - * @return A list containing the requiredFeatures. - */ - public com.google.protobuf.ProtocolStringList - getRequiredFeaturesList() { - return requiredFeatures_; - } - /** - *
-     * Additional tags to aid in parsing this dataset 
-     * 
- * - * repeated string required_features = 4; - * @return The count of requiredFeatures. - */ - public int getRequiredFeaturesCount() { - return requiredFeatures_.size(); - } - /** - *
-     * Additional tags to aid in parsing this dataset 
-     * 
- * - * repeated string required_features = 4; - * @param index The index of the element to return. - * @return The requiredFeatures at the given index. - */ - public String getRequiredFeatures(int index) { - return requiredFeatures_.get(index); - } - /** - *
-     * Additional tags to aid in parsing this dataset 
-     * 
- * - * repeated string required_features = 4; - * @param index The index of the value to return. - * @return The bytes of the requiredFeatures at the given index. - */ - public com.google.protobuf.ByteString - getRequiredFeaturesBytes(int index) { - return requiredFeatures_.getByteString(index); - } - - public static final int OPTIONAL_FEATURES_FIELD_NUMBER = 5; - private com.google.protobuf.LazyStringList optionalFeatures_; - /** - * repeated string optional_features = 5; - * @return A list containing the optionalFeatures. - */ - public com.google.protobuf.ProtocolStringList - getOptionalFeaturesList() { - return optionalFeatures_; - } - /** - * repeated string optional_features = 5; - * @return The count of optionalFeatures. - */ - public int getOptionalFeaturesCount() { - return optionalFeatures_.size(); - } - /** - * repeated string optional_features = 5; - * @param index The index of the element to return. - * @return The optionalFeatures at the given index. - */ - public String getOptionalFeatures(int index) { - return optionalFeatures_.get(index); - } - /** - * repeated string optional_features = 5; - * @param index The index of the value to return. - * @return The bytes of the optionalFeatures at the given index. - */ - public com.google.protobuf.ByteString - getOptionalFeaturesBytes(int index) { - return optionalFeatures_.getByteString(index); - } - - public static final int WRITINGPROGRAM_FIELD_NUMBER = 16; - private volatile Object writingprogram_; - /** - * optional string writingprogram = 16; - * @return Whether the writingprogram field is set. - */ - public boolean hasWritingprogram() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * optional string writingprogram = 16; - * @return The writingprogram. - */ - public String getWritingprogram() { - Object ref = writingprogram_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - writingprogram_ = s; - } - return s; - } - } - /** - * optional string writingprogram = 16; - * @return The bytes for writingprogram. - */ - public com.google.protobuf.ByteString - getWritingprogramBytes() { - Object ref = writingprogram_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (String) ref); - writingprogram_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SOURCE_FIELD_NUMBER = 17; - private volatile Object source_; - /** - *
-     * From the bbox field.
-     * 
- * - * optional string source = 17; - * @return Whether the source field is set. - */ - public boolean hasSource() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - *
-     * From the bbox field.
-     * 
- * - * optional string source = 17; - * @return The source. - */ - public String getSource() { - Object ref = source_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - source_ = s; - } - return s; - } - } - /** - *
-     * From the bbox field.
-     * 
- * - * optional string source = 17; - * @return The bytes for source. - */ - public com.google.protobuf.ByteString - getSourceBytes() { - Object ref = source_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (String) ref); - source_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int OSMOSIS_REPLICATION_TIMESTAMP_FIELD_NUMBER = 32; - private long osmosisReplicationTimestamp_; - /** - *
-     * replication timestamp, expressed in seconds since the epoch, 
-     * otherwise the same value as in the "timestamp=..." field
-     * in the state.txt file used by Osmosis
-     * 
- * - * optional int64 osmosis_replication_timestamp = 32; - * @return Whether the osmosisReplicationTimestamp field is set. - */ - public boolean hasOsmosisReplicationTimestamp() { - return ((bitField0_ & 0x00000008) != 0); - } - /** - *
-     * replication timestamp, expressed in seconds since the epoch, 
-     * otherwise the same value as in the "timestamp=..." field
-     * in the state.txt file used by Osmosis
-     * 
- * - * optional int64 osmosis_replication_timestamp = 32; - * @return The osmosisReplicationTimestamp. - */ - public long getOsmosisReplicationTimestamp() { - return osmosisReplicationTimestamp_; - } - - public static final int OSMOSIS_REPLICATION_SEQUENCE_NUMBER_FIELD_NUMBER = 33; - private long osmosisReplicationSequenceNumber_; - /** - *
-     * replication sequence number (sequenceNumber in state.txt)
-     * 
- * - * optional int64 osmosis_replication_sequence_number = 33; - * @return Whether the osmosisReplicationSequenceNumber field is set. - */ - public boolean hasOsmosisReplicationSequenceNumber() { - return ((bitField0_ & 0x00000010) != 0); - } - /** - *
-     * replication sequence number (sequenceNumber in state.txt)
-     * 
- * - * optional int64 osmosis_replication_sequence_number = 33; - * @return The osmosisReplicationSequenceNumber. - */ - public long getOsmosisReplicationSequenceNumber() { - return osmosisReplicationSequenceNumber_; - } - - public static final int OSMOSIS_REPLICATION_BASE_URL_FIELD_NUMBER = 34; - private volatile Object osmosisReplicationBaseUrl_; - /** - *
-     * replication base URL (from Osmosis' configuration.txt file)
-     * 
- * - * optional string osmosis_replication_base_url = 34; - * @return Whether the osmosisReplicationBaseUrl field is set. - */ - public boolean hasOsmosisReplicationBaseUrl() { - return ((bitField0_ & 0x00000020) != 0); - } - /** - *
-     * replication base URL (from Osmosis' configuration.txt file)
-     * 
- * - * optional string osmosis_replication_base_url = 34; - * @return The osmosisReplicationBaseUrl. - */ - public String getOsmosisReplicationBaseUrl() { - Object ref = osmosisReplicationBaseUrl_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - osmosisReplicationBaseUrl_ = s; - } - return s; - } - } - /** - *
-     * replication base URL (from Osmosis' configuration.txt file)
-     * 
- * - * optional string osmosis_replication_base_url = 34; - * @return The bytes for osmosisReplicationBaseUrl. - */ - public com.google.protobuf.ByteString - getOsmosisReplicationBaseUrlBytes() { - Object ref = osmosisReplicationBaseUrl_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (String) ref); - osmosisReplicationBaseUrl_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - if (hasBbox()) { - if (!getBbox().isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - memoizedIsInitialized = 1; - return true; - } - - @Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(1, getBbox()); - } - for (int i = 0; i < requiredFeatures_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, requiredFeatures_.getRaw(i)); - } - for (int i = 0; i < optionalFeatures_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, optionalFeatures_.getRaw(i)); - } - if (((bitField0_ & 0x00000002) != 0)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 16, writingprogram_); - } - if (((bitField0_ & 0x00000004) != 0)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 17, source_); - } - if (((bitField0_ & 0x00000008) != 0)) { - output.writeInt64(32, osmosisReplicationTimestamp_); - } - if (((bitField0_ & 0x00000010) != 0)) { - output.writeInt64(33, osmosisReplicationSequenceNumber_); - } - if (((bitField0_ & 0x00000020) != 0)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 34, osmosisReplicationBaseUrl_); - } - unknownFields.writeTo(output); - } - - @Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getBbox()); - } - { - int dataSize = 0; - for (int i = 0; i < requiredFeatures_.size(); i++) { - dataSize += computeStringSizeNoTag(requiredFeatures_.getRaw(i)); - } - size += dataSize; - size += 1 * getRequiredFeaturesList().size(); - } - { - int dataSize = 0; - for (int i = 0; i < optionalFeatures_.size(); i++) { - dataSize += computeStringSizeNoTag(optionalFeatures_.getRaw(i)); - } - size += dataSize; - size += 1 * getOptionalFeaturesList().size(); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(16, writingprogram_); - } - if (((bitField0_ & 0x00000004) != 0)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(17, source_); - } - if (((bitField0_ & 0x00000008) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(32, osmosisReplicationTimestamp_); - } - if (((bitField0_ & 0x00000010) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(33, osmosisReplicationSequenceNumber_); - } - if (((bitField0_ & 0x00000020) != 0)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(34, osmosisReplicationBaseUrl_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @Override - public boolean equals(final Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof HeaderBlock)) { - return super.equals(obj); - } - HeaderBlock other = (HeaderBlock) obj; - - if (hasBbox() != other.hasBbox()) return false; - if (hasBbox()) { - if (!getBbox() - .equals(other.getBbox())) return false; - } - if (!getRequiredFeaturesList() - .equals(other.getRequiredFeaturesList())) return false; - if (!getOptionalFeaturesList() - .equals(other.getOptionalFeaturesList())) return false; - if (hasWritingprogram() != other.hasWritingprogram()) return false; - if (hasWritingprogram()) { - if (!getWritingprogram() - .equals(other.getWritingprogram())) return false; - } - if (hasSource() != other.hasSource()) return false; - if (hasSource()) { - if (!getSource() - .equals(other.getSource())) return false; - } - if (hasOsmosisReplicationTimestamp() != other.hasOsmosisReplicationTimestamp()) return false; - if (hasOsmosisReplicationTimestamp()) { - if (getOsmosisReplicationTimestamp() - != other.getOsmosisReplicationTimestamp()) return false; - } - if (hasOsmosisReplicationSequenceNumber() != other.hasOsmosisReplicationSequenceNumber()) return false; - if (hasOsmosisReplicationSequenceNumber()) { - if (getOsmosisReplicationSequenceNumber() - != other.getOsmosisReplicationSequenceNumber()) return false; - } - if (hasOsmosisReplicationBaseUrl() != other.hasOsmosisReplicationBaseUrl()) return false; - if (hasOsmosisReplicationBaseUrl()) { - if (!getOsmosisReplicationBaseUrl() - .equals(other.getOsmosisReplicationBaseUrl())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasBbox()) { - hash = (37 * hash) + BBOX_FIELD_NUMBER; - hash = (53 * hash) + getBbox().hashCode(); - } - if (getRequiredFeaturesCount() > 0) { - hash = (37 * hash) + REQUIRED_FEATURES_FIELD_NUMBER; - hash = (53 * hash) + getRequiredFeaturesList().hashCode(); - } - if (getOptionalFeaturesCount() > 0) { - hash = (37 * hash) + OPTIONAL_FEATURES_FIELD_NUMBER; - hash = (53 * hash) + getOptionalFeaturesList().hashCode(); - } - if (hasWritingprogram()) { - hash = (37 * hash) + WRITINGPROGRAM_FIELD_NUMBER; - hash = (53 * hash) + getWritingprogram().hashCode(); - } - if (hasSource()) { - hash = (37 * hash) + SOURCE_FIELD_NUMBER; - hash = (53 * hash) + getSource().hashCode(); - } - if (hasOsmosisReplicationTimestamp()) { - hash = (37 * hash) + OSMOSIS_REPLICATION_TIMESTAMP_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getOsmosisReplicationTimestamp()); - } - if (hasOsmosisReplicationSequenceNumber()) { - hash = (37 * hash) + OSMOSIS_REPLICATION_SEQUENCE_NUMBER_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getOsmosisReplicationSequenceNumber()); - } - if (hasOsmosisReplicationBaseUrl()) { - hash = (37 * hash) + OSMOSIS_REPLICATION_BASE_URL_FIELD_NUMBER; - hash = (53 * hash) + getOsmosisReplicationBaseUrl().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static HeaderBlock parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static HeaderBlock parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static HeaderBlock parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static HeaderBlock parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static HeaderBlock parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static HeaderBlock parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static HeaderBlock parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static HeaderBlock parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static HeaderBlock parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static HeaderBlock parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static HeaderBlock parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static HeaderBlock parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(HeaderBlock prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @Override - protected Builder newBuilderForType( - BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code OSMPBF.HeaderBlock} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:OSMPBF.HeaderBlock) - HeaderBlockOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return internal_static_OSMPBF_HeaderBlock_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return internal_static_OSMPBF_HeaderBlock_fieldAccessorTable - .ensureFieldAccessorsInitialized( - HeaderBlock.class, HeaderBlock.Builder.class); - } - - // Construct using HeaderBlock.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getBboxFieldBuilder(); - } - } - @Override - public Builder clear() { - super.clear(); - if (bboxBuilder_ == null) { - bbox_ = null; - } else { - bboxBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - requiredFeatures_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - optionalFeatures_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000004); - writingprogram_ = ""; - bitField0_ = (bitField0_ & ~0x00000008); - source_ = ""; - bitField0_ = (bitField0_ & ~0x00000010); - osmosisReplicationTimestamp_ = 0L; - bitField0_ = (bitField0_ & ~0x00000020); - osmosisReplicationSequenceNumber_ = 0L; - bitField0_ = (bitField0_ & ~0x00000040); - osmosisReplicationBaseUrl_ = ""; - bitField0_ = (bitField0_ & ~0x00000080); - return this; - } - - @Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return internal_static_OSMPBF_HeaderBlock_descriptor; - } - - @Override - public HeaderBlock getDefaultInstanceForType() { - return HeaderBlock.getDefaultInstance(); - } - - @Override - public HeaderBlock build() { - HeaderBlock result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @Override - public HeaderBlock buildPartial() { - HeaderBlock result = new HeaderBlock(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - if (bboxBuilder_ == null) { - result.bbox_ = bbox_; - } else { - result.bbox_ = bboxBuilder_.build(); - } - to_bitField0_ |= 0x00000001; - } - if (((bitField0_ & 0x00000002) != 0)) { - requiredFeatures_ = requiredFeatures_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.requiredFeatures_ = requiredFeatures_; - if (((bitField0_ & 0x00000004) != 0)) { - optionalFeatures_ = optionalFeatures_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.optionalFeatures_ = optionalFeatures_; - if (((from_bitField0_ & 0x00000008) != 0)) { - to_bitField0_ |= 0x00000002; - } - result.writingprogram_ = writingprogram_; - if (((from_bitField0_ & 0x00000010) != 0)) { - to_bitField0_ |= 0x00000004; - } - result.source_ = source_; - if (((from_bitField0_ & 0x00000020) != 0)) { - result.osmosisReplicationTimestamp_ = osmosisReplicationTimestamp_; - to_bitField0_ |= 0x00000008; - } - if (((from_bitField0_ & 0x00000040) != 0)) { - result.osmosisReplicationSequenceNumber_ = osmosisReplicationSequenceNumber_; - to_bitField0_ |= 0x00000010; - } - if (((from_bitField0_ & 0x00000080) != 0)) { - to_bitField0_ |= 0x00000020; - } - result.osmosisReplicationBaseUrl_ = osmosisReplicationBaseUrl_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - @Override - public Builder clone() { - return super.clone(); - } - @Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.setField(field, value); - } - @Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, Object value) { - return super.setRepeatedField(field, index, value); - } - @Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.addRepeatedField(field, value); - } - @Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof HeaderBlock) { - return mergeFrom((HeaderBlock)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(HeaderBlock other) { - if (other == HeaderBlock.getDefaultInstance()) return this; - if (other.hasBbox()) { - mergeBbox(other.getBbox()); - } - if (!other.requiredFeatures_.isEmpty()) { - if (requiredFeatures_.isEmpty()) { - requiredFeatures_ = other.requiredFeatures_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureRequiredFeaturesIsMutable(); - requiredFeatures_.addAll(other.requiredFeatures_); - } - onChanged(); - } - if (!other.optionalFeatures_.isEmpty()) { - if (optionalFeatures_.isEmpty()) { - optionalFeatures_ = other.optionalFeatures_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureOptionalFeaturesIsMutable(); - optionalFeatures_.addAll(other.optionalFeatures_); - } - onChanged(); - } - if (other.hasWritingprogram()) { - bitField0_ |= 0x00000008; - writingprogram_ = other.writingprogram_; - onChanged(); - } - if (other.hasSource()) { - bitField0_ |= 0x00000010; - source_ = other.source_; - onChanged(); - } - if (other.hasOsmosisReplicationTimestamp()) { - setOsmosisReplicationTimestamp(other.getOsmosisReplicationTimestamp()); - } - if (other.hasOsmosisReplicationSequenceNumber()) { - setOsmosisReplicationSequenceNumber(other.getOsmosisReplicationSequenceNumber()); - } - if (other.hasOsmosisReplicationBaseUrl()) { - bitField0_ |= 0x00000080; - osmosisReplicationBaseUrl_ = other.osmosisReplicationBaseUrl_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @Override - public final boolean isInitialized() { - if (hasBbox()) { - if (!getBbox().isInitialized()) { - return false; - } - } - return true; - } - - @Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - HeaderBlock parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (HeaderBlock) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private HeaderBBox bbox_; - private com.google.protobuf.SingleFieldBuilderV3< - HeaderBBox, HeaderBBox.Builder, HeaderBBoxOrBuilder> bboxBuilder_; - /** - * optional .OSMPBF.HeaderBBox bbox = 1; - * @return Whether the bbox field is set. - */ - public boolean hasBbox() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * optional .OSMPBF.HeaderBBox bbox = 1; - * @return The bbox. - */ - public HeaderBBox getBbox() { - if (bboxBuilder_ == null) { - return bbox_ == null ? HeaderBBox.getDefaultInstance() : bbox_; - } else { - return bboxBuilder_.getMessage(); - } - } - /** - * optional .OSMPBF.HeaderBBox bbox = 1; - */ - public Builder setBbox(HeaderBBox value) { - if (bboxBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - bbox_ = value; - onChanged(); - } else { - bboxBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - return this; - } - /** - * optional .OSMPBF.HeaderBBox bbox = 1; - */ - public Builder setBbox( - HeaderBBox.Builder builderForValue) { - if (bboxBuilder_ == null) { - bbox_ = builderForValue.build(); - onChanged(); - } else { - bboxBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - return this; - } - /** - * optional .OSMPBF.HeaderBBox bbox = 1; - */ - public Builder mergeBbox(HeaderBBox value) { - if (bboxBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - bbox_ != null && - bbox_ != HeaderBBox.getDefaultInstance()) { - bbox_ = - HeaderBBox.newBuilder(bbox_).mergeFrom(value).buildPartial(); - } else { - bbox_ = value; - } - onChanged(); - } else { - bboxBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000001; - return this; - } - /** - * optional .OSMPBF.HeaderBBox bbox = 1; - */ - public Builder clearBbox() { - if (bboxBuilder_ == null) { - bbox_ = null; - onChanged(); - } else { - bboxBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - /** - * optional .OSMPBF.HeaderBBox bbox = 1; - */ - public HeaderBBox.Builder getBboxBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getBboxFieldBuilder().getBuilder(); - } - /** - * optional .OSMPBF.HeaderBBox bbox = 1; - */ - public HeaderBBoxOrBuilder getBboxOrBuilder() { - if (bboxBuilder_ != null) { - return bboxBuilder_.getMessageOrBuilder(); - } else { - return bbox_ == null ? - HeaderBBox.getDefaultInstance() : bbox_; - } - } - /** - * optional .OSMPBF.HeaderBBox bbox = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - HeaderBBox, HeaderBBox.Builder, HeaderBBoxOrBuilder> - getBboxFieldBuilder() { - if (bboxBuilder_ == null) { - bboxBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - HeaderBBox, HeaderBBox.Builder, HeaderBBoxOrBuilder>( - getBbox(), - getParentForChildren(), - isClean()); - bbox_ = null; - } - return bboxBuilder_; - } - - private com.google.protobuf.LazyStringList requiredFeatures_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureRequiredFeaturesIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - requiredFeatures_ = new com.google.protobuf.LazyStringArrayList(requiredFeatures_); - bitField0_ |= 0x00000002; - } - } - /** - *
-       * Additional tags to aid in parsing this dataset 
-       * 
- * - * repeated string required_features = 4; - * @return A list containing the requiredFeatures. - */ - public com.google.protobuf.ProtocolStringList - getRequiredFeaturesList() { - return requiredFeatures_.getUnmodifiableView(); - } - /** - *
-       * Additional tags to aid in parsing this dataset 
-       * 
- * - * repeated string required_features = 4; - * @return The count of requiredFeatures. - */ - public int getRequiredFeaturesCount() { - return requiredFeatures_.size(); - } - /** - *
-       * Additional tags to aid in parsing this dataset 
-       * 
- * - * repeated string required_features = 4; - * @param index The index of the element to return. - * @return The requiredFeatures at the given index. - */ - public String getRequiredFeatures(int index) { - return requiredFeatures_.get(index); - } - /** - *
-       * Additional tags to aid in parsing this dataset 
-       * 
- * - * repeated string required_features = 4; - * @param index The index of the value to return. - * @return The bytes of the requiredFeatures at the given index. - */ - public com.google.protobuf.ByteString - getRequiredFeaturesBytes(int index) { - return requiredFeatures_.getByteString(index); - } - /** - *
-       * Additional tags to aid in parsing this dataset 
-       * 
- * - * repeated string required_features = 4; - * @param index The index to set the value at. - * @param value The requiredFeatures to set. - * @return This builder for chaining. - */ - public Builder setRequiredFeatures( - int index, String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureRequiredFeaturesIsMutable(); - requiredFeatures_.set(index, value); - onChanged(); - return this; - } - /** - *
-       * Additional tags to aid in parsing this dataset 
-       * 
- * - * repeated string required_features = 4; - * @param value The requiredFeatures to add. - * @return This builder for chaining. - */ - public Builder addRequiredFeatures( - String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureRequiredFeaturesIsMutable(); - requiredFeatures_.add(value); - onChanged(); - return this; - } - /** - *
-       * Additional tags to aid in parsing this dataset 
-       * 
- * - * repeated string required_features = 4; - * @param values The requiredFeatures to add. - * @return This builder for chaining. - */ - public Builder addAllRequiredFeatures( - Iterable values) { - ensureRequiredFeaturesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, requiredFeatures_); - onChanged(); - return this; - } - /** - *
-       * Additional tags to aid in parsing this dataset 
-       * 
- * - * repeated string required_features = 4; - * @return This builder for chaining. - */ - public Builder clearRequiredFeatures() { - requiredFeatures_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-       * Additional tags to aid in parsing this dataset 
-       * 
- * - * repeated string required_features = 4; - * @param value The bytes of the requiredFeatures to add. - * @return This builder for chaining. - */ - public Builder addRequiredFeaturesBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - ensureRequiredFeaturesIsMutable(); - requiredFeatures_.add(value); - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList optionalFeatures_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureOptionalFeaturesIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - optionalFeatures_ = new com.google.protobuf.LazyStringArrayList(optionalFeatures_); - bitField0_ |= 0x00000004; - } - } - /** - * repeated string optional_features = 5; - * @return A list containing the optionalFeatures. - */ - public com.google.protobuf.ProtocolStringList - getOptionalFeaturesList() { - return optionalFeatures_.getUnmodifiableView(); - } - /** - * repeated string optional_features = 5; - * @return The count of optionalFeatures. - */ - public int getOptionalFeaturesCount() { - return optionalFeatures_.size(); - } - /** - * repeated string optional_features = 5; - * @param index The index of the element to return. - * @return The optionalFeatures at the given index. - */ - public String getOptionalFeatures(int index) { - return optionalFeatures_.get(index); - } - /** - * repeated string optional_features = 5; - * @param index The index of the value to return. - * @return The bytes of the optionalFeatures at the given index. - */ - public com.google.protobuf.ByteString - getOptionalFeaturesBytes(int index) { - return optionalFeatures_.getByteString(index); - } - /** - * repeated string optional_features = 5; - * @param index The index to set the value at. - * @param value The optionalFeatures to set. - * @return This builder for chaining. - */ - public Builder setOptionalFeatures( - int index, String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureOptionalFeaturesIsMutable(); - optionalFeatures_.set(index, value); - onChanged(); - return this; - } - /** - * repeated string optional_features = 5; - * @param value The optionalFeatures to add. - * @return This builder for chaining. - */ - public Builder addOptionalFeatures( - String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureOptionalFeaturesIsMutable(); - optionalFeatures_.add(value); - onChanged(); - return this; - } - /** - * repeated string optional_features = 5; - * @param values The optionalFeatures to add. - * @return This builder for chaining. - */ - public Builder addAllOptionalFeatures( - Iterable values) { - ensureOptionalFeaturesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, optionalFeatures_); - onChanged(); - return this; - } - /** - * repeated string optional_features = 5; - * @return This builder for chaining. - */ - public Builder clearOptionalFeatures() { - optionalFeatures_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - * repeated string optional_features = 5; - * @param value The bytes of the optionalFeatures to add. - * @return This builder for chaining. - */ - public Builder addOptionalFeaturesBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - ensureOptionalFeaturesIsMutable(); - optionalFeatures_.add(value); - onChanged(); - return this; - } - - private Object writingprogram_ = ""; - /** - * optional string writingprogram = 16; - * @return Whether the writingprogram field is set. - */ - public boolean hasWritingprogram() { - return ((bitField0_ & 0x00000008) != 0); - } - /** - * optional string writingprogram = 16; - * @return The writingprogram. - */ - public String getWritingprogram() { - Object ref = writingprogram_; - if (!(ref instanceof String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - writingprogram_ = s; - } - return s; - } else { - return (String) ref; - } - } - /** - * optional string writingprogram = 16; - * @return The bytes for writingprogram. - */ - public com.google.protobuf.ByteString - getWritingprogramBytes() { - Object ref = writingprogram_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (String) ref); - writingprogram_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string writingprogram = 16; - * @param value The writingprogram to set. - * @return This builder for chaining. - */ - public Builder setWritingprogram( - String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000008; - writingprogram_ = value; - onChanged(); - return this; - } - /** - * optional string writingprogram = 16; - * @return This builder for chaining. - */ - public Builder clearWritingprogram() { - bitField0_ = (bitField0_ & ~0x00000008); - writingprogram_ = getDefaultInstance().getWritingprogram(); - onChanged(); - return this; - } - /** - * optional string writingprogram = 16; - * @param value The bytes for writingprogram to set. - * @return This builder for chaining. - */ - public Builder setWritingprogramBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000008; - writingprogram_ = value; - onChanged(); - return this; - } - - private Object source_ = ""; - /** - *
-       * From the bbox field.
-       * 
- * - * optional string source = 17; - * @return Whether the source field is set. - */ - public boolean hasSource() { - return ((bitField0_ & 0x00000010) != 0); - } - /** - *
-       * From the bbox field.
-       * 
- * - * optional string source = 17; - * @return The source. - */ - public String getSource() { - Object ref = source_; - if (!(ref instanceof String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - source_ = s; - } - return s; - } else { - return (String) ref; - } - } - /** - *
-       * From the bbox field.
-       * 
- * - * optional string source = 17; - * @return The bytes for source. - */ - public com.google.protobuf.ByteString - getSourceBytes() { - Object ref = source_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (String) ref); - source_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * From the bbox field.
-       * 
- * - * optional string source = 17; - * @param value The source to set. - * @return This builder for chaining. - */ - public Builder setSource( - String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000010; - source_ = value; - onChanged(); - return this; - } - /** - *
-       * From the bbox field.
-       * 
- * - * optional string source = 17; - * @return This builder for chaining. - */ - public Builder clearSource() { - bitField0_ = (bitField0_ & ~0x00000010); - source_ = getDefaultInstance().getSource(); - onChanged(); - return this; - } - /** - *
-       * From the bbox field.
-       * 
- * - * optional string source = 17; - * @param value The bytes for source to set. - * @return This builder for chaining. - */ - public Builder setSourceBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000010; - source_ = value; - onChanged(); - return this; - } - - private long osmosisReplicationTimestamp_ ; - /** - *
-       * replication timestamp, expressed in seconds since the epoch, 
-       * otherwise the same value as in the "timestamp=..." field
-       * in the state.txt file used by Osmosis
-       * 
- * - * optional int64 osmosis_replication_timestamp = 32; - * @return Whether the osmosisReplicationTimestamp field is set. - */ - public boolean hasOsmosisReplicationTimestamp() { - return ((bitField0_ & 0x00000020) != 0); - } - /** - *
-       * replication timestamp, expressed in seconds since the epoch, 
-       * otherwise the same value as in the "timestamp=..." field
-       * in the state.txt file used by Osmosis
-       * 
- * - * optional int64 osmosis_replication_timestamp = 32; - * @return The osmosisReplicationTimestamp. - */ - public long getOsmosisReplicationTimestamp() { - return osmosisReplicationTimestamp_; - } - /** - *
-       * replication timestamp, expressed in seconds since the epoch, 
-       * otherwise the same value as in the "timestamp=..." field
-       * in the state.txt file used by Osmosis
-       * 
- * - * optional int64 osmosis_replication_timestamp = 32; - * @param value The osmosisReplicationTimestamp to set. - * @return This builder for chaining. - */ - public Builder setOsmosisReplicationTimestamp(long value) { - bitField0_ |= 0x00000020; - osmosisReplicationTimestamp_ = value; - onChanged(); - return this; - } - /** - *
-       * replication timestamp, expressed in seconds since the epoch, 
-       * otherwise the same value as in the "timestamp=..." field
-       * in the state.txt file used by Osmosis
-       * 
- * - * optional int64 osmosis_replication_timestamp = 32; - * @return This builder for chaining. - */ - public Builder clearOsmosisReplicationTimestamp() { - bitField0_ = (bitField0_ & ~0x00000020); - osmosisReplicationTimestamp_ = 0L; - onChanged(); - return this; - } - - private long osmosisReplicationSequenceNumber_ ; - /** - *
-       * replication sequence number (sequenceNumber in state.txt)
-       * 
- * - * optional int64 osmosis_replication_sequence_number = 33; - * @return Whether the osmosisReplicationSequenceNumber field is set. - */ - public boolean hasOsmosisReplicationSequenceNumber() { - return ((bitField0_ & 0x00000040) != 0); - } - /** - *
-       * replication sequence number (sequenceNumber in state.txt)
-       * 
- * - * optional int64 osmosis_replication_sequence_number = 33; - * @return The osmosisReplicationSequenceNumber. - */ - public long getOsmosisReplicationSequenceNumber() { - return osmosisReplicationSequenceNumber_; - } - /** - *
-       * replication sequence number (sequenceNumber in state.txt)
-       * 
- * - * optional int64 osmosis_replication_sequence_number = 33; - * @param value The osmosisReplicationSequenceNumber to set. - * @return This builder for chaining. - */ - public Builder setOsmosisReplicationSequenceNumber(long value) { - bitField0_ |= 0x00000040; - osmosisReplicationSequenceNumber_ = value; - onChanged(); - return this; - } - /** - *
-       * replication sequence number (sequenceNumber in state.txt)
-       * 
- * - * optional int64 osmosis_replication_sequence_number = 33; - * @return This builder for chaining. - */ - public Builder clearOsmosisReplicationSequenceNumber() { - bitField0_ = (bitField0_ & ~0x00000040); - osmosisReplicationSequenceNumber_ = 0L; - onChanged(); - return this; - } - - private Object osmosisReplicationBaseUrl_ = ""; - /** - *
-       * replication base URL (from Osmosis' configuration.txt file)
-       * 
- * - * optional string osmosis_replication_base_url = 34; - * @return Whether the osmosisReplicationBaseUrl field is set. - */ - public boolean hasOsmosisReplicationBaseUrl() { - return ((bitField0_ & 0x00000080) != 0); - } - /** - *
-       * replication base URL (from Osmosis' configuration.txt file)
-       * 
- * - * optional string osmosis_replication_base_url = 34; - * @return The osmosisReplicationBaseUrl. - */ - public String getOsmosisReplicationBaseUrl() { - Object ref = osmosisReplicationBaseUrl_; - if (!(ref instanceof String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - osmosisReplicationBaseUrl_ = s; - } - return s; - } else { - return (String) ref; - } - } - /** - *
-       * replication base URL (from Osmosis' configuration.txt file)
-       * 
- * - * optional string osmosis_replication_base_url = 34; - * @return The bytes for osmosisReplicationBaseUrl. - */ - public com.google.protobuf.ByteString - getOsmosisReplicationBaseUrlBytes() { - Object ref = osmosisReplicationBaseUrl_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (String) ref); - osmosisReplicationBaseUrl_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * replication base URL (from Osmosis' configuration.txt file)
-       * 
- * - * optional string osmosis_replication_base_url = 34; - * @param value The osmosisReplicationBaseUrl to set. - * @return This builder for chaining. - */ - public Builder setOsmosisReplicationBaseUrl( - String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000080; - osmosisReplicationBaseUrl_ = value; - onChanged(); - return this; - } - /** - *
-       * replication base URL (from Osmosis' configuration.txt file)
-       * 
- * - * optional string osmosis_replication_base_url = 34; - * @return This builder for chaining. - */ - public Builder clearOsmosisReplicationBaseUrl() { - bitField0_ = (bitField0_ & ~0x00000080); - osmosisReplicationBaseUrl_ = getDefaultInstance().getOsmosisReplicationBaseUrl(); - onChanged(); - return this; - } - /** - *
-       * replication base URL (from Osmosis' configuration.txt file)
-       * 
- * - * optional string osmosis_replication_base_url = 34; - * @param value The bytes for osmosisReplicationBaseUrl to set. - * @return This builder for chaining. - */ - public Builder setOsmosisReplicationBaseUrlBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000080; - osmosisReplicationBaseUrl_ = value; - onChanged(); - return this; - } - @Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:OSMPBF.HeaderBlock) - } - - // @@protoc_insertion_point(class_scope:OSMPBF.HeaderBlock) - private static final HeaderBlock DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new HeaderBlock(); - } - - public static HeaderBlock getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - @Deprecated public static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @Override - public HeaderBlock parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new HeaderBlock(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @Override - public HeaderBlock getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface HeaderBBoxOrBuilder extends - // @@protoc_insertion_point(interface_extends:OSMPBF.HeaderBBox) - com.google.protobuf.MessageOrBuilder { - - /** - * required sint64 left = 1; - * @return Whether the left field is set. - */ - boolean hasLeft(); - /** - * required sint64 left = 1; - * @return The left. - */ - long getLeft(); - - /** - * required sint64 right = 2; - * @return Whether the right field is set. - */ - boolean hasRight(); - /** - * required sint64 right = 2; - * @return The right. - */ - long getRight(); - - /** - * required sint64 top = 3; - * @return Whether the top field is set. - */ - boolean hasTop(); - /** - * required sint64 top = 3; - * @return The top. - */ - long getTop(); - - /** - * required sint64 bottom = 4; - * @return Whether the bottom field is set. - */ - boolean hasBottom(); - /** - * required sint64 bottom = 4; - * @return The bottom. - */ - long getBottom(); - } - /** - * Protobuf type {@code OSMPBF.HeaderBBox} - */ - public static final class HeaderBBox extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:OSMPBF.HeaderBBox) - HeaderBBoxOrBuilder { - private static final long serialVersionUID = 0L; - // Use HeaderBBox.newBuilder() to construct. - private HeaderBBox(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private HeaderBBox() { - } - - @Override - @SuppressWarnings({"unused"}) - protected Object newInstance( - UnusedPrivateParameter unused) { - return new HeaderBBox(); - } - - @Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private HeaderBBox( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - bitField0_ |= 0x00000001; - left_ = input.readSInt64(); - break; - } - case 16: { - bitField0_ |= 0x00000002; - right_ = input.readSInt64(); - break; - } - case 24: { - bitField0_ |= 0x00000004; - top_ = input.readSInt64(); - break; - } - case 32: { - bitField0_ |= 0x00000008; - bottom_ = input.readSInt64(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return internal_static_OSMPBF_HeaderBBox_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return internal_static_OSMPBF_HeaderBBox_fieldAccessorTable - .ensureFieldAccessorsInitialized( - HeaderBBox.class, HeaderBBox.Builder.class); - } - - private int bitField0_; - public static final int LEFT_FIELD_NUMBER = 1; - private long left_; - /** - * required sint64 left = 1; - * @return Whether the left field is set. - */ - public boolean hasLeft() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * required sint64 left = 1; - * @return The left. - */ - public long getLeft() { - return left_; - } - - public static final int RIGHT_FIELD_NUMBER = 2; - private long right_; - /** - * required sint64 right = 2; - * @return Whether the right field is set. - */ - public boolean hasRight() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * required sint64 right = 2; - * @return The right. - */ - public long getRight() { - return right_; - } - - public static final int TOP_FIELD_NUMBER = 3; - private long top_; - /** - * required sint64 top = 3; - * @return Whether the top field is set. - */ - public boolean hasTop() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - * required sint64 top = 3; - * @return The top. - */ - public long getTop() { - return top_; - } - - public static final int BOTTOM_FIELD_NUMBER = 4; - private long bottom_; - /** - * required sint64 bottom = 4; - * @return Whether the bottom field is set. - */ - public boolean hasBottom() { - return ((bitField0_ & 0x00000008) != 0); - } - /** - * required sint64 bottom = 4; - * @return The bottom. - */ - public long getBottom() { - return bottom_; - } - - private byte memoizedIsInitialized = -1; - @Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - if (!hasLeft()) { - memoizedIsInitialized = 0; - return false; - } - if (!hasRight()) { - memoizedIsInitialized = 0; - return false; - } - if (!hasTop()) { - memoizedIsInitialized = 0; - return false; - } - if (!hasBottom()) { - memoizedIsInitialized = 0; - return false; - } - memoizedIsInitialized = 1; - return true; - } - - @Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) != 0)) { - output.writeSInt64(1, left_); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeSInt64(2, right_); - } - if (((bitField0_ & 0x00000004) != 0)) { - output.writeSInt64(3, top_); - } - if (((bitField0_ & 0x00000008) != 0)) { - output.writeSInt64(4, bottom_); - } - unknownFields.writeTo(output); - } - - @Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeSInt64Size(1, left_); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeSInt64Size(2, right_); - } - if (((bitField0_ & 0x00000004) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeSInt64Size(3, top_); - } - if (((bitField0_ & 0x00000008) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeSInt64Size(4, bottom_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @Override - public boolean equals(final Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof HeaderBBox)) { - return super.equals(obj); - } - HeaderBBox other = (HeaderBBox) obj; - - if (hasLeft() != other.hasLeft()) return false; - if (hasLeft()) { - if (getLeft() - != other.getLeft()) return false; - } - if (hasRight() != other.hasRight()) return false; - if (hasRight()) { - if (getRight() - != other.getRight()) return false; - } - if (hasTop() != other.hasTop()) return false; - if (hasTop()) { - if (getTop() - != other.getTop()) return false; - } - if (hasBottom() != other.hasBottom()) return false; - if (hasBottom()) { - if (getBottom() - != other.getBottom()) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasLeft()) { - hash = (37 * hash) + LEFT_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getLeft()); - } - if (hasRight()) { - hash = (37 * hash) + RIGHT_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getRight()); - } - if (hasTop()) { - hash = (37 * hash) + TOP_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getTop()); - } - if (hasBottom()) { - hash = (37 * hash) + BOTTOM_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getBottom()); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static HeaderBBox parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static HeaderBBox parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static HeaderBBox parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static HeaderBBox parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static HeaderBBox parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static HeaderBBox parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static HeaderBBox parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static HeaderBBox parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static HeaderBBox parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static HeaderBBox parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static HeaderBBox parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static HeaderBBox parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(HeaderBBox prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @Override - protected Builder newBuilderForType( - BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code OSMPBF.HeaderBBox} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:OSMPBF.HeaderBBox) - HeaderBBoxOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return internal_static_OSMPBF_HeaderBBox_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return internal_static_OSMPBF_HeaderBBox_fieldAccessorTable - .ensureFieldAccessorsInitialized( - HeaderBBox.class, HeaderBBox.Builder.class); - } - - // Construct using HeaderBBox.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @Override - public Builder clear() { - super.clear(); - left_ = 0L; - bitField0_ = (bitField0_ & ~0x00000001); - right_ = 0L; - bitField0_ = (bitField0_ & ~0x00000002); - top_ = 0L; - bitField0_ = (bitField0_ & ~0x00000004); - bottom_ = 0L; - bitField0_ = (bitField0_ & ~0x00000008); - return this; - } - - @Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return internal_static_OSMPBF_HeaderBBox_descriptor; - } - - @Override - public HeaderBBox getDefaultInstanceForType() { - return HeaderBBox.getDefaultInstance(); - } - - @Override - public HeaderBBox build() { - HeaderBBox result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @Override - public HeaderBBox buildPartial() { - HeaderBBox result = new HeaderBBox(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.left_ = left_; - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.right_ = right_; - to_bitField0_ |= 0x00000002; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.top_ = top_; - to_bitField0_ |= 0x00000004; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.bottom_ = bottom_; - to_bitField0_ |= 0x00000008; - } - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - @Override - public Builder clone() { - return super.clone(); - } - @Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.setField(field, value); - } - @Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, Object value) { - return super.setRepeatedField(field, index, value); - } - @Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.addRepeatedField(field, value); - } - @Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof HeaderBBox) { - return mergeFrom((HeaderBBox)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(HeaderBBox other) { - if (other == HeaderBBox.getDefaultInstance()) return this; - if (other.hasLeft()) { - setLeft(other.getLeft()); - } - if (other.hasRight()) { - setRight(other.getRight()); - } - if (other.hasTop()) { - setTop(other.getTop()); - } - if (other.hasBottom()) { - setBottom(other.getBottom()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @Override - public final boolean isInitialized() { - if (!hasLeft()) { - return false; - } - if (!hasRight()) { - return false; - } - if (!hasTop()) { - return false; - } - if (!hasBottom()) { - return false; - } - return true; - } - - @Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - HeaderBBox parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (HeaderBBox) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private long left_ ; - /** - * required sint64 left = 1; - * @return Whether the left field is set. - */ - public boolean hasLeft() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * required sint64 left = 1; - * @return The left. - */ - public long getLeft() { - return left_; - } - /** - * required sint64 left = 1; - * @param value The left to set. - * @return This builder for chaining. - */ - public Builder setLeft(long value) { - bitField0_ |= 0x00000001; - left_ = value; - onChanged(); - return this; - } - /** - * required sint64 left = 1; - * @return This builder for chaining. - */ - public Builder clearLeft() { - bitField0_ = (bitField0_ & ~0x00000001); - left_ = 0L; - onChanged(); - return this; - } - - private long right_ ; - /** - * required sint64 right = 2; - * @return Whether the right field is set. - */ - public boolean hasRight() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * required sint64 right = 2; - * @return The right. - */ - public long getRight() { - return right_; - } - /** - * required sint64 right = 2; - * @param value The right to set. - * @return This builder for chaining. - */ - public Builder setRight(long value) { - bitField0_ |= 0x00000002; - right_ = value; - onChanged(); - return this; - } - /** - * required sint64 right = 2; - * @return This builder for chaining. - */ - public Builder clearRight() { - bitField0_ = (bitField0_ & ~0x00000002); - right_ = 0L; - onChanged(); - return this; - } - - private long top_ ; - /** - * required sint64 top = 3; - * @return Whether the top field is set. - */ - public boolean hasTop() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - * required sint64 top = 3; - * @return The top. - */ - public long getTop() { - return top_; - } - /** - * required sint64 top = 3; - * @param value The top to set. - * @return This builder for chaining. - */ - public Builder setTop(long value) { - bitField0_ |= 0x00000004; - top_ = value; - onChanged(); - return this; - } - /** - * required sint64 top = 3; - * @return This builder for chaining. - */ - public Builder clearTop() { - bitField0_ = (bitField0_ & ~0x00000004); - top_ = 0L; - onChanged(); - return this; - } - - private long bottom_ ; - /** - * required sint64 bottom = 4; - * @return Whether the bottom field is set. - */ - public boolean hasBottom() { - return ((bitField0_ & 0x00000008) != 0); - } - /** - * required sint64 bottom = 4; - * @return The bottom. - */ - public long getBottom() { - return bottom_; - } - /** - * required sint64 bottom = 4; - * @param value The bottom to set. - * @return This builder for chaining. - */ - public Builder setBottom(long value) { - bitField0_ |= 0x00000008; - bottom_ = value; - onChanged(); - return this; - } - /** - * required sint64 bottom = 4; - * @return This builder for chaining. - */ - public Builder clearBottom() { - bitField0_ = (bitField0_ & ~0x00000008); - bottom_ = 0L; - onChanged(); - return this; - } - @Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:OSMPBF.HeaderBBox) - } - - // @@protoc_insertion_point(class_scope:OSMPBF.HeaderBBox) - private static final HeaderBBox DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new HeaderBBox(); - } - - public static HeaderBBox getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - @Deprecated public static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @Override - public HeaderBBox parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new HeaderBBox(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @Override - public HeaderBBox getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface PrimitiveBlockOrBuilder extends - // @@protoc_insertion_point(interface_extends:OSMPBF.PrimitiveBlock) - com.google.protobuf.MessageOrBuilder { - - /** - * required .OSMPBF.StringTable stringtable = 1; - * @return Whether the stringtable field is set. - */ - boolean hasStringtable(); - /** - * required .OSMPBF.StringTable stringtable = 1; - * @return The stringtable. - */ - StringTable getStringtable(); - /** - * required .OSMPBF.StringTable stringtable = 1; - */ - StringTableOrBuilder getStringtableOrBuilder(); - - /** - * repeated .OSMPBF.PrimitiveGroup primitivegroup = 2; - */ - java.util.List - getPrimitivegroupList(); - /** - * repeated .OSMPBF.PrimitiveGroup primitivegroup = 2; - */ - PrimitiveGroup getPrimitivegroup(int index); - /** - * repeated .OSMPBF.PrimitiveGroup primitivegroup = 2; - */ - int getPrimitivegroupCount(); - /** - * repeated .OSMPBF.PrimitiveGroup primitivegroup = 2; - */ - java.util.List - getPrimitivegroupOrBuilderList(); - /** - * repeated .OSMPBF.PrimitiveGroup primitivegroup = 2; - */ - PrimitiveGroupOrBuilder getPrimitivegroupOrBuilder( - int index); - - /** - *
-     * Granularity, units of nanodegrees, used to store coordinates in this block
-     * 
- * - * optional int32 granularity = 17 [default = 100]; - * @return Whether the granularity field is set. - */ - boolean hasGranularity(); - /** - *
-     * Granularity, units of nanodegrees, used to store coordinates in this block
-     * 
- * - * optional int32 granularity = 17 [default = 100]; - * @return The granularity. - */ - int getGranularity(); - - /** - *
-     * Offset value between the output coordinates coordinates and the granularity grid in unites of nanodegrees.
-     * 
- * - * optional int64 lat_offset = 19 [default = 0]; - * @return Whether the latOffset field is set. - */ - boolean hasLatOffset(); - /** - *
-     * Offset value between the output coordinates coordinates and the granularity grid in unites of nanodegrees.
-     * 
- * - * optional int64 lat_offset = 19 [default = 0]; - * @return The latOffset. - */ - long getLatOffset(); - - /** - * optional int64 lon_offset = 20 [default = 0]; - * @return Whether the lonOffset field is set. - */ - boolean hasLonOffset(); - /** - * optional int64 lon_offset = 20 [default = 0]; - * @return The lonOffset. - */ - long getLonOffset(); - - /** - *
-     * Granularity of dates, normally represented in units of milliseconds since the 1970 epoch.
-     * 
- * - * optional int32 date_granularity = 18 [default = 1000]; - * @return Whether the dateGranularity field is set. - */ - boolean hasDateGranularity(); - /** - *
-     * Granularity of dates, normally represented in units of milliseconds since the 1970 epoch.
-     * 
- * - * optional int32 date_granularity = 18 [default = 1000]; - * @return The dateGranularity. - */ - int getDateGranularity(); - } - /** - * Protobuf type {@code OSMPBF.PrimitiveBlock} - */ - public static final class PrimitiveBlock extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:OSMPBF.PrimitiveBlock) - PrimitiveBlockOrBuilder { - private static final long serialVersionUID = 0L; - // Use PrimitiveBlock.newBuilder() to construct. - private PrimitiveBlock(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private PrimitiveBlock() { - primitivegroup_ = java.util.Collections.emptyList(); - granularity_ = 100; - dateGranularity_ = 1000; - } - - @Override - @SuppressWarnings({"unused"}) - protected Object newInstance( - UnusedPrivateParameter unused) { - return new PrimitiveBlock(); - } - - @Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private PrimitiveBlock( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - StringTable.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = stringtable_.toBuilder(); - } - stringtable_ = input.readMessage(StringTable.PARSER, extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(stringtable_); - stringtable_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - primitivegroup_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - primitivegroup_.add( - input.readMessage(PrimitiveGroup.PARSER, extensionRegistry)); - break; - } - case 136: { - bitField0_ |= 0x00000002; - granularity_ = input.readInt32(); - break; - } - case 144: { - bitField0_ |= 0x00000010; - dateGranularity_ = input.readInt32(); - break; - } - case 152: { - bitField0_ |= 0x00000004; - latOffset_ = input.readInt64(); - break; - } - case 160: { - bitField0_ |= 0x00000008; - lonOffset_ = input.readInt64(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000002) != 0)) { - primitivegroup_ = java.util.Collections.unmodifiableList(primitivegroup_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return internal_static_OSMPBF_PrimitiveBlock_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return internal_static_OSMPBF_PrimitiveBlock_fieldAccessorTable - .ensureFieldAccessorsInitialized( - PrimitiveBlock.class, PrimitiveBlock.Builder.class); - } - - private int bitField0_; - public static final int STRINGTABLE_FIELD_NUMBER = 1; - private StringTable stringtable_; - /** - * required .OSMPBF.StringTable stringtable = 1; - * @return Whether the stringtable field is set. - */ - public boolean hasStringtable() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * required .OSMPBF.StringTable stringtable = 1; - * @return The stringtable. - */ - public StringTable getStringtable() { - return stringtable_ == null ? StringTable.getDefaultInstance() : stringtable_; - } - /** - * required .OSMPBF.StringTable stringtable = 1; - */ - public StringTableOrBuilder getStringtableOrBuilder() { - return stringtable_ == null ? StringTable.getDefaultInstance() : stringtable_; - } - - public static final int PRIMITIVEGROUP_FIELD_NUMBER = 2; - private java.util.List primitivegroup_; - /** - * repeated .OSMPBF.PrimitiveGroup primitivegroup = 2; - */ - public java.util.List getPrimitivegroupList() { - return primitivegroup_; - } - /** - * repeated .OSMPBF.PrimitiveGroup primitivegroup = 2; - */ - public java.util.List - getPrimitivegroupOrBuilderList() { - return primitivegroup_; - } - /** - * repeated .OSMPBF.PrimitiveGroup primitivegroup = 2; - */ - public int getPrimitivegroupCount() { - return primitivegroup_.size(); - } - /** - * repeated .OSMPBF.PrimitiveGroup primitivegroup = 2; - */ - public PrimitiveGroup getPrimitivegroup(int index) { - return primitivegroup_.get(index); - } - /** - * repeated .OSMPBF.PrimitiveGroup primitivegroup = 2; - */ - public PrimitiveGroupOrBuilder getPrimitivegroupOrBuilder( - int index) { - return primitivegroup_.get(index); - } - - public static final int GRANULARITY_FIELD_NUMBER = 17; - private int granularity_; - /** - *
-     * Granularity, units of nanodegrees, used to store coordinates in this block
-     * 
- * - * optional int32 granularity = 17 [default = 100]; - * @return Whether the granularity field is set. - */ - public boolean hasGranularity() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - *
-     * Granularity, units of nanodegrees, used to store coordinates in this block
-     * 
- * - * optional int32 granularity = 17 [default = 100]; - * @return The granularity. - */ - public int getGranularity() { - return granularity_; - } - - public static final int LAT_OFFSET_FIELD_NUMBER = 19; - private long latOffset_; - /** - *
-     * Offset value between the output coordinates coordinates and the granularity grid in unites of nanodegrees.
-     * 
- * - * optional int64 lat_offset = 19 [default = 0]; - * @return Whether the latOffset field is set. - */ - public boolean hasLatOffset() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - *
-     * Offset value between the output coordinates coordinates and the granularity grid in unites of nanodegrees.
-     * 
- * - * optional int64 lat_offset = 19 [default = 0]; - * @return The latOffset. - */ - public long getLatOffset() { - return latOffset_; - } - - public static final int LON_OFFSET_FIELD_NUMBER = 20; - private long lonOffset_; - /** - * optional int64 lon_offset = 20 [default = 0]; - * @return Whether the lonOffset field is set. - */ - public boolean hasLonOffset() { - return ((bitField0_ & 0x00000008) != 0); - } - /** - * optional int64 lon_offset = 20 [default = 0]; - * @return The lonOffset. - */ - public long getLonOffset() { - return lonOffset_; - } - - public static final int DATE_GRANULARITY_FIELD_NUMBER = 18; - private int dateGranularity_; - /** - *
-     * Granularity of dates, normally represented in units of milliseconds since the 1970 epoch.
-     * 
- * - * optional int32 date_granularity = 18 [default = 1000]; - * @return Whether the dateGranularity field is set. - */ - public boolean hasDateGranularity() { - return ((bitField0_ & 0x00000010) != 0); - } - /** - *
-     * Granularity of dates, normally represented in units of milliseconds since the 1970 epoch.
-     * 
- * - * optional int32 date_granularity = 18 [default = 1000]; - * @return The dateGranularity. - */ - public int getDateGranularity() { - return dateGranularity_; - } - - private byte memoizedIsInitialized = -1; - @Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - if (!hasStringtable()) { - memoizedIsInitialized = 0; - return false; - } - for (int i = 0; i < getPrimitivegroupCount(); i++) { - if (!getPrimitivegroup(i).isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - memoizedIsInitialized = 1; - return true; - } - - @Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(1, getStringtable()); - } - for (int i = 0; i < primitivegroup_.size(); i++) { - output.writeMessage(2, primitivegroup_.get(i)); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeInt32(17, granularity_); - } - if (((bitField0_ & 0x00000010) != 0)) { - output.writeInt32(18, dateGranularity_); - } - if (((bitField0_ & 0x00000004) != 0)) { - output.writeInt64(19, latOffset_); - } - if (((bitField0_ & 0x00000008) != 0)) { - output.writeInt64(20, lonOffset_); - } - unknownFields.writeTo(output); - } - - @Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getStringtable()); - } - for (int i = 0; i < primitivegroup_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, primitivegroup_.get(i)); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(17, granularity_); - } - if (((bitField0_ & 0x00000010) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(18, dateGranularity_); - } - if (((bitField0_ & 0x00000004) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(19, latOffset_); - } - if (((bitField0_ & 0x00000008) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(20, lonOffset_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @Override - public boolean equals(final Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof PrimitiveBlock)) { - return super.equals(obj); - } - PrimitiveBlock other = (PrimitiveBlock) obj; - - if (hasStringtable() != other.hasStringtable()) return false; - if (hasStringtable()) { - if (!getStringtable() - .equals(other.getStringtable())) return false; - } - if (!getPrimitivegroupList() - .equals(other.getPrimitivegroupList())) return false; - if (hasGranularity() != other.hasGranularity()) return false; - if (hasGranularity()) { - if (getGranularity() - != other.getGranularity()) return false; - } - if (hasLatOffset() != other.hasLatOffset()) return false; - if (hasLatOffset()) { - if (getLatOffset() - != other.getLatOffset()) return false; - } - if (hasLonOffset() != other.hasLonOffset()) return false; - if (hasLonOffset()) { - if (getLonOffset() - != other.getLonOffset()) return false; - } - if (hasDateGranularity() != other.hasDateGranularity()) return false; - if (hasDateGranularity()) { - if (getDateGranularity() - != other.getDateGranularity()) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasStringtable()) { - hash = (37 * hash) + STRINGTABLE_FIELD_NUMBER; - hash = (53 * hash) + getStringtable().hashCode(); - } - if (getPrimitivegroupCount() > 0) { - hash = (37 * hash) + PRIMITIVEGROUP_FIELD_NUMBER; - hash = (53 * hash) + getPrimitivegroupList().hashCode(); - } - if (hasGranularity()) { - hash = (37 * hash) + GRANULARITY_FIELD_NUMBER; - hash = (53 * hash) + getGranularity(); - } - if (hasLatOffset()) { - hash = (37 * hash) + LAT_OFFSET_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getLatOffset()); - } - if (hasLonOffset()) { - hash = (37 * hash) + LON_OFFSET_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getLonOffset()); - } - if (hasDateGranularity()) { - hash = (37 * hash) + DATE_GRANULARITY_FIELD_NUMBER; - hash = (53 * hash) + getDateGranularity(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static PrimitiveBlock parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static PrimitiveBlock parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static PrimitiveBlock parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static PrimitiveBlock parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static PrimitiveBlock parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static PrimitiveBlock parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static PrimitiveBlock parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static PrimitiveBlock parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static PrimitiveBlock parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static PrimitiveBlock parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static PrimitiveBlock parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static PrimitiveBlock parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(PrimitiveBlock prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @Override - protected Builder newBuilderForType( - BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code OSMPBF.PrimitiveBlock} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:OSMPBF.PrimitiveBlock) - PrimitiveBlockOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return internal_static_OSMPBF_PrimitiveBlock_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return internal_static_OSMPBF_PrimitiveBlock_fieldAccessorTable - .ensureFieldAccessorsInitialized( - PrimitiveBlock.class, PrimitiveBlock.Builder.class); - } - - // Construct using PrimitiveBlock.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getStringtableFieldBuilder(); - getPrimitivegroupFieldBuilder(); - } - } - @Override - public Builder clear() { - super.clear(); - if (stringtableBuilder_ == null) { - stringtable_ = null; - } else { - stringtableBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - if (primitivegroupBuilder_ == null) { - primitivegroup_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - primitivegroupBuilder_.clear(); - } - granularity_ = 100; - bitField0_ = (bitField0_ & ~0x00000004); - latOffset_ = 0L; - bitField0_ = (bitField0_ & ~0x00000008); - lonOffset_ = 0L; - bitField0_ = (bitField0_ & ~0x00000010); - dateGranularity_ = 1000; - bitField0_ = (bitField0_ & ~0x00000020); - return this; - } - - @Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return internal_static_OSMPBF_PrimitiveBlock_descriptor; - } - - @Override - public PrimitiveBlock getDefaultInstanceForType() { - return PrimitiveBlock.getDefaultInstance(); - } - - @Override - public PrimitiveBlock build() { - PrimitiveBlock result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @Override - public PrimitiveBlock buildPartial() { - PrimitiveBlock result = new PrimitiveBlock(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - if (stringtableBuilder_ == null) { - result.stringtable_ = stringtable_; - } else { - result.stringtable_ = stringtableBuilder_.build(); - } - to_bitField0_ |= 0x00000001; - } - if (primitivegroupBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - primitivegroup_ = java.util.Collections.unmodifiableList(primitivegroup_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.primitivegroup_ = primitivegroup_; - } else { - result.primitivegroup_ = primitivegroupBuilder_.build(); - } - if (((from_bitField0_ & 0x00000004) != 0)) { - to_bitField0_ |= 0x00000002; - } - result.granularity_ = granularity_; - if (((from_bitField0_ & 0x00000008) != 0)) { - result.latOffset_ = latOffset_; - to_bitField0_ |= 0x00000004; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.lonOffset_ = lonOffset_; - to_bitField0_ |= 0x00000008; - } - if (((from_bitField0_ & 0x00000020) != 0)) { - to_bitField0_ |= 0x00000010; - } - result.dateGranularity_ = dateGranularity_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - @Override - public Builder clone() { - return super.clone(); - } - @Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.setField(field, value); - } - @Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, Object value) { - return super.setRepeatedField(field, index, value); - } - @Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.addRepeatedField(field, value); - } - @Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof PrimitiveBlock) { - return mergeFrom((PrimitiveBlock)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(PrimitiveBlock other) { - if (other == PrimitiveBlock.getDefaultInstance()) return this; - if (other.hasStringtable()) { - mergeStringtable(other.getStringtable()); - } - if (primitivegroupBuilder_ == null) { - if (!other.primitivegroup_.isEmpty()) { - if (primitivegroup_.isEmpty()) { - primitivegroup_ = other.primitivegroup_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensurePrimitivegroupIsMutable(); - primitivegroup_.addAll(other.primitivegroup_); - } - onChanged(); - } - } else { - if (!other.primitivegroup_.isEmpty()) { - if (primitivegroupBuilder_.isEmpty()) { - primitivegroupBuilder_.dispose(); - primitivegroupBuilder_ = null; - primitivegroup_ = other.primitivegroup_; - bitField0_ = (bitField0_ & ~0x00000002); - primitivegroupBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getPrimitivegroupFieldBuilder() : null; - } else { - primitivegroupBuilder_.addAllMessages(other.primitivegroup_); - } - } - } - if (other.hasGranularity()) { - setGranularity(other.getGranularity()); - } - if (other.hasLatOffset()) { - setLatOffset(other.getLatOffset()); - } - if (other.hasLonOffset()) { - setLonOffset(other.getLonOffset()); - } - if (other.hasDateGranularity()) { - setDateGranularity(other.getDateGranularity()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @Override - public final boolean isInitialized() { - if (!hasStringtable()) { - return false; - } - for (int i = 0; i < getPrimitivegroupCount(); i++) { - if (!getPrimitivegroup(i).isInitialized()) { - return false; - } - } - return true; - } - - @Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - PrimitiveBlock parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (PrimitiveBlock) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private StringTable stringtable_; - private com.google.protobuf.SingleFieldBuilderV3< - StringTable, StringTable.Builder, StringTableOrBuilder> stringtableBuilder_; - /** - * required .OSMPBF.StringTable stringtable = 1; - * @return Whether the stringtable field is set. - */ - public boolean hasStringtable() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * required .OSMPBF.StringTable stringtable = 1; - * @return The stringtable. - */ - public StringTable getStringtable() { - if (stringtableBuilder_ == null) { - return stringtable_ == null ? StringTable.getDefaultInstance() : stringtable_; - } else { - return stringtableBuilder_.getMessage(); - } - } - /** - * required .OSMPBF.StringTable stringtable = 1; - */ - public Builder setStringtable(StringTable value) { - if (stringtableBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - stringtable_ = value; - onChanged(); - } else { - stringtableBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - return this; - } - /** - * required .OSMPBF.StringTable stringtable = 1; - */ - public Builder setStringtable( - StringTable.Builder builderForValue) { - if (stringtableBuilder_ == null) { - stringtable_ = builderForValue.build(); - onChanged(); - } else { - stringtableBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - return this; - } - /** - * required .OSMPBF.StringTable stringtable = 1; - */ - public Builder mergeStringtable(StringTable value) { - if (stringtableBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - stringtable_ != null && - stringtable_ != StringTable.getDefaultInstance()) { - stringtable_ = - StringTable.newBuilder(stringtable_).mergeFrom(value).buildPartial(); - } else { - stringtable_ = value; - } - onChanged(); - } else { - stringtableBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000001; - return this; - } - /** - * required .OSMPBF.StringTable stringtable = 1; - */ - public Builder clearStringtable() { - if (stringtableBuilder_ == null) { - stringtable_ = null; - onChanged(); - } else { - stringtableBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - /** - * required .OSMPBF.StringTable stringtable = 1; - */ - public StringTable.Builder getStringtableBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getStringtableFieldBuilder().getBuilder(); - } - /** - * required .OSMPBF.StringTable stringtable = 1; - */ - public StringTableOrBuilder getStringtableOrBuilder() { - if (stringtableBuilder_ != null) { - return stringtableBuilder_.getMessageOrBuilder(); - } else { - return stringtable_ == null ? - StringTable.getDefaultInstance() : stringtable_; - } - } - /** - * required .OSMPBF.StringTable stringtable = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - StringTable, StringTable.Builder, StringTableOrBuilder> - getStringtableFieldBuilder() { - if (stringtableBuilder_ == null) { - stringtableBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - StringTable, StringTable.Builder, StringTableOrBuilder>( - getStringtable(), - getParentForChildren(), - isClean()); - stringtable_ = null; - } - return stringtableBuilder_; - } - - private java.util.List primitivegroup_ = - java.util.Collections.emptyList(); - private void ensurePrimitivegroupIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - primitivegroup_ = new java.util.ArrayList(primitivegroup_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - PrimitiveGroup, PrimitiveGroup.Builder, PrimitiveGroupOrBuilder> primitivegroupBuilder_; - - /** - * repeated .OSMPBF.PrimitiveGroup primitivegroup = 2; - */ - public java.util.List getPrimitivegroupList() { - if (primitivegroupBuilder_ == null) { - return java.util.Collections.unmodifiableList(primitivegroup_); - } else { - return primitivegroupBuilder_.getMessageList(); - } - } - /** - * repeated .OSMPBF.PrimitiveGroup primitivegroup = 2; - */ - public int getPrimitivegroupCount() { - if (primitivegroupBuilder_ == null) { - return primitivegroup_.size(); - } else { - return primitivegroupBuilder_.getCount(); - } - } - /** - * repeated .OSMPBF.PrimitiveGroup primitivegroup = 2; - */ - public PrimitiveGroup getPrimitivegroup(int index) { - if (primitivegroupBuilder_ == null) { - return primitivegroup_.get(index); - } else { - return primitivegroupBuilder_.getMessage(index); - } - } - /** - * repeated .OSMPBF.PrimitiveGroup primitivegroup = 2; - */ - public Builder setPrimitivegroup( - int index, PrimitiveGroup value) { - if (primitivegroupBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePrimitivegroupIsMutable(); - primitivegroup_.set(index, value); - onChanged(); - } else { - primitivegroupBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .OSMPBF.PrimitiveGroup primitivegroup = 2; - */ - public Builder setPrimitivegroup( - int index, PrimitiveGroup.Builder builderForValue) { - if (primitivegroupBuilder_ == null) { - ensurePrimitivegroupIsMutable(); - primitivegroup_.set(index, builderForValue.build()); - onChanged(); - } else { - primitivegroupBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .OSMPBF.PrimitiveGroup primitivegroup = 2; - */ - public Builder addPrimitivegroup(PrimitiveGroup value) { - if (primitivegroupBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePrimitivegroupIsMutable(); - primitivegroup_.add(value); - onChanged(); - } else { - primitivegroupBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .OSMPBF.PrimitiveGroup primitivegroup = 2; - */ - public Builder addPrimitivegroup( - int index, PrimitiveGroup value) { - if (primitivegroupBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePrimitivegroupIsMutable(); - primitivegroup_.add(index, value); - onChanged(); - } else { - primitivegroupBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .OSMPBF.PrimitiveGroup primitivegroup = 2; - */ - public Builder addPrimitivegroup( - PrimitiveGroup.Builder builderForValue) { - if (primitivegroupBuilder_ == null) { - ensurePrimitivegroupIsMutable(); - primitivegroup_.add(builderForValue.build()); - onChanged(); - } else { - primitivegroupBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .OSMPBF.PrimitiveGroup primitivegroup = 2; - */ - public Builder addPrimitivegroup( - int index, PrimitiveGroup.Builder builderForValue) { - if (primitivegroupBuilder_ == null) { - ensurePrimitivegroupIsMutable(); - primitivegroup_.add(index, builderForValue.build()); - onChanged(); - } else { - primitivegroupBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .OSMPBF.PrimitiveGroup primitivegroup = 2; - */ - public Builder addAllPrimitivegroup( - Iterable values) { - if (primitivegroupBuilder_ == null) { - ensurePrimitivegroupIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, primitivegroup_); - onChanged(); - } else { - primitivegroupBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .OSMPBF.PrimitiveGroup primitivegroup = 2; - */ - public Builder clearPrimitivegroup() { - if (primitivegroupBuilder_ == null) { - primitivegroup_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - primitivegroupBuilder_.clear(); - } - return this; - } - /** - * repeated .OSMPBF.PrimitiveGroup primitivegroup = 2; - */ - public Builder removePrimitivegroup(int index) { - if (primitivegroupBuilder_ == null) { - ensurePrimitivegroupIsMutable(); - primitivegroup_.remove(index); - onChanged(); - } else { - primitivegroupBuilder_.remove(index); - } - return this; - } - /** - * repeated .OSMPBF.PrimitiveGroup primitivegroup = 2; - */ - public PrimitiveGroup.Builder getPrimitivegroupBuilder( - int index) { - return getPrimitivegroupFieldBuilder().getBuilder(index); - } - /** - * repeated .OSMPBF.PrimitiveGroup primitivegroup = 2; - */ - public PrimitiveGroupOrBuilder getPrimitivegroupOrBuilder( - int index) { - if (primitivegroupBuilder_ == null) { - return primitivegroup_.get(index); } else { - return primitivegroupBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .OSMPBF.PrimitiveGroup primitivegroup = 2; - */ - public java.util.List - getPrimitivegroupOrBuilderList() { - if (primitivegroupBuilder_ != null) { - return primitivegroupBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(primitivegroup_); - } - } - /** - * repeated .OSMPBF.PrimitiveGroup primitivegroup = 2; - */ - public PrimitiveGroup.Builder addPrimitivegroupBuilder() { - return getPrimitivegroupFieldBuilder().addBuilder( - PrimitiveGroup.getDefaultInstance()); - } - /** - * repeated .OSMPBF.PrimitiveGroup primitivegroup = 2; - */ - public PrimitiveGroup.Builder addPrimitivegroupBuilder( - int index) { - return getPrimitivegroupFieldBuilder().addBuilder( - index, PrimitiveGroup.getDefaultInstance()); - } - /** - * repeated .OSMPBF.PrimitiveGroup primitivegroup = 2; - */ - public java.util.List - getPrimitivegroupBuilderList() { - return getPrimitivegroupFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - PrimitiveGroup, PrimitiveGroup.Builder, PrimitiveGroupOrBuilder> - getPrimitivegroupFieldBuilder() { - if (primitivegroupBuilder_ == null) { - primitivegroupBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - PrimitiveGroup, PrimitiveGroup.Builder, PrimitiveGroupOrBuilder>( - primitivegroup_, - ((bitField0_ & 0x00000002) != 0), - getParentForChildren(), - isClean()); - primitivegroup_ = null; - } - return primitivegroupBuilder_; - } - - private int granularity_ = 100; - /** - *
-       * Granularity, units of nanodegrees, used to store coordinates in this block
-       * 
- * - * optional int32 granularity = 17 [default = 100]; - * @return Whether the granularity field is set. - */ - public boolean hasGranularity() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - *
-       * Granularity, units of nanodegrees, used to store coordinates in this block
-       * 
- * - * optional int32 granularity = 17 [default = 100]; - * @return The granularity. - */ - public int getGranularity() { - return granularity_; - } - /** - *
-       * Granularity, units of nanodegrees, used to store coordinates in this block
-       * 
- * - * optional int32 granularity = 17 [default = 100]; - * @param value The granularity to set. - * @return This builder for chaining. - */ - public Builder setGranularity(int value) { - bitField0_ |= 0x00000004; - granularity_ = value; - onChanged(); - return this; - } - /** - *
-       * Granularity, units of nanodegrees, used to store coordinates in this block
-       * 
- * - * optional int32 granularity = 17 [default = 100]; - * @return This builder for chaining. - */ - public Builder clearGranularity() { - bitField0_ = (bitField0_ & ~0x00000004); - granularity_ = 100; - onChanged(); - return this; - } - - private long latOffset_ ; - /** - *
-       * Offset value between the output coordinates coordinates and the granularity grid in unites of nanodegrees.
-       * 
- * - * optional int64 lat_offset = 19 [default = 0]; - * @return Whether the latOffset field is set. - */ - public boolean hasLatOffset() { - return ((bitField0_ & 0x00000008) != 0); - } - /** - *
-       * Offset value between the output coordinates coordinates and the granularity grid in unites of nanodegrees.
-       * 
- * - * optional int64 lat_offset = 19 [default = 0]; - * @return The latOffset. - */ - public long getLatOffset() { - return latOffset_; - } - /** - *
-       * Offset value between the output coordinates coordinates and the granularity grid in unites of nanodegrees.
-       * 
- * - * optional int64 lat_offset = 19 [default = 0]; - * @param value The latOffset to set. - * @return This builder for chaining. - */ - public Builder setLatOffset(long value) { - bitField0_ |= 0x00000008; - latOffset_ = value; - onChanged(); - return this; - } - /** - *
-       * Offset value between the output coordinates coordinates and the granularity grid in unites of nanodegrees.
-       * 
- * - * optional int64 lat_offset = 19 [default = 0]; - * @return This builder for chaining. - */ - public Builder clearLatOffset() { - bitField0_ = (bitField0_ & ~0x00000008); - latOffset_ = 0L; - onChanged(); - return this; - } - - private long lonOffset_ ; - /** - * optional int64 lon_offset = 20 [default = 0]; - * @return Whether the lonOffset field is set. - */ - public boolean hasLonOffset() { - return ((bitField0_ & 0x00000010) != 0); - } - /** - * optional int64 lon_offset = 20 [default = 0]; - * @return The lonOffset. - */ - public long getLonOffset() { - return lonOffset_; - } - /** - * optional int64 lon_offset = 20 [default = 0]; - * @param value The lonOffset to set. - * @return This builder for chaining. - */ - public Builder setLonOffset(long value) { - bitField0_ |= 0x00000010; - lonOffset_ = value; - onChanged(); - return this; - } - /** - * optional int64 lon_offset = 20 [default = 0]; - * @return This builder for chaining. - */ - public Builder clearLonOffset() { - bitField0_ = (bitField0_ & ~0x00000010); - lonOffset_ = 0L; - onChanged(); - return this; - } - - private int dateGranularity_ = 1000; - /** - *
-       * Granularity of dates, normally represented in units of milliseconds since the 1970 epoch.
-       * 
- * - * optional int32 date_granularity = 18 [default = 1000]; - * @return Whether the dateGranularity field is set. - */ - public boolean hasDateGranularity() { - return ((bitField0_ & 0x00000020) != 0); - } - /** - *
-       * Granularity of dates, normally represented in units of milliseconds since the 1970 epoch.
-       * 
- * - * optional int32 date_granularity = 18 [default = 1000]; - * @return The dateGranularity. - */ - public int getDateGranularity() { - return dateGranularity_; - } - /** - *
-       * Granularity of dates, normally represented in units of milliseconds since the 1970 epoch.
-       * 
- * - * optional int32 date_granularity = 18 [default = 1000]; - * @param value The dateGranularity to set. - * @return This builder for chaining. - */ - public Builder setDateGranularity(int value) { - bitField0_ |= 0x00000020; - dateGranularity_ = value; - onChanged(); - return this; - } - /** - *
-       * Granularity of dates, normally represented in units of milliseconds since the 1970 epoch.
-       * 
- * - * optional int32 date_granularity = 18 [default = 1000]; - * @return This builder for chaining. - */ - public Builder clearDateGranularity() { - bitField0_ = (bitField0_ & ~0x00000020); - dateGranularity_ = 1000; - onChanged(); - return this; - } - @Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:OSMPBF.PrimitiveBlock) - } - - // @@protoc_insertion_point(class_scope:OSMPBF.PrimitiveBlock) - private static final PrimitiveBlock DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new PrimitiveBlock(); - } - - public static PrimitiveBlock getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - @Deprecated public static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @Override - public PrimitiveBlock parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new PrimitiveBlock(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @Override - public PrimitiveBlock getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface PrimitiveGroupOrBuilder extends - // @@protoc_insertion_point(interface_extends:OSMPBF.PrimitiveGroup) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated .OSMPBF.Node nodes = 1; - */ - java.util.List - getNodesList(); - /** - * repeated .OSMPBF.Node nodes = 1; - */ - Node getNodes(int index); - /** - * repeated .OSMPBF.Node nodes = 1; - */ - int getNodesCount(); - /** - * repeated .OSMPBF.Node nodes = 1; - */ - java.util.List - getNodesOrBuilderList(); - /** - * repeated .OSMPBF.Node nodes = 1; - */ - NodeOrBuilder getNodesOrBuilder( - int index); - - /** - * optional .OSMPBF.DenseNodes dense = 2; - * @return Whether the dense field is set. - */ - boolean hasDense(); - /** - * optional .OSMPBF.DenseNodes dense = 2; - * @return The dense. - */ - DenseNodes getDense(); - /** - * optional .OSMPBF.DenseNodes dense = 2; - */ - DenseNodesOrBuilder getDenseOrBuilder(); - - /** - * repeated .OSMPBF.Way ways = 3; - */ - java.util.List - getWaysList(); - /** - * repeated .OSMPBF.Way ways = 3; - */ - Way getWays(int index); - /** - * repeated .OSMPBF.Way ways = 3; - */ - int getWaysCount(); - /** - * repeated .OSMPBF.Way ways = 3; - */ - java.util.List - getWaysOrBuilderList(); - /** - * repeated .OSMPBF.Way ways = 3; - */ - WayOrBuilder getWaysOrBuilder( - int index); - - /** - * repeated .OSMPBF.Relation relations = 4; - */ - java.util.List - getRelationsList(); - /** - * repeated .OSMPBF.Relation relations = 4; - */ - Relation getRelations(int index); - /** - * repeated .OSMPBF.Relation relations = 4; - */ - int getRelationsCount(); - /** - * repeated .OSMPBF.Relation relations = 4; - */ - java.util.List - getRelationsOrBuilderList(); - /** - * repeated .OSMPBF.Relation relations = 4; - */ - RelationOrBuilder getRelationsOrBuilder( - int index); - - /** - * repeated .OSMPBF.ChangeSet changesets = 5; - */ - java.util.List - getChangesetsList(); - /** - * repeated .OSMPBF.ChangeSet changesets = 5; - */ - ChangeSet getChangesets(int index); - /** - * repeated .OSMPBF.ChangeSet changesets = 5; - */ - int getChangesetsCount(); - /** - * repeated .OSMPBF.ChangeSet changesets = 5; - */ - java.util.List - getChangesetsOrBuilderList(); - /** - * repeated .OSMPBF.ChangeSet changesets = 5; - */ - ChangeSetOrBuilder getChangesetsOrBuilder( - int index); - } - /** - *
-   * Group of OSMPrimitives. All primitives in a group must be the same type.
-   * 
- * - * Protobuf type {@code OSMPBF.PrimitiveGroup} - */ - public static final class PrimitiveGroup extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:OSMPBF.PrimitiveGroup) - PrimitiveGroupOrBuilder { - private static final long serialVersionUID = 0L; - // Use PrimitiveGroup.newBuilder() to construct. - private PrimitiveGroup(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private PrimitiveGroup() { - nodes_ = java.util.Collections.emptyList(); - ways_ = java.util.Collections.emptyList(); - relations_ = java.util.Collections.emptyList(); - changesets_ = java.util.Collections.emptyList(); - } - - @Override - @SuppressWarnings({"unused"}) - protected Object newInstance( - UnusedPrivateParameter unused) { - return new PrimitiveGroup(); - } - - @Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private PrimitiveGroup( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - nodes_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - nodes_.add( - input.readMessage(Node.PARSER, extensionRegistry)); - break; - } - case 18: { - DenseNodes.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = dense_.toBuilder(); - } - dense_ = input.readMessage(DenseNodes.PARSER, extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(dense_); - dense_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - break; - } - case 26: { - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - ways_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000004; - } - ways_.add( - input.readMessage(Way.PARSER, extensionRegistry)); - break; - } - case 34: { - if (!((mutable_bitField0_ & 0x00000008) != 0)) { - relations_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000008; - } - relations_.add( - input.readMessage(Relation.PARSER, extensionRegistry)); - break; - } - case 42: { - if (!((mutable_bitField0_ & 0x00000010) != 0)) { - changesets_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000010; - } - changesets_.add( - input.readMessage(ChangeSet.PARSER, extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - nodes_ = java.util.Collections.unmodifiableList(nodes_); - } - if (((mutable_bitField0_ & 0x00000004) != 0)) { - ways_ = java.util.Collections.unmodifiableList(ways_); - } - if (((mutable_bitField0_ & 0x00000008) != 0)) { - relations_ = java.util.Collections.unmodifiableList(relations_); - } - if (((mutable_bitField0_ & 0x00000010) != 0)) { - changesets_ = java.util.Collections.unmodifiableList(changesets_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return internal_static_OSMPBF_PrimitiveGroup_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return internal_static_OSMPBF_PrimitiveGroup_fieldAccessorTable - .ensureFieldAccessorsInitialized( - PrimitiveGroup.class, PrimitiveGroup.Builder.class); - } - - private int bitField0_; - public static final int NODES_FIELD_NUMBER = 1; - private java.util.List nodes_; - /** - * repeated .OSMPBF.Node nodes = 1; - */ - public java.util.List getNodesList() { - return nodes_; - } - /** - * repeated .OSMPBF.Node nodes = 1; - */ - public java.util.List - getNodesOrBuilderList() { - return nodes_; - } - /** - * repeated .OSMPBF.Node nodes = 1; - */ - public int getNodesCount() { - return nodes_.size(); - } - /** - * repeated .OSMPBF.Node nodes = 1; - */ - public Node getNodes(int index) { - return nodes_.get(index); - } - /** - * repeated .OSMPBF.Node nodes = 1; - */ - public NodeOrBuilder getNodesOrBuilder( - int index) { - return nodes_.get(index); - } - - public static final int DENSE_FIELD_NUMBER = 2; - private DenseNodes dense_; - /** - * optional .OSMPBF.DenseNodes dense = 2; - * @return Whether the dense field is set. - */ - public boolean hasDense() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * optional .OSMPBF.DenseNodes dense = 2; - * @return The dense. - */ - public DenseNodes getDense() { - return dense_ == null ? DenseNodes.getDefaultInstance() : dense_; - } - /** - * optional .OSMPBF.DenseNodes dense = 2; - */ - public DenseNodesOrBuilder getDenseOrBuilder() { - return dense_ == null ? DenseNodes.getDefaultInstance() : dense_; - } - - public static final int WAYS_FIELD_NUMBER = 3; - private java.util.List ways_; - /** - * repeated .OSMPBF.Way ways = 3; - */ - public java.util.List getWaysList() { - return ways_; - } - /** - * repeated .OSMPBF.Way ways = 3; - */ - public java.util.List - getWaysOrBuilderList() { - return ways_; - } - /** - * repeated .OSMPBF.Way ways = 3; - */ - public int getWaysCount() { - return ways_.size(); - } - /** - * repeated .OSMPBF.Way ways = 3; - */ - public Way getWays(int index) { - return ways_.get(index); - } - /** - * repeated .OSMPBF.Way ways = 3; - */ - public WayOrBuilder getWaysOrBuilder( - int index) { - return ways_.get(index); - } - - public static final int RELATIONS_FIELD_NUMBER = 4; - private java.util.List relations_; - /** - * repeated .OSMPBF.Relation relations = 4; - */ - public java.util.List getRelationsList() { - return relations_; - } - /** - * repeated .OSMPBF.Relation relations = 4; - */ - public java.util.List - getRelationsOrBuilderList() { - return relations_; - } - /** - * repeated .OSMPBF.Relation relations = 4; - */ - public int getRelationsCount() { - return relations_.size(); - } - /** - * repeated .OSMPBF.Relation relations = 4; - */ - public Relation getRelations(int index) { - return relations_.get(index); - } - /** - * repeated .OSMPBF.Relation relations = 4; - */ - public RelationOrBuilder getRelationsOrBuilder( - int index) { - return relations_.get(index); - } - - public static final int CHANGESETS_FIELD_NUMBER = 5; - private java.util.List changesets_; - /** - * repeated .OSMPBF.ChangeSet changesets = 5; - */ - public java.util.List getChangesetsList() { - return changesets_; - } - /** - * repeated .OSMPBF.ChangeSet changesets = 5; - */ - public java.util.List - getChangesetsOrBuilderList() { - return changesets_; - } - /** - * repeated .OSMPBF.ChangeSet changesets = 5; - */ - public int getChangesetsCount() { - return changesets_.size(); - } - /** - * repeated .OSMPBF.ChangeSet changesets = 5; - */ - public ChangeSet getChangesets(int index) { - return changesets_.get(index); - } - /** - * repeated .OSMPBF.ChangeSet changesets = 5; - */ - public ChangeSetOrBuilder getChangesetsOrBuilder( - int index) { - return changesets_.get(index); - } - - private byte memoizedIsInitialized = -1; - @Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - for (int i = 0; i < getNodesCount(); i++) { - if (!getNodes(i).isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - for (int i = 0; i < getWaysCount(); i++) { - if (!getWays(i).isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - for (int i = 0; i < getRelationsCount(); i++) { - if (!getRelations(i).isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - for (int i = 0; i < getChangesetsCount(); i++) { - if (!getChangesets(i).isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - memoizedIsInitialized = 1; - return true; - } - - @Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < nodes_.size(); i++) { - output.writeMessage(1, nodes_.get(i)); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(2, getDense()); - } - for (int i = 0; i < ways_.size(); i++) { - output.writeMessage(3, ways_.get(i)); - } - for (int i = 0; i < relations_.size(); i++) { - output.writeMessage(4, relations_.get(i)); - } - for (int i = 0; i < changesets_.size(); i++) { - output.writeMessage(5, changesets_.get(i)); - } - unknownFields.writeTo(output); - } - - @Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < nodes_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, nodes_.get(i)); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getDense()); - } - for (int i = 0; i < ways_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, ways_.get(i)); - } - for (int i = 0; i < relations_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, relations_.get(i)); - } - for (int i = 0; i < changesets_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, changesets_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @Override - public boolean equals(final Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof PrimitiveGroup)) { - return super.equals(obj); - } - PrimitiveGroup other = (PrimitiveGroup) obj; - - if (!getNodesList() - .equals(other.getNodesList())) return false; - if (hasDense() != other.hasDense()) return false; - if (hasDense()) { - if (!getDense() - .equals(other.getDense())) return false; - } - if (!getWaysList() - .equals(other.getWaysList())) return false; - if (!getRelationsList() - .equals(other.getRelationsList())) return false; - if (!getChangesetsList() - .equals(other.getChangesetsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getNodesCount() > 0) { - hash = (37 * hash) + NODES_FIELD_NUMBER; - hash = (53 * hash) + getNodesList().hashCode(); - } - if (hasDense()) { - hash = (37 * hash) + DENSE_FIELD_NUMBER; - hash = (53 * hash) + getDense().hashCode(); - } - if (getWaysCount() > 0) { - hash = (37 * hash) + WAYS_FIELD_NUMBER; - hash = (53 * hash) + getWaysList().hashCode(); - } - if (getRelationsCount() > 0) { - hash = (37 * hash) + RELATIONS_FIELD_NUMBER; - hash = (53 * hash) + getRelationsList().hashCode(); - } - if (getChangesetsCount() > 0) { - hash = (37 * hash) + CHANGESETS_FIELD_NUMBER; - hash = (53 * hash) + getChangesetsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static PrimitiveGroup parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static PrimitiveGroup parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static PrimitiveGroup parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static PrimitiveGroup parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static PrimitiveGroup parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static PrimitiveGroup parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static PrimitiveGroup parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static PrimitiveGroup parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static PrimitiveGroup parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static PrimitiveGroup parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static PrimitiveGroup parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static PrimitiveGroup parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(PrimitiveGroup prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @Override - protected Builder newBuilderForType( - BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Group of OSMPrimitives. All primitives in a group must be the same type.
-     * 
- * - * Protobuf type {@code OSMPBF.PrimitiveGroup} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:OSMPBF.PrimitiveGroup) - PrimitiveGroupOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return internal_static_OSMPBF_PrimitiveGroup_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return internal_static_OSMPBF_PrimitiveGroup_fieldAccessorTable - .ensureFieldAccessorsInitialized( - PrimitiveGroup.class, PrimitiveGroup.Builder.class); - } - - // Construct using PrimitiveGroup.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getNodesFieldBuilder(); - getDenseFieldBuilder(); - getWaysFieldBuilder(); - getRelationsFieldBuilder(); - getChangesetsFieldBuilder(); - } - } - @Override - public Builder clear() { - super.clear(); - if (nodesBuilder_ == null) { - nodes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - nodesBuilder_.clear(); - } - if (denseBuilder_ == null) { - dense_ = null; - } else { - denseBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000002); - if (waysBuilder_ == null) { - ways_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - } else { - waysBuilder_.clear(); - } - if (relationsBuilder_ == null) { - relations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - } else { - relationsBuilder_.clear(); - } - if (changesetsBuilder_ == null) { - changesets_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); - } else { - changesetsBuilder_.clear(); - } - return this; - } - - @Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return internal_static_OSMPBF_PrimitiveGroup_descriptor; - } - - @Override - public PrimitiveGroup getDefaultInstanceForType() { - return PrimitiveGroup.getDefaultInstance(); - } - - @Override - public PrimitiveGroup build() { - PrimitiveGroup result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @Override - public PrimitiveGroup buildPartial() { - PrimitiveGroup result = new PrimitiveGroup(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (nodesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - nodes_ = java.util.Collections.unmodifiableList(nodes_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.nodes_ = nodes_; - } else { - result.nodes_ = nodesBuilder_.build(); - } - if (((from_bitField0_ & 0x00000002) != 0)) { - if (denseBuilder_ == null) { - result.dense_ = dense_; - } else { - result.dense_ = denseBuilder_.build(); - } - to_bitField0_ |= 0x00000001; - } - if (waysBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0)) { - ways_ = java.util.Collections.unmodifiableList(ways_); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.ways_ = ways_; - } else { - result.ways_ = waysBuilder_.build(); - } - if (relationsBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0)) { - relations_ = java.util.Collections.unmodifiableList(relations_); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.relations_ = relations_; - } else { - result.relations_ = relationsBuilder_.build(); - } - if (changesetsBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0)) { - changesets_ = java.util.Collections.unmodifiableList(changesets_); - bitField0_ = (bitField0_ & ~0x00000010); - } - result.changesets_ = changesets_; - } else { - result.changesets_ = changesetsBuilder_.build(); - } - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - @Override - public Builder clone() { - return super.clone(); - } - @Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.setField(field, value); - } - @Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, Object value) { - return super.setRepeatedField(field, index, value); - } - @Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.addRepeatedField(field, value); - } - @Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof PrimitiveGroup) { - return mergeFrom((PrimitiveGroup)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(PrimitiveGroup other) { - if (other == PrimitiveGroup.getDefaultInstance()) return this; - if (nodesBuilder_ == null) { - if (!other.nodes_.isEmpty()) { - if (nodes_.isEmpty()) { - nodes_ = other.nodes_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureNodesIsMutable(); - nodes_.addAll(other.nodes_); - } - onChanged(); - } - } else { - if (!other.nodes_.isEmpty()) { - if (nodesBuilder_.isEmpty()) { - nodesBuilder_.dispose(); - nodesBuilder_ = null; - nodes_ = other.nodes_; - bitField0_ = (bitField0_ & ~0x00000001); - nodesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getNodesFieldBuilder() : null; - } else { - nodesBuilder_.addAllMessages(other.nodes_); - } - } - } - if (other.hasDense()) { - mergeDense(other.getDense()); - } - if (waysBuilder_ == null) { - if (!other.ways_.isEmpty()) { - if (ways_.isEmpty()) { - ways_ = other.ways_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureWaysIsMutable(); - ways_.addAll(other.ways_); - } - onChanged(); - } - } else { - if (!other.ways_.isEmpty()) { - if (waysBuilder_.isEmpty()) { - waysBuilder_.dispose(); - waysBuilder_ = null; - ways_ = other.ways_; - bitField0_ = (bitField0_ & ~0x00000004); - waysBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getWaysFieldBuilder() : null; - } else { - waysBuilder_.addAllMessages(other.ways_); - } - } - } - if (relationsBuilder_ == null) { - if (!other.relations_.isEmpty()) { - if (relations_.isEmpty()) { - relations_ = other.relations_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensureRelationsIsMutable(); - relations_.addAll(other.relations_); - } - onChanged(); - } - } else { - if (!other.relations_.isEmpty()) { - if (relationsBuilder_.isEmpty()) { - relationsBuilder_.dispose(); - relationsBuilder_ = null; - relations_ = other.relations_; - bitField0_ = (bitField0_ & ~0x00000008); - relationsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getRelationsFieldBuilder() : null; - } else { - relationsBuilder_.addAllMessages(other.relations_); - } - } - } - if (changesetsBuilder_ == null) { - if (!other.changesets_.isEmpty()) { - if (changesets_.isEmpty()) { - changesets_ = other.changesets_; - bitField0_ = (bitField0_ & ~0x00000010); - } else { - ensureChangesetsIsMutable(); - changesets_.addAll(other.changesets_); - } - onChanged(); - } - } else { - if (!other.changesets_.isEmpty()) { - if (changesetsBuilder_.isEmpty()) { - changesetsBuilder_.dispose(); - changesetsBuilder_ = null; - changesets_ = other.changesets_; - bitField0_ = (bitField0_ & ~0x00000010); - changesetsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getChangesetsFieldBuilder() : null; - } else { - changesetsBuilder_.addAllMessages(other.changesets_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @Override - public final boolean isInitialized() { - for (int i = 0; i < getNodesCount(); i++) { - if (!getNodes(i).isInitialized()) { - return false; - } - } - for (int i = 0; i < getWaysCount(); i++) { - if (!getWays(i).isInitialized()) { - return false; - } - } - for (int i = 0; i < getRelationsCount(); i++) { - if (!getRelations(i).isInitialized()) { - return false; - } - } - for (int i = 0; i < getChangesetsCount(); i++) { - if (!getChangesets(i).isInitialized()) { - return false; - } - } - return true; - } - - @Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - PrimitiveGroup parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (PrimitiveGroup) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List nodes_ = - java.util.Collections.emptyList(); - private void ensureNodesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - nodes_ = new java.util.ArrayList(nodes_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - Node, Node.Builder, NodeOrBuilder> nodesBuilder_; - - /** - * repeated .OSMPBF.Node nodes = 1; - */ - public java.util.List getNodesList() { - if (nodesBuilder_ == null) { - return java.util.Collections.unmodifiableList(nodes_); - } else { - return nodesBuilder_.getMessageList(); - } - } - /** - * repeated .OSMPBF.Node nodes = 1; - */ - public int getNodesCount() { - if (nodesBuilder_ == null) { - return nodes_.size(); - } else { - return nodesBuilder_.getCount(); - } - } - /** - * repeated .OSMPBF.Node nodes = 1; - */ - public Node getNodes(int index) { - if (nodesBuilder_ == null) { - return nodes_.get(index); - } else { - return nodesBuilder_.getMessage(index); - } - } - /** - * repeated .OSMPBF.Node nodes = 1; - */ - public Builder setNodes( - int index, Node value) { - if (nodesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNodesIsMutable(); - nodes_.set(index, value); - onChanged(); - } else { - nodesBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .OSMPBF.Node nodes = 1; - */ - public Builder setNodes( - int index, Node.Builder builderForValue) { - if (nodesBuilder_ == null) { - ensureNodesIsMutable(); - nodes_.set(index, builderForValue.build()); - onChanged(); - } else { - nodesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .OSMPBF.Node nodes = 1; - */ - public Builder addNodes(Node value) { - if (nodesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNodesIsMutable(); - nodes_.add(value); - onChanged(); - } else { - nodesBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .OSMPBF.Node nodes = 1; - */ - public Builder addNodes( - int index, Node value) { - if (nodesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNodesIsMutable(); - nodes_.add(index, value); - onChanged(); - } else { - nodesBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .OSMPBF.Node nodes = 1; - */ - public Builder addNodes( - Node.Builder builderForValue) { - if (nodesBuilder_ == null) { - ensureNodesIsMutable(); - nodes_.add(builderForValue.build()); - onChanged(); - } else { - nodesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .OSMPBF.Node nodes = 1; - */ - public Builder addNodes( - int index, Node.Builder builderForValue) { - if (nodesBuilder_ == null) { - ensureNodesIsMutable(); - nodes_.add(index, builderForValue.build()); - onChanged(); - } else { - nodesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .OSMPBF.Node nodes = 1; - */ - public Builder addAllNodes( - Iterable values) { - if (nodesBuilder_ == null) { - ensureNodesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, nodes_); - onChanged(); - } else { - nodesBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .OSMPBF.Node nodes = 1; - */ - public Builder clearNodes() { - if (nodesBuilder_ == null) { - nodes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - nodesBuilder_.clear(); - } - return this; - } - /** - * repeated .OSMPBF.Node nodes = 1; - */ - public Builder removeNodes(int index) { - if (nodesBuilder_ == null) { - ensureNodesIsMutable(); - nodes_.remove(index); - onChanged(); - } else { - nodesBuilder_.remove(index); - } - return this; - } - /** - * repeated .OSMPBF.Node nodes = 1; - */ - public Node.Builder getNodesBuilder( - int index) { - return getNodesFieldBuilder().getBuilder(index); - } - /** - * repeated .OSMPBF.Node nodes = 1; - */ - public NodeOrBuilder getNodesOrBuilder( - int index) { - if (nodesBuilder_ == null) { - return nodes_.get(index); } else { - return nodesBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .OSMPBF.Node nodes = 1; - */ - public java.util.List - getNodesOrBuilderList() { - if (nodesBuilder_ != null) { - return nodesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(nodes_); - } - } - /** - * repeated .OSMPBF.Node nodes = 1; - */ - public Node.Builder addNodesBuilder() { - return getNodesFieldBuilder().addBuilder( - Node.getDefaultInstance()); - } - /** - * repeated .OSMPBF.Node nodes = 1; - */ - public Node.Builder addNodesBuilder( - int index) { - return getNodesFieldBuilder().addBuilder( - index, Node.getDefaultInstance()); - } - /** - * repeated .OSMPBF.Node nodes = 1; - */ - public java.util.List - getNodesBuilderList() { - return getNodesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - Node, Node.Builder, NodeOrBuilder> - getNodesFieldBuilder() { - if (nodesBuilder_ == null) { - nodesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - Node, Node.Builder, NodeOrBuilder>( - nodes_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - nodes_ = null; - } - return nodesBuilder_; - } - - private DenseNodes dense_; - private com.google.protobuf.SingleFieldBuilderV3< - DenseNodes, DenseNodes.Builder, DenseNodesOrBuilder> denseBuilder_; - /** - * optional .OSMPBF.DenseNodes dense = 2; - * @return Whether the dense field is set. - */ - public boolean hasDense() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * optional .OSMPBF.DenseNodes dense = 2; - * @return The dense. - */ - public DenseNodes getDense() { - if (denseBuilder_ == null) { - return dense_ == null ? DenseNodes.getDefaultInstance() : dense_; - } else { - return denseBuilder_.getMessage(); - } - } - /** - * optional .OSMPBF.DenseNodes dense = 2; - */ - public Builder setDense(DenseNodes value) { - if (denseBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - dense_ = value; - onChanged(); - } else { - denseBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - return this; - } - /** - * optional .OSMPBF.DenseNodes dense = 2; - */ - public Builder setDense( - DenseNodes.Builder builderForValue) { - if (denseBuilder_ == null) { - dense_ = builderForValue.build(); - onChanged(); - } else { - denseBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - return this; - } - /** - * optional .OSMPBF.DenseNodes dense = 2; - */ - public Builder mergeDense(DenseNodes value) { - if (denseBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) && - dense_ != null && - dense_ != DenseNodes.getDefaultInstance()) { - dense_ = - DenseNodes.newBuilder(dense_).mergeFrom(value).buildPartial(); - } else { - dense_ = value; - } - onChanged(); - } else { - denseBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000002; - return this; - } - /** - * optional .OSMPBF.DenseNodes dense = 2; - */ - public Builder clearDense() { - if (denseBuilder_ == null) { - dense_ = null; - onChanged(); - } else { - denseBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - /** - * optional .OSMPBF.DenseNodes dense = 2; - */ - public DenseNodes.Builder getDenseBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getDenseFieldBuilder().getBuilder(); - } - /** - * optional .OSMPBF.DenseNodes dense = 2; - */ - public DenseNodesOrBuilder getDenseOrBuilder() { - if (denseBuilder_ != null) { - return denseBuilder_.getMessageOrBuilder(); - } else { - return dense_ == null ? - DenseNodes.getDefaultInstance() : dense_; - } - } - /** - * optional .OSMPBF.DenseNodes dense = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - DenseNodes, DenseNodes.Builder, DenseNodesOrBuilder> - getDenseFieldBuilder() { - if (denseBuilder_ == null) { - denseBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - DenseNodes, DenseNodes.Builder, DenseNodesOrBuilder>( - getDense(), - getParentForChildren(), - isClean()); - dense_ = null; - } - return denseBuilder_; - } - - private java.util.List ways_ = - java.util.Collections.emptyList(); - private void ensureWaysIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - ways_ = new java.util.ArrayList(ways_); - bitField0_ |= 0x00000004; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - Way, Way.Builder, WayOrBuilder> waysBuilder_; - - /** - * repeated .OSMPBF.Way ways = 3; - */ - public java.util.List getWaysList() { - if (waysBuilder_ == null) { - return java.util.Collections.unmodifiableList(ways_); - } else { - return waysBuilder_.getMessageList(); - } - } - /** - * repeated .OSMPBF.Way ways = 3; - */ - public int getWaysCount() { - if (waysBuilder_ == null) { - return ways_.size(); - } else { - return waysBuilder_.getCount(); - } - } - /** - * repeated .OSMPBF.Way ways = 3; - */ - public Way getWays(int index) { - if (waysBuilder_ == null) { - return ways_.get(index); - } else { - return waysBuilder_.getMessage(index); - } - } - /** - * repeated .OSMPBF.Way ways = 3; - */ - public Builder setWays( - int index, Way value) { - if (waysBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureWaysIsMutable(); - ways_.set(index, value); - onChanged(); - } else { - waysBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .OSMPBF.Way ways = 3; - */ - public Builder setWays( - int index, Way.Builder builderForValue) { - if (waysBuilder_ == null) { - ensureWaysIsMutable(); - ways_.set(index, builderForValue.build()); - onChanged(); - } else { - waysBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .OSMPBF.Way ways = 3; - */ - public Builder addWays(Way value) { - if (waysBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureWaysIsMutable(); - ways_.add(value); - onChanged(); - } else { - waysBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .OSMPBF.Way ways = 3; - */ - public Builder addWays( - int index, Way value) { - if (waysBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureWaysIsMutable(); - ways_.add(index, value); - onChanged(); - } else { - waysBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .OSMPBF.Way ways = 3; - */ - public Builder addWays( - Way.Builder builderForValue) { - if (waysBuilder_ == null) { - ensureWaysIsMutable(); - ways_.add(builderForValue.build()); - onChanged(); - } else { - waysBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .OSMPBF.Way ways = 3; - */ - public Builder addWays( - int index, Way.Builder builderForValue) { - if (waysBuilder_ == null) { - ensureWaysIsMutable(); - ways_.add(index, builderForValue.build()); - onChanged(); - } else { - waysBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .OSMPBF.Way ways = 3; - */ - public Builder addAllWays( - Iterable values) { - if (waysBuilder_ == null) { - ensureWaysIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, ways_); - onChanged(); - } else { - waysBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .OSMPBF.Way ways = 3; - */ - public Builder clearWays() { - if (waysBuilder_ == null) { - ways_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - } else { - waysBuilder_.clear(); - } - return this; - } - /** - * repeated .OSMPBF.Way ways = 3; - */ - public Builder removeWays(int index) { - if (waysBuilder_ == null) { - ensureWaysIsMutable(); - ways_.remove(index); - onChanged(); - } else { - waysBuilder_.remove(index); - } - return this; - } - /** - * repeated .OSMPBF.Way ways = 3; - */ - public Way.Builder getWaysBuilder( - int index) { - return getWaysFieldBuilder().getBuilder(index); - } - /** - * repeated .OSMPBF.Way ways = 3; - */ - public WayOrBuilder getWaysOrBuilder( - int index) { - if (waysBuilder_ == null) { - return ways_.get(index); } else { - return waysBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .OSMPBF.Way ways = 3; - */ - public java.util.List - getWaysOrBuilderList() { - if (waysBuilder_ != null) { - return waysBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(ways_); - } - } - /** - * repeated .OSMPBF.Way ways = 3; - */ - public Way.Builder addWaysBuilder() { - return getWaysFieldBuilder().addBuilder( - Way.getDefaultInstance()); - } - /** - * repeated .OSMPBF.Way ways = 3; - */ - public Way.Builder addWaysBuilder( - int index) { - return getWaysFieldBuilder().addBuilder( - index, Way.getDefaultInstance()); - } - /** - * repeated .OSMPBF.Way ways = 3; - */ - public java.util.List - getWaysBuilderList() { - return getWaysFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - Way, Way.Builder, WayOrBuilder> - getWaysFieldBuilder() { - if (waysBuilder_ == null) { - waysBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - Way, Way.Builder, WayOrBuilder>( - ways_, - ((bitField0_ & 0x00000004) != 0), - getParentForChildren(), - isClean()); - ways_ = null; - } - return waysBuilder_; - } - - private java.util.List relations_ = - java.util.Collections.emptyList(); - private void ensureRelationsIsMutable() { - if (!((bitField0_ & 0x00000008) != 0)) { - relations_ = new java.util.ArrayList(relations_); - bitField0_ |= 0x00000008; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - Relation, Relation.Builder, RelationOrBuilder> relationsBuilder_; - - /** - * repeated .OSMPBF.Relation relations = 4; - */ - public java.util.List getRelationsList() { - if (relationsBuilder_ == null) { - return java.util.Collections.unmodifiableList(relations_); - } else { - return relationsBuilder_.getMessageList(); - } - } - /** - * repeated .OSMPBF.Relation relations = 4; - */ - public int getRelationsCount() { - if (relationsBuilder_ == null) { - return relations_.size(); - } else { - return relationsBuilder_.getCount(); - } - } - /** - * repeated .OSMPBF.Relation relations = 4; - */ - public Relation getRelations(int index) { - if (relationsBuilder_ == null) { - return relations_.get(index); - } else { - return relationsBuilder_.getMessage(index); - } - } - /** - * repeated .OSMPBF.Relation relations = 4; - */ - public Builder setRelations( - int index, Relation value) { - if (relationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRelationsIsMutable(); - relations_.set(index, value); - onChanged(); - } else { - relationsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .OSMPBF.Relation relations = 4; - */ - public Builder setRelations( - int index, Relation.Builder builderForValue) { - if (relationsBuilder_ == null) { - ensureRelationsIsMutable(); - relations_.set(index, builderForValue.build()); - onChanged(); - } else { - relationsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .OSMPBF.Relation relations = 4; - */ - public Builder addRelations(Relation value) { - if (relationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRelationsIsMutable(); - relations_.add(value); - onChanged(); - } else { - relationsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .OSMPBF.Relation relations = 4; - */ - public Builder addRelations( - int index, Relation value) { - if (relationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRelationsIsMutable(); - relations_.add(index, value); - onChanged(); - } else { - relationsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .OSMPBF.Relation relations = 4; - */ - public Builder addRelations( - Relation.Builder builderForValue) { - if (relationsBuilder_ == null) { - ensureRelationsIsMutable(); - relations_.add(builderForValue.build()); - onChanged(); - } else { - relationsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .OSMPBF.Relation relations = 4; - */ - public Builder addRelations( - int index, Relation.Builder builderForValue) { - if (relationsBuilder_ == null) { - ensureRelationsIsMutable(); - relations_.add(index, builderForValue.build()); - onChanged(); - } else { - relationsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .OSMPBF.Relation relations = 4; - */ - public Builder addAllRelations( - Iterable values) { - if (relationsBuilder_ == null) { - ensureRelationsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, relations_); - onChanged(); - } else { - relationsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .OSMPBF.Relation relations = 4; - */ - public Builder clearRelations() { - if (relationsBuilder_ == null) { - relations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - } else { - relationsBuilder_.clear(); - } - return this; - } - /** - * repeated .OSMPBF.Relation relations = 4; - */ - public Builder removeRelations(int index) { - if (relationsBuilder_ == null) { - ensureRelationsIsMutable(); - relations_.remove(index); - onChanged(); - } else { - relationsBuilder_.remove(index); - } - return this; - } - /** - * repeated .OSMPBF.Relation relations = 4; - */ - public Relation.Builder getRelationsBuilder( - int index) { - return getRelationsFieldBuilder().getBuilder(index); - } - /** - * repeated .OSMPBF.Relation relations = 4; - */ - public RelationOrBuilder getRelationsOrBuilder( - int index) { - if (relationsBuilder_ == null) { - return relations_.get(index); } else { - return relationsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .OSMPBF.Relation relations = 4; - */ - public java.util.List - getRelationsOrBuilderList() { - if (relationsBuilder_ != null) { - return relationsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(relations_); - } - } - /** - * repeated .OSMPBF.Relation relations = 4; - */ - public Relation.Builder addRelationsBuilder() { - return getRelationsFieldBuilder().addBuilder( - Relation.getDefaultInstance()); - } - /** - * repeated .OSMPBF.Relation relations = 4; - */ - public Relation.Builder addRelationsBuilder( - int index) { - return getRelationsFieldBuilder().addBuilder( - index, Relation.getDefaultInstance()); - } - /** - * repeated .OSMPBF.Relation relations = 4; - */ - public java.util.List - getRelationsBuilderList() { - return getRelationsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - Relation, Relation.Builder, RelationOrBuilder> - getRelationsFieldBuilder() { - if (relationsBuilder_ == null) { - relationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - Relation, Relation.Builder, RelationOrBuilder>( - relations_, - ((bitField0_ & 0x00000008) != 0), - getParentForChildren(), - isClean()); - relations_ = null; - } - return relationsBuilder_; - } - - private java.util.List changesets_ = - java.util.Collections.emptyList(); - private void ensureChangesetsIsMutable() { - if (!((bitField0_ & 0x00000010) != 0)) { - changesets_ = new java.util.ArrayList(changesets_); - bitField0_ |= 0x00000010; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - ChangeSet, ChangeSet.Builder, ChangeSetOrBuilder> changesetsBuilder_; - - /** - * repeated .OSMPBF.ChangeSet changesets = 5; - */ - public java.util.List getChangesetsList() { - if (changesetsBuilder_ == null) { - return java.util.Collections.unmodifiableList(changesets_); - } else { - return changesetsBuilder_.getMessageList(); - } - } - /** - * repeated .OSMPBF.ChangeSet changesets = 5; - */ - public int getChangesetsCount() { - if (changesetsBuilder_ == null) { - return changesets_.size(); - } else { - return changesetsBuilder_.getCount(); - } - } - /** - * repeated .OSMPBF.ChangeSet changesets = 5; - */ - public ChangeSet getChangesets(int index) { - if (changesetsBuilder_ == null) { - return changesets_.get(index); - } else { - return changesetsBuilder_.getMessage(index); - } - } - /** - * repeated .OSMPBF.ChangeSet changesets = 5; - */ - public Builder setChangesets( - int index, ChangeSet value) { - if (changesetsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureChangesetsIsMutable(); - changesets_.set(index, value); - onChanged(); - } else { - changesetsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .OSMPBF.ChangeSet changesets = 5; - */ - public Builder setChangesets( - int index, ChangeSet.Builder builderForValue) { - if (changesetsBuilder_ == null) { - ensureChangesetsIsMutable(); - changesets_.set(index, builderForValue.build()); - onChanged(); - } else { - changesetsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .OSMPBF.ChangeSet changesets = 5; - */ - public Builder addChangesets(ChangeSet value) { - if (changesetsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureChangesetsIsMutable(); - changesets_.add(value); - onChanged(); - } else { - changesetsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .OSMPBF.ChangeSet changesets = 5; - */ - public Builder addChangesets( - int index, ChangeSet value) { - if (changesetsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureChangesetsIsMutable(); - changesets_.add(index, value); - onChanged(); - } else { - changesetsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .OSMPBF.ChangeSet changesets = 5; - */ - public Builder addChangesets( - ChangeSet.Builder builderForValue) { - if (changesetsBuilder_ == null) { - ensureChangesetsIsMutable(); - changesets_.add(builderForValue.build()); - onChanged(); - } else { - changesetsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .OSMPBF.ChangeSet changesets = 5; - */ - public Builder addChangesets( - int index, ChangeSet.Builder builderForValue) { - if (changesetsBuilder_ == null) { - ensureChangesetsIsMutable(); - changesets_.add(index, builderForValue.build()); - onChanged(); - } else { - changesetsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .OSMPBF.ChangeSet changesets = 5; - */ - public Builder addAllChangesets( - Iterable values) { - if (changesetsBuilder_ == null) { - ensureChangesetsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, changesets_); - onChanged(); - } else { - changesetsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .OSMPBF.ChangeSet changesets = 5; - */ - public Builder clearChangesets() { - if (changesetsBuilder_ == null) { - changesets_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - } else { - changesetsBuilder_.clear(); - } - return this; - } - /** - * repeated .OSMPBF.ChangeSet changesets = 5; - */ - public Builder removeChangesets(int index) { - if (changesetsBuilder_ == null) { - ensureChangesetsIsMutable(); - changesets_.remove(index); - onChanged(); - } else { - changesetsBuilder_.remove(index); - } - return this; - } - /** - * repeated .OSMPBF.ChangeSet changesets = 5; - */ - public ChangeSet.Builder getChangesetsBuilder( - int index) { - return getChangesetsFieldBuilder().getBuilder(index); - } - /** - * repeated .OSMPBF.ChangeSet changesets = 5; - */ - public ChangeSetOrBuilder getChangesetsOrBuilder( - int index) { - if (changesetsBuilder_ == null) { - return changesets_.get(index); } else { - return changesetsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .OSMPBF.ChangeSet changesets = 5; - */ - public java.util.List - getChangesetsOrBuilderList() { - if (changesetsBuilder_ != null) { - return changesetsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(changesets_); - } - } - /** - * repeated .OSMPBF.ChangeSet changesets = 5; - */ - public ChangeSet.Builder addChangesetsBuilder() { - return getChangesetsFieldBuilder().addBuilder( - ChangeSet.getDefaultInstance()); - } - /** - * repeated .OSMPBF.ChangeSet changesets = 5; - */ - public ChangeSet.Builder addChangesetsBuilder( - int index) { - return getChangesetsFieldBuilder().addBuilder( - index, ChangeSet.getDefaultInstance()); - } - /** - * repeated .OSMPBF.ChangeSet changesets = 5; - */ - public java.util.List - getChangesetsBuilderList() { - return getChangesetsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - ChangeSet, ChangeSet.Builder, ChangeSetOrBuilder> - getChangesetsFieldBuilder() { - if (changesetsBuilder_ == null) { - changesetsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - ChangeSet, ChangeSet.Builder, ChangeSetOrBuilder>( - changesets_, - ((bitField0_ & 0x00000010) != 0), - getParentForChildren(), - isClean()); - changesets_ = null; - } - return changesetsBuilder_; - } - @Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:OSMPBF.PrimitiveGroup) - } - - // @@protoc_insertion_point(class_scope:OSMPBF.PrimitiveGroup) - private static final PrimitiveGroup DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new PrimitiveGroup(); - } - - public static PrimitiveGroup getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - @Deprecated public static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @Override - public PrimitiveGroup parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new PrimitiveGroup(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @Override - public PrimitiveGroup getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface StringTableOrBuilder extends - // @@protoc_insertion_point(interface_extends:OSMPBF.StringTable) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated bytes s = 1; - * @return A list containing the s. - */ - java.util.List getSList(); - /** - * repeated bytes s = 1; - * @return The count of s. - */ - int getSCount(); - /** - * repeated bytes s = 1; - * @param index The index of the element to return. - * @return The s at the given index. - */ - com.google.protobuf.ByteString getS(int index); - } - /** - *
-   ** String table, contains the common strings in each block.
-   *Note that we reserve index '0' as a delimiter, so the entry at that
-   *index in the table is ALWAYS blank and unused.
-   * 
- * - * Protobuf type {@code OSMPBF.StringTable} - */ - public static final class StringTable extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:OSMPBF.StringTable) - StringTableOrBuilder { - private static final long serialVersionUID = 0L; - // Use StringTable.newBuilder() to construct. - private StringTable(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private StringTable() { - s_ = java.util.Collections.emptyList(); - } - - @Override - @SuppressWarnings({"unused"}) - protected Object newInstance( - UnusedPrivateParameter unused) { - return new StringTable(); - } - - @Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private StringTable( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - s_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - s_.add(input.readBytes()); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - s_ = java.util.Collections.unmodifiableList(s_); // C - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return internal_static_OSMPBF_StringTable_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return internal_static_OSMPBF_StringTable_fieldAccessorTable - .ensureFieldAccessorsInitialized( - StringTable.class, StringTable.Builder.class); - } - - public static final int S_FIELD_NUMBER = 1; - private java.util.List s_; - /** - * repeated bytes s = 1; - * @return A list containing the s. - */ - public java.util.List - getSList() { - return s_; - } - /** - * repeated bytes s = 1; - * @return The count of s. - */ - public int getSCount() { - return s_.size(); - } - /** - * repeated bytes s = 1; - * @param index The index of the element to return. - * @return The s at the given index. - */ - public com.google.protobuf.ByteString getS(int index) { - return s_.get(index); - } - - private byte memoizedIsInitialized = -1; - @Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < s_.size(); i++) { - output.writeBytes(1, s_.get(i)); - } - unknownFields.writeTo(output); - } - - @Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - for (int i = 0; i < s_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeBytesSizeNoTag(s_.get(i)); - } - size += dataSize; - size += 1 * getSList().size(); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @Override - public boolean equals(final Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof StringTable)) { - return super.equals(obj); - } - StringTable other = (StringTable) obj; - - if (!getSList() - .equals(other.getSList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getSCount() > 0) { - hash = (37 * hash) + S_FIELD_NUMBER; - hash = (53 * hash) + getSList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static StringTable parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static StringTable parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static StringTable parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static StringTable parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static StringTable parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static StringTable parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static StringTable parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static StringTable parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static StringTable parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static StringTable parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static StringTable parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static StringTable parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(StringTable prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @Override - protected Builder newBuilderForType( - BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     ** String table, contains the common strings in each block.
-     *Note that we reserve index '0' as a delimiter, so the entry at that
-     *index in the table is ALWAYS blank and unused.
-     * 
- * - * Protobuf type {@code OSMPBF.StringTable} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:OSMPBF.StringTable) - StringTableOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return internal_static_OSMPBF_StringTable_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return internal_static_OSMPBF_StringTable_fieldAccessorTable - .ensureFieldAccessorsInitialized( - StringTable.class, StringTable.Builder.class); - } - - // Construct using StringTable.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @Override - public Builder clear() { - super.clear(); - s_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return internal_static_OSMPBF_StringTable_descriptor; - } - - @Override - public StringTable getDefaultInstanceForType() { - return StringTable.getDefaultInstance(); - } - - @Override - public StringTable build() { - StringTable result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @Override - public StringTable buildPartial() { - StringTable result = new StringTable(this); - int from_bitField0_ = bitField0_; - if (((bitField0_ & 0x00000001) != 0)) { - s_ = java.util.Collections.unmodifiableList(s_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.s_ = s_; - onBuilt(); - return result; - } - - @Override - public Builder clone() { - return super.clone(); - } - @Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.setField(field, value); - } - @Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, Object value) { - return super.setRepeatedField(field, index, value); - } - @Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.addRepeatedField(field, value); - } - @Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof StringTable) { - return mergeFrom((StringTable)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(StringTable other) { - if (other == StringTable.getDefaultInstance()) return this; - if (!other.s_.isEmpty()) { - if (s_.isEmpty()) { - s_ = other.s_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureSIsMutable(); - s_.addAll(other.s_); - } - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @Override - public final boolean isInitialized() { - return true; - } - - @Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - StringTable parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (StringTable) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List s_ = java.util.Collections.emptyList(); - private void ensureSIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - s_ = new java.util.ArrayList(s_); - bitField0_ |= 0x00000001; - } - } - /** - * repeated bytes s = 1; - * @return A list containing the s. - */ - public java.util.List - getSList() { - return ((bitField0_ & 0x00000001) != 0) ? - java.util.Collections.unmodifiableList(s_) : s_; - } - /** - * repeated bytes s = 1; - * @return The count of s. - */ - public int getSCount() { - return s_.size(); - } - /** - * repeated bytes s = 1; - * @param index The index of the element to return. - * @return The s at the given index. - */ - public com.google.protobuf.ByteString getS(int index) { - return s_.get(index); - } - /** - * repeated bytes s = 1; - * @param index The index to set the value at. - * @param value The s to set. - * @return This builder for chaining. - */ - public Builder setS( - int index, com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - ensureSIsMutable(); - s_.set(index, value); - onChanged(); - return this; - } - /** - * repeated bytes s = 1; - * @param value The s to add. - * @return This builder for chaining. - */ - public Builder addS(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - ensureSIsMutable(); - s_.add(value); - onChanged(); - return this; - } - /** - * repeated bytes s = 1; - * @param values The s to add. - * @return This builder for chaining. - */ - public Builder addAllS( - Iterable values) { - ensureSIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, s_); - onChanged(); - return this; - } - /** - * repeated bytes s = 1; - * @return This builder for chaining. - */ - public Builder clearS() { - s_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - @Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:OSMPBF.StringTable) - } - - // @@protoc_insertion_point(class_scope:OSMPBF.StringTable) - private static final StringTable DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new StringTable(); - } - - public static StringTable getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - @Deprecated public static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @Override - public StringTable parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new StringTable(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @Override - public StringTable getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface InfoOrBuilder extends - // @@protoc_insertion_point(interface_extends:OSMPBF.Info) - com.google.protobuf.MessageOrBuilder { - - /** - * optional int32 version = 1 [default = -1]; - * @return Whether the version field is set. - */ - boolean hasVersion(); - /** - * optional int32 version = 1 [default = -1]; - * @return The version. - */ - int getVersion(); - - /** - * optional int64 timestamp = 2; - * @return Whether the timestamp field is set. - */ - boolean hasTimestamp(); - /** - * optional int64 timestamp = 2; - * @return The timestamp. - */ - long getTimestamp(); - - /** - * optional int64 changeset = 3; - * @return Whether the changeset field is set. - */ - boolean hasChangeset(); - /** - * optional int64 changeset = 3; - * @return The changeset. - */ - long getChangeset(); - - /** - * optional int32 uid = 4; - * @return Whether the uid field is set. - */ - boolean hasUid(); - /** - * optional int32 uid = 4; - * @return The uid. - */ - int getUid(); - - /** - *
-     * String IDs
-     * 
- * - * optional uint32 user_sid = 5; - * @return Whether the userSid field is set. - */ - boolean hasUserSid(); - /** - *
-     * String IDs
-     * 
- * - * optional uint32 user_sid = 5; - * @return The userSid. - */ - int getUserSid(); - - /** - *
-     * The visible flag is used to store history information. It indicates that
-     * the current object version has been created by a delete operation on the
-     * OSM API.
-     * When a writer sets this flag, it MUST add a required_features tag with
-     * value "HistoricalInformation" to the HeaderBlock.
-     * If this flag is not available for some object it MUST be assumed to be
-     * true if the file has the required_features tag "HistoricalInformation"
-     * set.
-     * 
- * - * optional bool visible = 6; - * @return Whether the visible field is set. - */ - boolean hasVisible(); - /** - *
-     * The visible flag is used to store history information. It indicates that
-     * the current object version has been created by a delete operation on the
-     * OSM API.
-     * When a writer sets this flag, it MUST add a required_features tag with
-     * value "HistoricalInformation" to the HeaderBlock.
-     * If this flag is not available for some object it MUST be assumed to be
-     * true if the file has the required_features tag "HistoricalInformation"
-     * set.
-     * 
- * - * optional bool visible = 6; - * @return The visible. - */ - boolean getVisible(); - } - /** - *
-   * Optional metadata that may be included into each primitive. 
-   * 
- * - * Protobuf type {@code OSMPBF.Info} - */ - public static final class Info extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:OSMPBF.Info) - InfoOrBuilder { - private static final long serialVersionUID = 0L; - // Use Info.newBuilder() to construct. - private Info(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Info() { - version_ = -1; - } - - @Override - @SuppressWarnings({"unused"}) - protected Object newInstance( - UnusedPrivateParameter unused) { - return new Info(); - } - - @Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Info( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - bitField0_ |= 0x00000001; - version_ = input.readInt32(); - break; - } - case 16: { - bitField0_ |= 0x00000002; - timestamp_ = input.readInt64(); - break; - } - case 24: { - bitField0_ |= 0x00000004; - changeset_ = input.readInt64(); - break; - } - case 32: { - bitField0_ |= 0x00000008; - uid_ = input.readInt32(); - break; - } - case 40: { - bitField0_ |= 0x00000010; - userSid_ = input.readUInt32(); - break; - } - case 48: { - bitField0_ |= 0x00000020; - visible_ = input.readBool(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return internal_static_OSMPBF_Info_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return internal_static_OSMPBF_Info_fieldAccessorTable - .ensureFieldAccessorsInitialized( - Info.class, Info.Builder.class); - } - - private int bitField0_; - public static final int VERSION_FIELD_NUMBER = 1; - private int version_; - /** - * optional int32 version = 1 [default = -1]; - * @return Whether the version field is set. - */ - public boolean hasVersion() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * optional int32 version = 1 [default = -1]; - * @return The version. - */ - public int getVersion() { - return version_; - } - - public static final int TIMESTAMP_FIELD_NUMBER = 2; - private long timestamp_; - /** - * optional int64 timestamp = 2; - * @return Whether the timestamp field is set. - */ - public boolean hasTimestamp() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * optional int64 timestamp = 2; - * @return The timestamp. - */ - public long getTimestamp() { - return timestamp_; - } - - public static final int CHANGESET_FIELD_NUMBER = 3; - private long changeset_; - /** - * optional int64 changeset = 3; - * @return Whether the changeset field is set. - */ - public boolean hasChangeset() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - * optional int64 changeset = 3; - * @return The changeset. - */ - public long getChangeset() { - return changeset_; - } - - public static final int UID_FIELD_NUMBER = 4; - private int uid_; - /** - * optional int32 uid = 4; - * @return Whether the uid field is set. - */ - public boolean hasUid() { - return ((bitField0_ & 0x00000008) != 0); - } - /** - * optional int32 uid = 4; - * @return The uid. - */ - public int getUid() { - return uid_; - } - - public static final int USER_SID_FIELD_NUMBER = 5; - private int userSid_; - /** - *
-     * String IDs
-     * 
- * - * optional uint32 user_sid = 5; - * @return Whether the userSid field is set. - */ - public boolean hasUserSid() { - return ((bitField0_ & 0x00000010) != 0); - } - /** - *
-     * String IDs
-     * 
- * - * optional uint32 user_sid = 5; - * @return The userSid. - */ - public int getUserSid() { - return userSid_; - } - - public static final int VISIBLE_FIELD_NUMBER = 6; - private boolean visible_; - /** - *
-     * The visible flag is used to store history information. It indicates that
-     * the current object version has been created by a delete operation on the
-     * OSM API.
-     * When a writer sets this flag, it MUST add a required_features tag with
-     * value "HistoricalInformation" to the HeaderBlock.
-     * If this flag is not available for some object it MUST be assumed to be
-     * true if the file has the required_features tag "HistoricalInformation"
-     * set.
-     * 
- * - * optional bool visible = 6; - * @return Whether the visible field is set. - */ - public boolean hasVisible() { - return ((bitField0_ & 0x00000020) != 0); - } - /** - *
-     * The visible flag is used to store history information. It indicates that
-     * the current object version has been created by a delete operation on the
-     * OSM API.
-     * When a writer sets this flag, it MUST add a required_features tag with
-     * value "HistoricalInformation" to the HeaderBlock.
-     * If this flag is not available for some object it MUST be assumed to be
-     * true if the file has the required_features tag "HistoricalInformation"
-     * set.
-     * 
- * - * optional bool visible = 6; - * @return The visible. - */ - public boolean getVisible() { - return visible_; - } - - private byte memoizedIsInitialized = -1; - @Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) != 0)) { - output.writeInt32(1, version_); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeInt64(2, timestamp_); - } - if (((bitField0_ & 0x00000004) != 0)) { - output.writeInt64(3, changeset_); - } - if (((bitField0_ & 0x00000008) != 0)) { - output.writeInt32(4, uid_); - } - if (((bitField0_ & 0x00000010) != 0)) { - output.writeUInt32(5, userSid_); - } - if (((bitField0_ & 0x00000020) != 0)) { - output.writeBool(6, visible_); - } - unknownFields.writeTo(output); - } - - @Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(1, version_); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(2, timestamp_); - } - if (((bitField0_ & 0x00000004) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(3, changeset_); - } - if (((bitField0_ & 0x00000008) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(4, uid_); - } - if (((bitField0_ & 0x00000010) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(5, userSid_); - } - if (((bitField0_ & 0x00000020) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(6, visible_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @Override - public boolean equals(final Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof Info)) { - return super.equals(obj); - } - Info other = (Info) obj; - - if (hasVersion() != other.hasVersion()) return false; - if (hasVersion()) { - if (getVersion() - != other.getVersion()) return false; - } - if (hasTimestamp() != other.hasTimestamp()) return false; - if (hasTimestamp()) { - if (getTimestamp() - != other.getTimestamp()) return false; - } - if (hasChangeset() != other.hasChangeset()) return false; - if (hasChangeset()) { - if (getChangeset() - != other.getChangeset()) return false; - } - if (hasUid() != other.hasUid()) return false; - if (hasUid()) { - if (getUid() - != other.getUid()) return false; - } - if (hasUserSid() != other.hasUserSid()) return false; - if (hasUserSid()) { - if (getUserSid() - != other.getUserSid()) return false; - } - if (hasVisible() != other.hasVisible()) return false; - if (hasVisible()) { - if (getVisible() - != other.getVisible()) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasVersion()) { - hash = (37 * hash) + VERSION_FIELD_NUMBER; - hash = (53 * hash) + getVersion(); - } - if (hasTimestamp()) { - hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getTimestamp()); - } - if (hasChangeset()) { - hash = (37 * hash) + CHANGESET_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getChangeset()); - } - if (hasUid()) { - hash = (37 * hash) + UID_FIELD_NUMBER; - hash = (53 * hash) + getUid(); - } - if (hasUserSid()) { - hash = (37 * hash) + USER_SID_FIELD_NUMBER; - hash = (53 * hash) + getUserSid(); - } - if (hasVisible()) { - hash = (37 * hash) + VISIBLE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getVisible()); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static Info parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static Info parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static Info parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static Info parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static Info parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static Info parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static Info parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static Info parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static Info parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static Info parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static Info parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static Info parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(Info prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @Override - protected Builder newBuilderForType( - BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Optional metadata that may be included into each primitive. 
-     * 
- * - * Protobuf type {@code OSMPBF.Info} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:OSMPBF.Info) - InfoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return internal_static_OSMPBF_Info_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return internal_static_OSMPBF_Info_fieldAccessorTable - .ensureFieldAccessorsInitialized( - Info.class, Info.Builder.class); - } - - // Construct using Info.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @Override - public Builder clear() { - super.clear(); - version_ = -1; - bitField0_ = (bitField0_ & ~0x00000001); - timestamp_ = 0L; - bitField0_ = (bitField0_ & ~0x00000002); - changeset_ = 0L; - bitField0_ = (bitField0_ & ~0x00000004); - uid_ = 0; - bitField0_ = (bitField0_ & ~0x00000008); - userSid_ = 0; - bitField0_ = (bitField0_ & ~0x00000010); - visible_ = false; - bitField0_ = (bitField0_ & ~0x00000020); - return this; - } - - @Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return internal_static_OSMPBF_Info_descriptor; - } - - @Override - public Info getDefaultInstanceForType() { - return Info.getDefaultInstance(); - } - - @Override - public Info build() { - Info result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @Override - public Info buildPartial() { - Info result = new Info(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - to_bitField0_ |= 0x00000001; - } - result.version_ = version_; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.timestamp_ = timestamp_; - to_bitField0_ |= 0x00000002; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.changeset_ = changeset_; - to_bitField0_ |= 0x00000004; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.uid_ = uid_; - to_bitField0_ |= 0x00000008; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.userSid_ = userSid_; - to_bitField0_ |= 0x00000010; - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.visible_ = visible_; - to_bitField0_ |= 0x00000020; - } - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - @Override - public Builder clone() { - return super.clone(); - } - @Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.setField(field, value); - } - @Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, Object value) { - return super.setRepeatedField(field, index, value); - } - @Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.addRepeatedField(field, value); - } - @Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof Info) { - return mergeFrom((Info)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(Info other) { - if (other == Info.getDefaultInstance()) return this; - if (other.hasVersion()) { - setVersion(other.getVersion()); - } - if (other.hasTimestamp()) { - setTimestamp(other.getTimestamp()); - } - if (other.hasChangeset()) { - setChangeset(other.getChangeset()); - } - if (other.hasUid()) { - setUid(other.getUid()); - } - if (other.hasUserSid()) { - setUserSid(other.getUserSid()); - } - if (other.hasVisible()) { - setVisible(other.getVisible()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @Override - public final boolean isInitialized() { - return true; - } - - @Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - Info parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (Info) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private int version_ = -1; - /** - * optional int32 version = 1 [default = -1]; - * @return Whether the version field is set. - */ - public boolean hasVersion() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * optional int32 version = 1 [default = -1]; - * @return The version. - */ - public int getVersion() { - return version_; - } - /** - * optional int32 version = 1 [default = -1]; - * @param value The version to set. - * @return This builder for chaining. - */ - public Builder setVersion(int value) { - bitField0_ |= 0x00000001; - version_ = value; - onChanged(); - return this; - } - /** - * optional int32 version = 1 [default = -1]; - * @return This builder for chaining. - */ - public Builder clearVersion() { - bitField0_ = (bitField0_ & ~0x00000001); - version_ = -1; - onChanged(); - return this; - } - - private long timestamp_ ; - /** - * optional int64 timestamp = 2; - * @return Whether the timestamp field is set. - */ - public boolean hasTimestamp() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * optional int64 timestamp = 2; - * @return The timestamp. - */ - public long getTimestamp() { - return timestamp_; - } - /** - * optional int64 timestamp = 2; - * @param value The timestamp to set. - * @return This builder for chaining. - */ - public Builder setTimestamp(long value) { - bitField0_ |= 0x00000002; - timestamp_ = value; - onChanged(); - return this; - } - /** - * optional int64 timestamp = 2; - * @return This builder for chaining. - */ - public Builder clearTimestamp() { - bitField0_ = (bitField0_ & ~0x00000002); - timestamp_ = 0L; - onChanged(); - return this; - } - - private long changeset_ ; - /** - * optional int64 changeset = 3; - * @return Whether the changeset field is set. - */ - public boolean hasChangeset() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - * optional int64 changeset = 3; - * @return The changeset. - */ - public long getChangeset() { - return changeset_; - } - /** - * optional int64 changeset = 3; - * @param value The changeset to set. - * @return This builder for chaining. - */ - public Builder setChangeset(long value) { - bitField0_ |= 0x00000004; - changeset_ = value; - onChanged(); - return this; - } - /** - * optional int64 changeset = 3; - * @return This builder for chaining. - */ - public Builder clearChangeset() { - bitField0_ = (bitField0_ & ~0x00000004); - changeset_ = 0L; - onChanged(); - return this; - } - - private int uid_ ; - /** - * optional int32 uid = 4; - * @return Whether the uid field is set. - */ - public boolean hasUid() { - return ((bitField0_ & 0x00000008) != 0); - } - /** - * optional int32 uid = 4; - * @return The uid. - */ - public int getUid() { - return uid_; - } - /** - * optional int32 uid = 4; - * @param value The uid to set. - * @return This builder for chaining. - */ - public Builder setUid(int value) { - bitField0_ |= 0x00000008; - uid_ = value; - onChanged(); - return this; - } - /** - * optional int32 uid = 4; - * @return This builder for chaining. - */ - public Builder clearUid() { - bitField0_ = (bitField0_ & ~0x00000008); - uid_ = 0; - onChanged(); - return this; - } - - private int userSid_ ; - /** - *
-       * String IDs
-       * 
- * - * optional uint32 user_sid = 5; - * @return Whether the userSid field is set. - */ - public boolean hasUserSid() { - return ((bitField0_ & 0x00000010) != 0); - } - /** - *
-       * String IDs
-       * 
- * - * optional uint32 user_sid = 5; - * @return The userSid. - */ - public int getUserSid() { - return userSid_; - } - /** - *
-       * String IDs
-       * 
- * - * optional uint32 user_sid = 5; - * @param value The userSid to set. - * @return This builder for chaining. - */ - public Builder setUserSid(int value) { - bitField0_ |= 0x00000010; - userSid_ = value; - onChanged(); - return this; - } - /** - *
-       * String IDs
-       * 
- * - * optional uint32 user_sid = 5; - * @return This builder for chaining. - */ - public Builder clearUserSid() { - bitField0_ = (bitField0_ & ~0x00000010); - userSid_ = 0; - onChanged(); - return this; - } - - private boolean visible_ ; - /** - *
-       * The visible flag is used to store history information. It indicates that
-       * the current object version has been created by a delete operation on the
-       * OSM API.
-       * When a writer sets this flag, it MUST add a required_features tag with
-       * value "HistoricalInformation" to the HeaderBlock.
-       * If this flag is not available for some object it MUST be assumed to be
-       * true if the file has the required_features tag "HistoricalInformation"
-       * set.
-       * 
- * - * optional bool visible = 6; - * @return Whether the visible field is set. - */ - public boolean hasVisible() { - return ((bitField0_ & 0x00000020) != 0); - } - /** - *
-       * The visible flag is used to store history information. It indicates that
-       * the current object version has been created by a delete operation on the
-       * OSM API.
-       * When a writer sets this flag, it MUST add a required_features tag with
-       * value "HistoricalInformation" to the HeaderBlock.
-       * If this flag is not available for some object it MUST be assumed to be
-       * true if the file has the required_features tag "HistoricalInformation"
-       * set.
-       * 
- * - * optional bool visible = 6; - * @return The visible. - */ - public boolean getVisible() { - return visible_; - } - /** - *
-       * The visible flag is used to store history information. It indicates that
-       * the current object version has been created by a delete operation on the
-       * OSM API.
-       * When a writer sets this flag, it MUST add a required_features tag with
-       * value "HistoricalInformation" to the HeaderBlock.
-       * If this flag is not available for some object it MUST be assumed to be
-       * true if the file has the required_features tag "HistoricalInformation"
-       * set.
-       * 
- * - * optional bool visible = 6; - * @param value The visible to set. - * @return This builder for chaining. - */ - public Builder setVisible(boolean value) { - bitField0_ |= 0x00000020; - visible_ = value; - onChanged(); - return this; - } - /** - *
-       * The visible flag is used to store history information. It indicates that
-       * the current object version has been created by a delete operation on the
-       * OSM API.
-       * When a writer sets this flag, it MUST add a required_features tag with
-       * value "HistoricalInformation" to the HeaderBlock.
-       * If this flag is not available for some object it MUST be assumed to be
-       * true if the file has the required_features tag "HistoricalInformation"
-       * set.
-       * 
- * - * optional bool visible = 6; - * @return This builder for chaining. - */ - public Builder clearVisible() { - bitField0_ = (bitField0_ & ~0x00000020); - visible_ = false; - onChanged(); - return this; - } - @Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:OSMPBF.Info) - } - - // @@protoc_insertion_point(class_scope:OSMPBF.Info) - private static final Info DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new Info(); - } - - public static Info getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - @Deprecated public static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @Override - public Info parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Info(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @Override - public Info getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface DenseInfoOrBuilder extends - // @@protoc_insertion_point(interface_extends:OSMPBF.DenseInfo) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated int32 version = 1 [packed = true]; - * @return A list containing the version. - */ - java.util.List getVersionList(); - /** - * repeated int32 version = 1 [packed = true]; - * @return The count of version. - */ - int getVersionCount(); - /** - * repeated int32 version = 1 [packed = true]; - * @param index The index of the element to return. - * @return The version at the given index. - */ - int getVersion(int index); - - /** - *
-     * DELTA coded
-     * 
- * - * repeated sint64 timestamp = 2 [packed = true]; - * @return A list containing the timestamp. - */ - java.util.List getTimestampList(); - /** - *
-     * DELTA coded
-     * 
- * - * repeated sint64 timestamp = 2 [packed = true]; - * @return The count of timestamp. - */ - int getTimestampCount(); - /** - *
-     * DELTA coded
-     * 
- * - * repeated sint64 timestamp = 2 [packed = true]; - * @param index The index of the element to return. - * @return The timestamp at the given index. - */ - long getTimestamp(int index); - - /** - *
-     * DELTA coded
-     * 
- * - * repeated sint64 changeset = 3 [packed = true]; - * @return A list containing the changeset. - */ - java.util.List getChangesetList(); - /** - *
-     * DELTA coded
-     * 
- * - * repeated sint64 changeset = 3 [packed = true]; - * @return The count of changeset. - */ - int getChangesetCount(); - /** - *
-     * DELTA coded
-     * 
- * - * repeated sint64 changeset = 3 [packed = true]; - * @param index The index of the element to return. - * @return The changeset at the given index. - */ - long getChangeset(int index); - - /** - *
-     * DELTA coded
-     * 
- * - * repeated sint32 uid = 4 [packed = true]; - * @return A list containing the uid. - */ - java.util.List getUidList(); - /** - *
-     * DELTA coded
-     * 
- * - * repeated sint32 uid = 4 [packed = true]; - * @return The count of uid. - */ - int getUidCount(); - /** - *
-     * DELTA coded
-     * 
- * - * repeated sint32 uid = 4 [packed = true]; - * @param index The index of the element to return. - * @return The uid at the given index. - */ - int getUid(int index); - - /** - *
-     * String IDs for usernames. DELTA coded
-     * 
- * - * repeated sint32 user_sid = 5 [packed = true]; - * @return A list containing the userSid. - */ - java.util.List getUserSidList(); - /** - *
-     * String IDs for usernames. DELTA coded
-     * 
- * - * repeated sint32 user_sid = 5 [packed = true]; - * @return The count of userSid. - */ - int getUserSidCount(); - /** - *
-     * String IDs for usernames. DELTA coded
-     * 
- * - * repeated sint32 user_sid = 5 [packed = true]; - * @param index The index of the element to return. - * @return The userSid at the given index. - */ - int getUserSid(int index); - - /** - *
-     * The visible flag is used to store history information. It indicates that
-     * the current object version has been created by a delete operation on the
-     * OSM API.
-     * When a writer sets this flag, it MUST add a required_features tag with
-     * value "HistoricalInformation" to the HeaderBlock.
-     * If this flag is not available for some object it MUST be assumed to be
-     * true if the file has the required_features tag "HistoricalInformation"
-     * set.
-     * 
- * - * repeated bool visible = 6 [packed = true]; - * @return A list containing the visible. - */ - java.util.List getVisibleList(); - /** - *
-     * The visible flag is used to store history information. It indicates that
-     * the current object version has been created by a delete operation on the
-     * OSM API.
-     * When a writer sets this flag, it MUST add a required_features tag with
-     * value "HistoricalInformation" to the HeaderBlock.
-     * If this flag is not available for some object it MUST be assumed to be
-     * true if the file has the required_features tag "HistoricalInformation"
-     * set.
-     * 
- * - * repeated bool visible = 6 [packed = true]; - * @return The count of visible. - */ - int getVisibleCount(); - /** - *
-     * The visible flag is used to store history information. It indicates that
-     * the current object version has been created by a delete operation on the
-     * OSM API.
-     * When a writer sets this flag, it MUST add a required_features tag with
-     * value "HistoricalInformation" to the HeaderBlock.
-     * If this flag is not available for some object it MUST be assumed to be
-     * true if the file has the required_features tag "HistoricalInformation"
-     * set.
-     * 
- * - * repeated bool visible = 6 [packed = true]; - * @param index The index of the element to return. - * @return The visible at the given index. - */ - boolean getVisible(int index); - } - /** - *
-   ** Optional metadata that may be included into each primitive. Special dense format used in DenseNodes. 
-   * 
- * - * Protobuf type {@code OSMPBF.DenseInfo} - */ - public static final class DenseInfo extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:OSMPBF.DenseInfo) - DenseInfoOrBuilder { - private static final long serialVersionUID = 0L; - // Use DenseInfo.newBuilder() to construct. - private DenseInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DenseInfo() { - version_ = emptyIntList(); - timestamp_ = emptyLongList(); - changeset_ = emptyLongList(); - uid_ = emptyIntList(); - userSid_ = emptyIntList(); - visible_ = emptyBooleanList(); - } - - @Override - @SuppressWarnings({"unused"}) - protected Object newInstance( - UnusedPrivateParameter unused) { - return new DenseInfo(); - } - - @Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private DenseInfo( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - version_ = newIntList(); - mutable_bitField0_ |= 0x00000001; - } - version_.addInt(input.readInt32()); - break; - } - case 10: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) { - version_ = newIntList(); - mutable_bitField0_ |= 0x00000001; - } - while (input.getBytesUntilLimit() > 0) { - version_.addInt(input.readInt32()); - } - input.popLimit(limit); - break; - } - case 16: { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - timestamp_ = newLongList(); - mutable_bitField0_ |= 0x00000002; - } - timestamp_.addLong(input.readSInt64()); - break; - } - case 18: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000002) != 0) && input.getBytesUntilLimit() > 0) { - timestamp_ = newLongList(); - mutable_bitField0_ |= 0x00000002; - } - while (input.getBytesUntilLimit() > 0) { - timestamp_.addLong(input.readSInt64()); - } - input.popLimit(limit); - break; - } - case 24: { - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - changeset_ = newLongList(); - mutable_bitField0_ |= 0x00000004; - } - changeset_.addLong(input.readSInt64()); - break; - } - case 26: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000004) != 0) && input.getBytesUntilLimit() > 0) { - changeset_ = newLongList(); - mutable_bitField0_ |= 0x00000004; - } - while (input.getBytesUntilLimit() > 0) { - changeset_.addLong(input.readSInt64()); - } - input.popLimit(limit); - break; - } - case 32: { - if (!((mutable_bitField0_ & 0x00000008) != 0)) { - uid_ = newIntList(); - mutable_bitField0_ |= 0x00000008; - } - uid_.addInt(input.readSInt32()); - break; - } - case 34: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000008) != 0) && input.getBytesUntilLimit() > 0) { - uid_ = newIntList(); - mutable_bitField0_ |= 0x00000008; - } - while (input.getBytesUntilLimit() > 0) { - uid_.addInt(input.readSInt32()); - } - input.popLimit(limit); - break; - } - case 40: { - if (!((mutable_bitField0_ & 0x00000010) != 0)) { - userSid_ = newIntList(); - mutable_bitField0_ |= 0x00000010; - } - userSid_.addInt(input.readSInt32()); - break; - } - case 42: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000010) != 0) && input.getBytesUntilLimit() > 0) { - userSid_ = newIntList(); - mutable_bitField0_ |= 0x00000010; - } - while (input.getBytesUntilLimit() > 0) { - userSid_.addInt(input.readSInt32()); - } - input.popLimit(limit); - break; - } - case 48: { - if (!((mutable_bitField0_ & 0x00000020) != 0)) { - visible_ = newBooleanList(); - mutable_bitField0_ |= 0x00000020; - } - visible_.addBoolean(input.readBool()); - break; - } - case 50: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000020) != 0) && input.getBytesUntilLimit() > 0) { - visible_ = newBooleanList(); - mutable_bitField0_ |= 0x00000020; - } - while (input.getBytesUntilLimit() > 0) { - visible_.addBoolean(input.readBool()); - } - input.popLimit(limit); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - version_.makeImmutable(); // C - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - timestamp_.makeImmutable(); // C - } - if (((mutable_bitField0_ & 0x00000004) != 0)) { - changeset_.makeImmutable(); // C - } - if (((mutable_bitField0_ & 0x00000008) != 0)) { - uid_.makeImmutable(); // C - } - if (((mutable_bitField0_ & 0x00000010) != 0)) { - userSid_.makeImmutable(); // C - } - if (((mutable_bitField0_ & 0x00000020) != 0)) { - visible_.makeImmutable(); // C - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return internal_static_OSMPBF_DenseInfo_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return internal_static_OSMPBF_DenseInfo_fieldAccessorTable - .ensureFieldAccessorsInitialized( - DenseInfo.class, DenseInfo.Builder.class); - } - - public static final int VERSION_FIELD_NUMBER = 1; - private com.google.protobuf.Internal.IntList version_; - /** - * repeated int32 version = 1 [packed = true]; - * @return A list containing the version. - */ - public java.util.List - getVersionList() { - return version_; - } - /** - * repeated int32 version = 1 [packed = true]; - * @return The count of version. - */ - public int getVersionCount() { - return version_.size(); - } - /** - * repeated int32 version = 1 [packed = true]; - * @param index The index of the element to return. - * @return The version at the given index. - */ - public int getVersion(int index) { - return version_.getInt(index); - } - private int versionMemoizedSerializedSize = -1; - - public static final int TIMESTAMP_FIELD_NUMBER = 2; - private com.google.protobuf.Internal.LongList timestamp_; - /** - *
-     * DELTA coded
-     * 
- * - * repeated sint64 timestamp = 2 [packed = true]; - * @return A list containing the timestamp. - */ - public java.util.List - getTimestampList() { - return timestamp_; - } - /** - *
-     * DELTA coded
-     * 
- * - * repeated sint64 timestamp = 2 [packed = true]; - * @return The count of timestamp. - */ - public int getTimestampCount() { - return timestamp_.size(); - } - /** - *
-     * DELTA coded
-     * 
- * - * repeated sint64 timestamp = 2 [packed = true]; - * @param index The index of the element to return. - * @return The timestamp at the given index. - */ - public long getTimestamp(int index) { - return timestamp_.getLong(index); - } - private int timestampMemoizedSerializedSize = -1; - - public static final int CHANGESET_FIELD_NUMBER = 3; - private com.google.protobuf.Internal.LongList changeset_; - /** - *
-     * DELTA coded
-     * 
- * - * repeated sint64 changeset = 3 [packed = true]; - * @return A list containing the changeset. - */ - public java.util.List - getChangesetList() { - return changeset_; - } - /** - *
-     * DELTA coded
-     * 
- * - * repeated sint64 changeset = 3 [packed = true]; - * @return The count of changeset. - */ - public int getChangesetCount() { - return changeset_.size(); - } - /** - *
-     * DELTA coded
-     * 
- * - * repeated sint64 changeset = 3 [packed = true]; - * @param index The index of the element to return. - * @return The changeset at the given index. - */ - public long getChangeset(int index) { - return changeset_.getLong(index); - } - private int changesetMemoizedSerializedSize = -1; - - public static final int UID_FIELD_NUMBER = 4; - private com.google.protobuf.Internal.IntList uid_; - /** - *
-     * DELTA coded
-     * 
- * - * repeated sint32 uid = 4 [packed = true]; - * @return A list containing the uid. - */ - public java.util.List - getUidList() { - return uid_; - } - /** - *
-     * DELTA coded
-     * 
- * - * repeated sint32 uid = 4 [packed = true]; - * @return The count of uid. - */ - public int getUidCount() { - return uid_.size(); - } - /** - *
-     * DELTA coded
-     * 
- * - * repeated sint32 uid = 4 [packed = true]; - * @param index The index of the element to return. - * @return The uid at the given index. - */ - public int getUid(int index) { - return uid_.getInt(index); - } - private int uidMemoizedSerializedSize = -1; - - public static final int USER_SID_FIELD_NUMBER = 5; - private com.google.protobuf.Internal.IntList userSid_; - /** - *
-     * String IDs for usernames. DELTA coded
-     * 
- * - * repeated sint32 user_sid = 5 [packed = true]; - * @return A list containing the userSid. - */ - public java.util.List - getUserSidList() { - return userSid_; - } - /** - *
-     * String IDs for usernames. DELTA coded
-     * 
- * - * repeated sint32 user_sid = 5 [packed = true]; - * @return The count of userSid. - */ - public int getUserSidCount() { - return userSid_.size(); - } - /** - *
-     * String IDs for usernames. DELTA coded
-     * 
- * - * repeated sint32 user_sid = 5 [packed = true]; - * @param index The index of the element to return. - * @return The userSid at the given index. - */ - public int getUserSid(int index) { - return userSid_.getInt(index); - } - private int userSidMemoizedSerializedSize = -1; - - public static final int VISIBLE_FIELD_NUMBER = 6; - private com.google.protobuf.Internal.BooleanList visible_; - /** - *
-     * The visible flag is used to store history information. It indicates that
-     * the current object version has been created by a delete operation on the
-     * OSM API.
-     * When a writer sets this flag, it MUST add a required_features tag with
-     * value "HistoricalInformation" to the HeaderBlock.
-     * If this flag is not available for some object it MUST be assumed to be
-     * true if the file has the required_features tag "HistoricalInformation"
-     * set.
-     * 
- * - * repeated bool visible = 6 [packed = true]; - * @return A list containing the visible. - */ - public java.util.List - getVisibleList() { - return visible_; - } - /** - *
-     * The visible flag is used to store history information. It indicates that
-     * the current object version has been created by a delete operation on the
-     * OSM API.
-     * When a writer sets this flag, it MUST add a required_features tag with
-     * value "HistoricalInformation" to the HeaderBlock.
-     * If this flag is not available for some object it MUST be assumed to be
-     * true if the file has the required_features tag "HistoricalInformation"
-     * set.
-     * 
- * - * repeated bool visible = 6 [packed = true]; - * @return The count of visible. - */ - public int getVisibleCount() { - return visible_.size(); - } - /** - *
-     * The visible flag is used to store history information. It indicates that
-     * the current object version has been created by a delete operation on the
-     * OSM API.
-     * When a writer sets this flag, it MUST add a required_features tag with
-     * value "HistoricalInformation" to the HeaderBlock.
-     * If this flag is not available for some object it MUST be assumed to be
-     * true if the file has the required_features tag "HistoricalInformation"
-     * set.
-     * 
- * - * repeated bool visible = 6 [packed = true]; - * @param index The index of the element to return. - * @return The visible at the given index. - */ - public boolean getVisible(int index) { - return visible_.getBoolean(index); - } - private int visibleMemoizedSerializedSize = -1; - - private byte memoizedIsInitialized = -1; - @Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (getVersionList().size() > 0) { - output.writeUInt32NoTag(10); - output.writeUInt32NoTag(versionMemoizedSerializedSize); - } - for (int i = 0; i < version_.size(); i++) { - output.writeInt32NoTag(version_.getInt(i)); - } - if (getTimestampList().size() > 0) { - output.writeUInt32NoTag(18); - output.writeUInt32NoTag(timestampMemoizedSerializedSize); - } - for (int i = 0; i < timestamp_.size(); i++) { - output.writeSInt64NoTag(timestamp_.getLong(i)); - } - if (getChangesetList().size() > 0) { - output.writeUInt32NoTag(26); - output.writeUInt32NoTag(changesetMemoizedSerializedSize); - } - for (int i = 0; i < changeset_.size(); i++) { - output.writeSInt64NoTag(changeset_.getLong(i)); - } - if (getUidList().size() > 0) { - output.writeUInt32NoTag(34); - output.writeUInt32NoTag(uidMemoizedSerializedSize); - } - for (int i = 0; i < uid_.size(); i++) { - output.writeSInt32NoTag(uid_.getInt(i)); - } - if (getUserSidList().size() > 0) { - output.writeUInt32NoTag(42); - output.writeUInt32NoTag(userSidMemoizedSerializedSize); - } - for (int i = 0; i < userSid_.size(); i++) { - output.writeSInt32NoTag(userSid_.getInt(i)); - } - if (getVisibleList().size() > 0) { - output.writeUInt32NoTag(50); - output.writeUInt32NoTag(visibleMemoizedSerializedSize); - } - for (int i = 0; i < visible_.size(); i++) { - output.writeBoolNoTag(visible_.getBoolean(i)); - } - unknownFields.writeTo(output); - } - - @Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - for (int i = 0; i < version_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(version_.getInt(i)); - } - size += dataSize; - if (!getVersionList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(dataSize); - } - versionMemoizedSerializedSize = dataSize; - } - { - int dataSize = 0; - for (int i = 0; i < timestamp_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeSInt64SizeNoTag(timestamp_.getLong(i)); - } - size += dataSize; - if (!getTimestampList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(dataSize); - } - timestampMemoizedSerializedSize = dataSize; - } - { - int dataSize = 0; - for (int i = 0; i < changeset_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeSInt64SizeNoTag(changeset_.getLong(i)); - } - size += dataSize; - if (!getChangesetList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(dataSize); - } - changesetMemoizedSerializedSize = dataSize; - } - { - int dataSize = 0; - for (int i = 0; i < uid_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeSInt32SizeNoTag(uid_.getInt(i)); - } - size += dataSize; - if (!getUidList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(dataSize); - } - uidMemoizedSerializedSize = dataSize; - } - { - int dataSize = 0; - for (int i = 0; i < userSid_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeSInt32SizeNoTag(userSid_.getInt(i)); - } - size += dataSize; - if (!getUserSidList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(dataSize); - } - userSidMemoizedSerializedSize = dataSize; - } - { - int dataSize = 0; - dataSize = 1 * getVisibleList().size(); - size += dataSize; - if (!getVisibleList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(dataSize); - } - visibleMemoizedSerializedSize = dataSize; - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @Override - public boolean equals(final Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof DenseInfo)) { - return super.equals(obj); - } - DenseInfo other = (DenseInfo) obj; - - if (!getVersionList() - .equals(other.getVersionList())) return false; - if (!getTimestampList() - .equals(other.getTimestampList())) return false; - if (!getChangesetList() - .equals(other.getChangesetList())) return false; - if (!getUidList() - .equals(other.getUidList())) return false; - if (!getUserSidList() - .equals(other.getUserSidList())) return false; - if (!getVisibleList() - .equals(other.getVisibleList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getVersionCount() > 0) { - hash = (37 * hash) + VERSION_FIELD_NUMBER; - hash = (53 * hash) + getVersionList().hashCode(); - } - if (getTimestampCount() > 0) { - hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER; - hash = (53 * hash) + getTimestampList().hashCode(); - } - if (getChangesetCount() > 0) { - hash = (37 * hash) + CHANGESET_FIELD_NUMBER; - hash = (53 * hash) + getChangesetList().hashCode(); - } - if (getUidCount() > 0) { - hash = (37 * hash) + UID_FIELD_NUMBER; - hash = (53 * hash) + getUidList().hashCode(); - } - if (getUserSidCount() > 0) { - hash = (37 * hash) + USER_SID_FIELD_NUMBER; - hash = (53 * hash) + getUserSidList().hashCode(); - } - if (getVisibleCount() > 0) { - hash = (37 * hash) + VISIBLE_FIELD_NUMBER; - hash = (53 * hash) + getVisibleList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static DenseInfo parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static DenseInfo parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static DenseInfo parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static DenseInfo parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static DenseInfo parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static DenseInfo parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static DenseInfo parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static DenseInfo parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static DenseInfo parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static DenseInfo parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static DenseInfo parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static DenseInfo parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(DenseInfo prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @Override - protected Builder newBuilderForType( - BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     ** Optional metadata that may be included into each primitive. Special dense format used in DenseNodes. 
-     * 
- * - * Protobuf type {@code OSMPBF.DenseInfo} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:OSMPBF.DenseInfo) - DenseInfoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return internal_static_OSMPBF_DenseInfo_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return internal_static_OSMPBF_DenseInfo_fieldAccessorTable - .ensureFieldAccessorsInitialized( - DenseInfo.class, DenseInfo.Builder.class); - } - - // Construct using DenseInfo.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @Override - public Builder clear() { - super.clear(); - version_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000001); - timestamp_ = emptyLongList(); - bitField0_ = (bitField0_ & ~0x00000002); - changeset_ = emptyLongList(); - bitField0_ = (bitField0_ & ~0x00000004); - uid_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000008); - userSid_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000010); - visible_ = emptyBooleanList(); - bitField0_ = (bitField0_ & ~0x00000020); - return this; - } - - @Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return internal_static_OSMPBF_DenseInfo_descriptor; - } - - @Override - public DenseInfo getDefaultInstanceForType() { - return DenseInfo.getDefaultInstance(); - } - - @Override - public DenseInfo build() { - DenseInfo result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @Override - public DenseInfo buildPartial() { - DenseInfo result = new DenseInfo(this); - int from_bitField0_ = bitField0_; - if (((bitField0_ & 0x00000001) != 0)) { - version_.makeImmutable(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.version_ = version_; - if (((bitField0_ & 0x00000002) != 0)) { - timestamp_.makeImmutable(); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.timestamp_ = timestamp_; - if (((bitField0_ & 0x00000004) != 0)) { - changeset_.makeImmutable(); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.changeset_ = changeset_; - if (((bitField0_ & 0x00000008) != 0)) { - uid_.makeImmutable(); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.uid_ = uid_; - if (((bitField0_ & 0x00000010) != 0)) { - userSid_.makeImmutable(); - bitField0_ = (bitField0_ & ~0x00000010); - } - result.userSid_ = userSid_; - if (((bitField0_ & 0x00000020) != 0)) { - visible_.makeImmutable(); - bitField0_ = (bitField0_ & ~0x00000020); - } - result.visible_ = visible_; - onBuilt(); - return result; - } - - @Override - public Builder clone() { - return super.clone(); - } - @Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.setField(field, value); - } - @Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, Object value) { - return super.setRepeatedField(field, index, value); - } - @Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.addRepeatedField(field, value); - } - @Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof DenseInfo) { - return mergeFrom((DenseInfo)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(DenseInfo other) { - if (other == DenseInfo.getDefaultInstance()) return this; - if (!other.version_.isEmpty()) { - if (version_.isEmpty()) { - version_ = other.version_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureVersionIsMutable(); - version_.addAll(other.version_); - } - onChanged(); - } - if (!other.timestamp_.isEmpty()) { - if (timestamp_.isEmpty()) { - timestamp_ = other.timestamp_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureTimestampIsMutable(); - timestamp_.addAll(other.timestamp_); - } - onChanged(); - } - if (!other.changeset_.isEmpty()) { - if (changeset_.isEmpty()) { - changeset_ = other.changeset_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureChangesetIsMutable(); - changeset_.addAll(other.changeset_); - } - onChanged(); - } - if (!other.uid_.isEmpty()) { - if (uid_.isEmpty()) { - uid_ = other.uid_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensureUidIsMutable(); - uid_.addAll(other.uid_); - } - onChanged(); - } - if (!other.userSid_.isEmpty()) { - if (userSid_.isEmpty()) { - userSid_ = other.userSid_; - bitField0_ = (bitField0_ & ~0x00000010); - } else { - ensureUserSidIsMutable(); - userSid_.addAll(other.userSid_); - } - onChanged(); - } - if (!other.visible_.isEmpty()) { - if (visible_.isEmpty()) { - visible_ = other.visible_; - bitField0_ = (bitField0_ & ~0x00000020); - } else { - ensureVisibleIsMutable(); - visible_.addAll(other.visible_); - } - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @Override - public final boolean isInitialized() { - return true; - } - - @Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - DenseInfo parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (DenseInfo) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.protobuf.Internal.IntList version_ = emptyIntList(); - private void ensureVersionIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - version_ = mutableCopy(version_); - bitField0_ |= 0x00000001; - } - } - /** - * repeated int32 version = 1 [packed = true]; - * @return A list containing the version. - */ - public java.util.List - getVersionList() { - return ((bitField0_ & 0x00000001) != 0) ? - java.util.Collections.unmodifiableList(version_) : version_; - } - /** - * repeated int32 version = 1 [packed = true]; - * @return The count of version. - */ - public int getVersionCount() { - return version_.size(); - } - /** - * repeated int32 version = 1 [packed = true]; - * @param index The index of the element to return. - * @return The version at the given index. - */ - public int getVersion(int index) { - return version_.getInt(index); - } - /** - * repeated int32 version = 1 [packed = true]; - * @param index The index to set the value at. - * @param value The version to set. - * @return This builder for chaining. - */ - public Builder setVersion( - int index, int value) { - ensureVersionIsMutable(); - version_.setInt(index, value); - onChanged(); - return this; - } - /** - * repeated int32 version = 1 [packed = true]; - * @param value The version to add. - * @return This builder for chaining. - */ - public Builder addVersion(int value) { - ensureVersionIsMutable(); - version_.addInt(value); - onChanged(); - return this; - } - /** - * repeated int32 version = 1 [packed = true]; - * @param values The version to add. - * @return This builder for chaining. - */ - public Builder addAllVersion( - Iterable values) { - ensureVersionIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, version_); - onChanged(); - return this; - } - /** - * repeated int32 version = 1 [packed = true]; - * @return This builder for chaining. - */ - public Builder clearVersion() { - version_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - private com.google.protobuf.Internal.LongList timestamp_ = emptyLongList(); - private void ensureTimestampIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - timestamp_ = mutableCopy(timestamp_); - bitField0_ |= 0x00000002; - } - } - /** - *
-       * DELTA coded
-       * 
- * - * repeated sint64 timestamp = 2 [packed = true]; - * @return A list containing the timestamp. - */ - public java.util.List - getTimestampList() { - return ((bitField0_ & 0x00000002) != 0) ? - java.util.Collections.unmodifiableList(timestamp_) : timestamp_; - } - /** - *
-       * DELTA coded
-       * 
- * - * repeated sint64 timestamp = 2 [packed = true]; - * @return The count of timestamp. - */ - public int getTimestampCount() { - return timestamp_.size(); - } - /** - *
-       * DELTA coded
-       * 
- * - * repeated sint64 timestamp = 2 [packed = true]; - * @param index The index of the element to return. - * @return The timestamp at the given index. - */ - public long getTimestamp(int index) { - return timestamp_.getLong(index); - } - /** - *
-       * DELTA coded
-       * 
- * - * repeated sint64 timestamp = 2 [packed = true]; - * @param index The index to set the value at. - * @param value The timestamp to set. - * @return This builder for chaining. - */ - public Builder setTimestamp( - int index, long value) { - ensureTimestampIsMutable(); - timestamp_.setLong(index, value); - onChanged(); - return this; - } - /** - *
-       * DELTA coded
-       * 
- * - * repeated sint64 timestamp = 2 [packed = true]; - * @param value The timestamp to add. - * @return This builder for chaining. - */ - public Builder addTimestamp(long value) { - ensureTimestampIsMutable(); - timestamp_.addLong(value); - onChanged(); - return this; - } - /** - *
-       * DELTA coded
-       * 
- * - * repeated sint64 timestamp = 2 [packed = true]; - * @param values The timestamp to add. - * @return This builder for chaining. - */ - public Builder addAllTimestamp( - Iterable values) { - ensureTimestampIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, timestamp_); - onChanged(); - return this; - } - /** - *
-       * DELTA coded
-       * 
- * - * repeated sint64 timestamp = 2 [packed = true]; - * @return This builder for chaining. - */ - public Builder clearTimestamp() { - timestamp_ = emptyLongList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - - private com.google.protobuf.Internal.LongList changeset_ = emptyLongList(); - private void ensureChangesetIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - changeset_ = mutableCopy(changeset_); - bitField0_ |= 0x00000004; - } - } - /** - *
-       * DELTA coded
-       * 
- * - * repeated sint64 changeset = 3 [packed = true]; - * @return A list containing the changeset. - */ - public java.util.List - getChangesetList() { - return ((bitField0_ & 0x00000004) != 0) ? - java.util.Collections.unmodifiableList(changeset_) : changeset_; - } - /** - *
-       * DELTA coded
-       * 
- * - * repeated sint64 changeset = 3 [packed = true]; - * @return The count of changeset. - */ - public int getChangesetCount() { - return changeset_.size(); - } - /** - *
-       * DELTA coded
-       * 
- * - * repeated sint64 changeset = 3 [packed = true]; - * @param index The index of the element to return. - * @return The changeset at the given index. - */ - public long getChangeset(int index) { - return changeset_.getLong(index); - } - /** - *
-       * DELTA coded
-       * 
- * - * repeated sint64 changeset = 3 [packed = true]; - * @param index The index to set the value at. - * @param value The changeset to set. - * @return This builder for chaining. - */ - public Builder setChangeset( - int index, long value) { - ensureChangesetIsMutable(); - changeset_.setLong(index, value); - onChanged(); - return this; - } - /** - *
-       * DELTA coded
-       * 
- * - * repeated sint64 changeset = 3 [packed = true]; - * @param value The changeset to add. - * @return This builder for chaining. - */ - public Builder addChangeset(long value) { - ensureChangesetIsMutable(); - changeset_.addLong(value); - onChanged(); - return this; - } - /** - *
-       * DELTA coded
-       * 
- * - * repeated sint64 changeset = 3 [packed = true]; - * @param values The changeset to add. - * @return This builder for chaining. - */ - public Builder addAllChangeset( - Iterable values) { - ensureChangesetIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, changeset_); - onChanged(); - return this; - } - /** - *
-       * DELTA coded
-       * 
- * - * repeated sint64 changeset = 3 [packed = true]; - * @return This builder for chaining. - */ - public Builder clearChangeset() { - changeset_ = emptyLongList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - - private com.google.protobuf.Internal.IntList uid_ = emptyIntList(); - private void ensureUidIsMutable() { - if (!((bitField0_ & 0x00000008) != 0)) { - uid_ = mutableCopy(uid_); - bitField0_ |= 0x00000008; - } - } - /** - *
-       * DELTA coded
-       * 
- * - * repeated sint32 uid = 4 [packed = true]; - * @return A list containing the uid. - */ - public java.util.List - getUidList() { - return ((bitField0_ & 0x00000008) != 0) ? - java.util.Collections.unmodifiableList(uid_) : uid_; - } - /** - *
-       * DELTA coded
-       * 
- * - * repeated sint32 uid = 4 [packed = true]; - * @return The count of uid. - */ - public int getUidCount() { - return uid_.size(); - } - /** - *
-       * DELTA coded
-       * 
- * - * repeated sint32 uid = 4 [packed = true]; - * @param index The index of the element to return. - * @return The uid at the given index. - */ - public int getUid(int index) { - return uid_.getInt(index); - } - /** - *
-       * DELTA coded
-       * 
- * - * repeated sint32 uid = 4 [packed = true]; - * @param index The index to set the value at. - * @param value The uid to set. - * @return This builder for chaining. - */ - public Builder setUid( - int index, int value) { - ensureUidIsMutable(); - uid_.setInt(index, value); - onChanged(); - return this; - } - /** - *
-       * DELTA coded
-       * 
- * - * repeated sint32 uid = 4 [packed = true]; - * @param value The uid to add. - * @return This builder for chaining. - */ - public Builder addUid(int value) { - ensureUidIsMutable(); - uid_.addInt(value); - onChanged(); - return this; - } - /** - *
-       * DELTA coded
-       * 
- * - * repeated sint32 uid = 4 [packed = true]; - * @param values The uid to add. - * @return This builder for chaining. - */ - public Builder addAllUid( - Iterable values) { - ensureUidIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, uid_); - onChanged(); - return this; - } - /** - *
-       * DELTA coded
-       * 
- * - * repeated sint32 uid = 4 [packed = true]; - * @return This builder for chaining. - */ - public Builder clearUid() { - uid_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - - private com.google.protobuf.Internal.IntList userSid_ = emptyIntList(); - private void ensureUserSidIsMutable() { - if (!((bitField0_ & 0x00000010) != 0)) { - userSid_ = mutableCopy(userSid_); - bitField0_ |= 0x00000010; - } - } - /** - *
-       * String IDs for usernames. DELTA coded
-       * 
- * - * repeated sint32 user_sid = 5 [packed = true]; - * @return A list containing the userSid. - */ - public java.util.List - getUserSidList() { - return ((bitField0_ & 0x00000010) != 0) ? - java.util.Collections.unmodifiableList(userSid_) : userSid_; - } - /** - *
-       * String IDs for usernames. DELTA coded
-       * 
- * - * repeated sint32 user_sid = 5 [packed = true]; - * @return The count of userSid. - */ - public int getUserSidCount() { - return userSid_.size(); - } - /** - *
-       * String IDs for usernames. DELTA coded
-       * 
- * - * repeated sint32 user_sid = 5 [packed = true]; - * @param index The index of the element to return. - * @return The userSid at the given index. - */ - public int getUserSid(int index) { - return userSid_.getInt(index); - } - /** - *
-       * String IDs for usernames. DELTA coded
-       * 
- * - * repeated sint32 user_sid = 5 [packed = true]; - * @param index The index to set the value at. - * @param value The userSid to set. - * @return This builder for chaining. - */ - public Builder setUserSid( - int index, int value) { - ensureUserSidIsMutable(); - userSid_.setInt(index, value); - onChanged(); - return this; - } - /** - *
-       * String IDs for usernames. DELTA coded
-       * 
- * - * repeated sint32 user_sid = 5 [packed = true]; - * @param value The userSid to add. - * @return This builder for chaining. - */ - public Builder addUserSid(int value) { - ensureUserSidIsMutable(); - userSid_.addInt(value); - onChanged(); - return this; - } - /** - *
-       * String IDs for usernames. DELTA coded
-       * 
- * - * repeated sint32 user_sid = 5 [packed = true]; - * @param values The userSid to add. - * @return This builder for chaining. - */ - public Builder addAllUserSid( - Iterable values) { - ensureUserSidIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, userSid_); - onChanged(); - return this; - } - /** - *
-       * String IDs for usernames. DELTA coded
-       * 
- * - * repeated sint32 user_sid = 5 [packed = true]; - * @return This builder for chaining. - */ - public Builder clearUserSid() { - userSid_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - return this; - } - - private com.google.protobuf.Internal.BooleanList visible_ = emptyBooleanList(); - private void ensureVisibleIsMutable() { - if (!((bitField0_ & 0x00000020) != 0)) { - visible_ = mutableCopy(visible_); - bitField0_ |= 0x00000020; - } - } - /** - *
-       * The visible flag is used to store history information. It indicates that
-       * the current object version has been created by a delete operation on the
-       * OSM API.
-       * When a writer sets this flag, it MUST add a required_features tag with
-       * value "HistoricalInformation" to the HeaderBlock.
-       * If this flag is not available for some object it MUST be assumed to be
-       * true if the file has the required_features tag "HistoricalInformation"
-       * set.
-       * 
- * - * repeated bool visible = 6 [packed = true]; - * @return A list containing the visible. - */ - public java.util.List - getVisibleList() { - return ((bitField0_ & 0x00000020) != 0) ? - java.util.Collections.unmodifiableList(visible_) : visible_; - } - /** - *
-       * The visible flag is used to store history information. It indicates that
-       * the current object version has been created by a delete operation on the
-       * OSM API.
-       * When a writer sets this flag, it MUST add a required_features tag with
-       * value "HistoricalInformation" to the HeaderBlock.
-       * If this flag is not available for some object it MUST be assumed to be
-       * true if the file has the required_features tag "HistoricalInformation"
-       * set.
-       * 
- * - * repeated bool visible = 6 [packed = true]; - * @return The count of visible. - */ - public int getVisibleCount() { - return visible_.size(); - } - /** - *
-       * The visible flag is used to store history information. It indicates that
-       * the current object version has been created by a delete operation on the
-       * OSM API.
-       * When a writer sets this flag, it MUST add a required_features tag with
-       * value "HistoricalInformation" to the HeaderBlock.
-       * If this flag is not available for some object it MUST be assumed to be
-       * true if the file has the required_features tag "HistoricalInformation"
-       * set.
-       * 
- * - * repeated bool visible = 6 [packed = true]; - * @param index The index of the element to return. - * @return The visible at the given index. - */ - public boolean getVisible(int index) { - return visible_.getBoolean(index); - } - /** - *
-       * The visible flag is used to store history information. It indicates that
-       * the current object version has been created by a delete operation on the
-       * OSM API.
-       * When a writer sets this flag, it MUST add a required_features tag with
-       * value "HistoricalInformation" to the HeaderBlock.
-       * If this flag is not available for some object it MUST be assumed to be
-       * true if the file has the required_features tag "HistoricalInformation"
-       * set.
-       * 
- * - * repeated bool visible = 6 [packed = true]; - * @param index The index to set the value at. - * @param value The visible to set. - * @return This builder for chaining. - */ - public Builder setVisible( - int index, boolean value) { - ensureVisibleIsMutable(); - visible_.setBoolean(index, value); - onChanged(); - return this; - } - /** - *
-       * The visible flag is used to store history information. It indicates that
-       * the current object version has been created by a delete operation on the
-       * OSM API.
-       * When a writer sets this flag, it MUST add a required_features tag with
-       * value "HistoricalInformation" to the HeaderBlock.
-       * If this flag is not available for some object it MUST be assumed to be
-       * true if the file has the required_features tag "HistoricalInformation"
-       * set.
-       * 
- * - * repeated bool visible = 6 [packed = true]; - * @param value The visible to add. - * @return This builder for chaining. - */ - public Builder addVisible(boolean value) { - ensureVisibleIsMutable(); - visible_.addBoolean(value); - onChanged(); - return this; - } - /** - *
-       * The visible flag is used to store history information. It indicates that
-       * the current object version has been created by a delete operation on the
-       * OSM API.
-       * When a writer sets this flag, it MUST add a required_features tag with
-       * value "HistoricalInformation" to the HeaderBlock.
-       * If this flag is not available for some object it MUST be assumed to be
-       * true if the file has the required_features tag "HistoricalInformation"
-       * set.
-       * 
- * - * repeated bool visible = 6 [packed = true]; - * @param values The visible to add. - * @return This builder for chaining. - */ - public Builder addAllVisible( - Iterable values) { - ensureVisibleIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, visible_); - onChanged(); - return this; - } - /** - *
-       * The visible flag is used to store history information. It indicates that
-       * the current object version has been created by a delete operation on the
-       * OSM API.
-       * When a writer sets this flag, it MUST add a required_features tag with
-       * value "HistoricalInformation" to the HeaderBlock.
-       * If this flag is not available for some object it MUST be assumed to be
-       * true if the file has the required_features tag "HistoricalInformation"
-       * set.
-       * 
- * - * repeated bool visible = 6 [packed = true]; - * @return This builder for chaining. - */ - public Builder clearVisible() { - visible_ = emptyBooleanList(); - bitField0_ = (bitField0_ & ~0x00000020); - onChanged(); - return this; - } - @Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:OSMPBF.DenseInfo) - } - - // @@protoc_insertion_point(class_scope:OSMPBF.DenseInfo) - private static final DenseInfo DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new DenseInfo(); - } - - public static DenseInfo getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - @Deprecated public static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @Override - public DenseInfo parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DenseInfo(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @Override - public DenseInfo getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface ChangeSetOrBuilder extends - // @@protoc_insertion_point(interface_extends:OSMPBF.ChangeSet) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     *   
-     *   // Parallel arrays.
-     *   repeated uint32 keys = 2 [packed = true]; // String IDs.
-     *   repeated uint32 vals = 3 [packed = true]; // String IDs.
-     *   optional Info info = 4;
-     * 
- * - * required int64 id = 1; - * @return Whether the id field is set. - */ - boolean hasId(); - /** - *
-     *   
-     *   // Parallel arrays.
-     *   repeated uint32 keys = 2 [packed = true]; // String IDs.
-     *   repeated uint32 vals = 3 [packed = true]; // String IDs.
-     *   optional Info info = 4;
-     * 
- * - * required int64 id = 1; - * @return The id. - */ - long getId(); - } - /** - *
-   * THIS IS STUB DESIGN FOR CHANGESETS. NOT USED RIGHT NOW.
-   * TODO:    REMOVE THIS?
-   * 
- * - * Protobuf type {@code OSMPBF.ChangeSet} - */ - public static final class ChangeSet extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:OSMPBF.ChangeSet) - ChangeSetOrBuilder { - private static final long serialVersionUID = 0L; - // Use ChangeSet.newBuilder() to construct. - private ChangeSet(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ChangeSet() { - } - - @Override - @SuppressWarnings({"unused"}) - protected Object newInstance( - UnusedPrivateParameter unused) { - return new ChangeSet(); - } - - @Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ChangeSet( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - bitField0_ |= 0x00000001; - id_ = input.readInt64(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return internal_static_OSMPBF_ChangeSet_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return internal_static_OSMPBF_ChangeSet_fieldAccessorTable - .ensureFieldAccessorsInitialized( - ChangeSet.class, ChangeSet.Builder.class); - } - - private int bitField0_; - public static final int ID_FIELD_NUMBER = 1; - private long id_; - /** - *
-     *   
-     *   // Parallel arrays.
-     *   repeated uint32 keys = 2 [packed = true]; // String IDs.
-     *   repeated uint32 vals = 3 [packed = true]; // String IDs.
-     *   optional Info info = 4;
-     * 
- * - * required int64 id = 1; - * @return Whether the id field is set. - */ - public boolean hasId() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-     *   
-     *   // Parallel arrays.
-     *   repeated uint32 keys = 2 [packed = true]; // String IDs.
-     *   repeated uint32 vals = 3 [packed = true]; // String IDs.
-     *   optional Info info = 4;
-     * 
- * - * required int64 id = 1; - * @return The id. - */ - public long getId() { - return id_; - } - - private byte memoizedIsInitialized = -1; - @Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - if (!hasId()) { - memoizedIsInitialized = 0; - return false; - } - memoizedIsInitialized = 1; - return true; - } - - @Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) != 0)) { - output.writeInt64(1, id_); - } - unknownFields.writeTo(output); - } - - @Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(1, id_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @Override - public boolean equals(final Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof ChangeSet)) { - return super.equals(obj); - } - ChangeSet other = (ChangeSet) obj; - - if (hasId() != other.hasId()) return false; - if (hasId()) { - if (getId() - != other.getId()) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasId()) { - hash = (37 * hash) + ID_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getId()); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static ChangeSet parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static ChangeSet parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static ChangeSet parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static ChangeSet parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static ChangeSet parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static ChangeSet parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static ChangeSet parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static ChangeSet parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static ChangeSet parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static ChangeSet parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static ChangeSet parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static ChangeSet parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(ChangeSet prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @Override - protected Builder newBuilderForType( - BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * THIS IS STUB DESIGN FOR CHANGESETS. NOT USED RIGHT NOW.
-     * TODO:    REMOVE THIS?
-     * 
- * - * Protobuf type {@code OSMPBF.ChangeSet} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:OSMPBF.ChangeSet) - ChangeSetOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return internal_static_OSMPBF_ChangeSet_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return internal_static_OSMPBF_ChangeSet_fieldAccessorTable - .ensureFieldAccessorsInitialized( - ChangeSet.class, ChangeSet.Builder.class); - } - - // Construct using ChangeSet.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @Override - public Builder clear() { - super.clear(); - id_ = 0L; - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return internal_static_OSMPBF_ChangeSet_descriptor; - } - - @Override - public ChangeSet getDefaultInstanceForType() { - return ChangeSet.getDefaultInstance(); - } - - @Override - public ChangeSet build() { - ChangeSet result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @Override - public ChangeSet buildPartial() { - ChangeSet result = new ChangeSet(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.id_ = id_; - to_bitField0_ |= 0x00000001; - } - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - @Override - public Builder clone() { - return super.clone(); - } - @Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.setField(field, value); - } - @Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, Object value) { - return super.setRepeatedField(field, index, value); - } - @Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.addRepeatedField(field, value); - } - @Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof ChangeSet) { - return mergeFrom((ChangeSet)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(ChangeSet other) { - if (other == ChangeSet.getDefaultInstance()) return this; - if (other.hasId()) { - setId(other.getId()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @Override - public final boolean isInitialized() { - if (!hasId()) { - return false; - } - return true; - } - - @Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - ChangeSet parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (ChangeSet) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private long id_ ; - /** - *
-       *   
-       *   // Parallel arrays.
-       *   repeated uint32 keys = 2 [packed = true]; // String IDs.
-       *   repeated uint32 vals = 3 [packed = true]; // String IDs.
-       *   optional Info info = 4;
-       * 
- * - * required int64 id = 1; - * @return Whether the id field is set. - */ - public boolean hasId() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-       *   
-       *   // Parallel arrays.
-       *   repeated uint32 keys = 2 [packed = true]; // String IDs.
-       *   repeated uint32 vals = 3 [packed = true]; // String IDs.
-       *   optional Info info = 4;
-       * 
- * - * required int64 id = 1; - * @return The id. - */ - public long getId() { - return id_; - } - /** - *
-       *   
-       *   // Parallel arrays.
-       *   repeated uint32 keys = 2 [packed = true]; // String IDs.
-       *   repeated uint32 vals = 3 [packed = true]; // String IDs.
-       *   optional Info info = 4;
-       * 
- * - * required int64 id = 1; - * @param value The id to set. - * @return This builder for chaining. - */ - public Builder setId(long value) { - bitField0_ |= 0x00000001; - id_ = value; - onChanged(); - return this; - } - /** - *
-       *   
-       *   // Parallel arrays.
-       *   repeated uint32 keys = 2 [packed = true]; // String IDs.
-       *   repeated uint32 vals = 3 [packed = true]; // String IDs.
-       *   optional Info info = 4;
-       * 
- * - * required int64 id = 1; - * @return This builder for chaining. - */ - public Builder clearId() { - bitField0_ = (bitField0_ & ~0x00000001); - id_ = 0L; - onChanged(); - return this; - } - @Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:OSMPBF.ChangeSet) - } - - // @@protoc_insertion_point(class_scope:OSMPBF.ChangeSet) - private static final ChangeSet DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new ChangeSet(); - } - - public static ChangeSet getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - @Deprecated public static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @Override - public ChangeSet parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ChangeSet(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @Override - public ChangeSet getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface NodeOrBuilder extends - // @@protoc_insertion_point(interface_extends:OSMPBF.Node) - com.google.protobuf.MessageOrBuilder { - - /** - * required sint64 id = 1; - * @return Whether the id field is set. - */ - boolean hasId(); - /** - * required sint64 id = 1; - * @return The id. - */ - long getId(); - - /** - *
-     * Parallel arrays.
-     * 
- * - * repeated uint32 keys = 2 [packed = true]; - * @return A list containing the keys. - */ - java.util.List getKeysList(); - /** - *
-     * Parallel arrays.
-     * 
- * - * repeated uint32 keys = 2 [packed = true]; - * @return The count of keys. - */ - int getKeysCount(); - /** - *
-     * Parallel arrays.
-     * 
- * - * repeated uint32 keys = 2 [packed = true]; - * @param index The index of the element to return. - * @return The keys at the given index. - */ - int getKeys(int index); - - /** - *
-     * String IDs.
-     * 
- * - * repeated uint32 vals = 3 [packed = true]; - * @return A list containing the vals. - */ - java.util.List getValsList(); - /** - *
-     * String IDs.
-     * 
- * - * repeated uint32 vals = 3 [packed = true]; - * @return The count of vals. - */ - int getValsCount(); - /** - *
-     * String IDs.
-     * 
- * - * repeated uint32 vals = 3 [packed = true]; - * @param index The index of the element to return. - * @return The vals at the given index. - */ - int getVals(int index); - - /** - *
-     * May be omitted in omitmeta
-     * 
- * - * optional .OSMPBF.Info info = 4; - * @return Whether the info field is set. - */ - boolean hasInfo(); - /** - *
-     * May be omitted in omitmeta
-     * 
- * - * optional .OSMPBF.Info info = 4; - * @return The info. - */ - Info getInfo(); - /** - *
-     * May be omitted in omitmeta
-     * 
- * - * optional .OSMPBF.Info info = 4; - */ - InfoOrBuilder getInfoOrBuilder(); - - /** - * required sint64 lat = 8; - * @return Whether the lat field is set. - */ - boolean hasLat(); - /** - * required sint64 lat = 8; - * @return The lat. - */ - long getLat(); - - /** - * required sint64 lon = 9; - * @return Whether the lon field is set. - */ - boolean hasLon(); - /** - * required sint64 lon = 9; - * @return The lon. - */ - long getLon(); - } - /** - * Protobuf type {@code OSMPBF.Node} - */ - public static final class Node extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:OSMPBF.Node) - NodeOrBuilder { - private static final long serialVersionUID = 0L; - // Use Node.newBuilder() to construct. - private Node(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Node() { - keys_ = emptyIntList(); - vals_ = emptyIntList(); - } - - @Override - @SuppressWarnings({"unused"}) - protected Object newInstance( - UnusedPrivateParameter unused) { - return new Node(); - } - - @Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Node( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - bitField0_ |= 0x00000001; - id_ = input.readSInt64(); - break; - } - case 16: { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - keys_ = newIntList(); - mutable_bitField0_ |= 0x00000002; - } - keys_.addInt(input.readUInt32()); - break; - } - case 18: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000002) != 0) && input.getBytesUntilLimit() > 0) { - keys_ = newIntList(); - mutable_bitField0_ |= 0x00000002; - } - while (input.getBytesUntilLimit() > 0) { - keys_.addInt(input.readUInt32()); - } - input.popLimit(limit); - break; - } - case 24: { - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - vals_ = newIntList(); - mutable_bitField0_ |= 0x00000004; - } - vals_.addInt(input.readUInt32()); - break; - } - case 26: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000004) != 0) && input.getBytesUntilLimit() > 0) { - vals_ = newIntList(); - mutable_bitField0_ |= 0x00000004; - } - while (input.getBytesUntilLimit() > 0) { - vals_.addInt(input.readUInt32()); - } - input.popLimit(limit); - break; - } - case 34: { - Info.Builder subBuilder = null; - if (((bitField0_ & 0x00000002) != 0)) { - subBuilder = info_.toBuilder(); - } - info_ = input.readMessage(Info.PARSER, extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(info_); - info_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000002; - break; - } - case 64: { - bitField0_ |= 0x00000004; - lat_ = input.readSInt64(); - break; - } - case 72: { - bitField0_ |= 0x00000008; - lon_ = input.readSInt64(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000002) != 0)) { - keys_.makeImmutable(); // C - } - if (((mutable_bitField0_ & 0x00000004) != 0)) { - vals_.makeImmutable(); // C - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return internal_static_OSMPBF_Node_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return internal_static_OSMPBF_Node_fieldAccessorTable - .ensureFieldAccessorsInitialized( - Node.class, Node.Builder.class); - } - - private int bitField0_; - public static final int ID_FIELD_NUMBER = 1; - private long id_; - /** - * required sint64 id = 1; - * @return Whether the id field is set. - */ - public boolean hasId() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * required sint64 id = 1; - * @return The id. - */ - public long getId() { - return id_; - } - - public static final int KEYS_FIELD_NUMBER = 2; - private com.google.protobuf.Internal.IntList keys_; - /** - *
-     * Parallel arrays.
-     * 
- * - * repeated uint32 keys = 2 [packed = true]; - * @return A list containing the keys. - */ - public java.util.List - getKeysList() { - return keys_; - } - /** - *
-     * Parallel arrays.
-     * 
- * - * repeated uint32 keys = 2 [packed = true]; - * @return The count of keys. - */ - public int getKeysCount() { - return keys_.size(); - } - /** - *
-     * Parallel arrays.
-     * 
- * - * repeated uint32 keys = 2 [packed = true]; - * @param index The index of the element to return. - * @return The keys at the given index. - */ - public int getKeys(int index) { - return keys_.getInt(index); - } - private int keysMemoizedSerializedSize = -1; - - public static final int VALS_FIELD_NUMBER = 3; - private com.google.protobuf.Internal.IntList vals_; - /** - *
-     * String IDs.
-     * 
- * - * repeated uint32 vals = 3 [packed = true]; - * @return A list containing the vals. - */ - public java.util.List - getValsList() { - return vals_; - } - /** - *
-     * String IDs.
-     * 
- * - * repeated uint32 vals = 3 [packed = true]; - * @return The count of vals. - */ - public int getValsCount() { - return vals_.size(); - } - /** - *
-     * String IDs.
-     * 
- * - * repeated uint32 vals = 3 [packed = true]; - * @param index The index of the element to return. - * @return The vals at the given index. - */ - public int getVals(int index) { - return vals_.getInt(index); - } - private int valsMemoizedSerializedSize = -1; - - public static final int INFO_FIELD_NUMBER = 4; - private Info info_; - /** - *
-     * May be omitted in omitmeta
-     * 
- * - * optional .OSMPBF.Info info = 4; - * @return Whether the info field is set. - */ - public boolean hasInfo() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - *
-     * May be omitted in omitmeta
-     * 
- * - * optional .OSMPBF.Info info = 4; - * @return The info. - */ - public Info getInfo() { - return info_ == null ? Info.getDefaultInstance() : info_; - } - /** - *
-     * May be omitted in omitmeta
-     * 
- * - * optional .OSMPBF.Info info = 4; - */ - public InfoOrBuilder getInfoOrBuilder() { - return info_ == null ? Info.getDefaultInstance() : info_; - } - - public static final int LAT_FIELD_NUMBER = 8; - private long lat_; - /** - * required sint64 lat = 8; - * @return Whether the lat field is set. - */ - public boolean hasLat() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - * required sint64 lat = 8; - * @return The lat. - */ - public long getLat() { - return lat_; - } - - public static final int LON_FIELD_NUMBER = 9; - private long lon_; - /** - * required sint64 lon = 9; - * @return Whether the lon field is set. - */ - public boolean hasLon() { - return ((bitField0_ & 0x00000008) != 0); - } - /** - * required sint64 lon = 9; - * @return The lon. - */ - public long getLon() { - return lon_; - } - - private byte memoizedIsInitialized = -1; - @Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - if (!hasId()) { - memoizedIsInitialized = 0; - return false; - } - if (!hasLat()) { - memoizedIsInitialized = 0; - return false; - } - if (!hasLon()) { - memoizedIsInitialized = 0; - return false; - } - memoizedIsInitialized = 1; - return true; - } - - @Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (((bitField0_ & 0x00000001) != 0)) { - output.writeSInt64(1, id_); - } - if (getKeysList().size() > 0) { - output.writeUInt32NoTag(18); - output.writeUInt32NoTag(keysMemoizedSerializedSize); - } - for (int i = 0; i < keys_.size(); i++) { - output.writeUInt32NoTag(keys_.getInt(i)); - } - if (getValsList().size() > 0) { - output.writeUInt32NoTag(26); - output.writeUInt32NoTag(valsMemoizedSerializedSize); - } - for (int i = 0; i < vals_.size(); i++) { - output.writeUInt32NoTag(vals_.getInt(i)); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeMessage(4, getInfo()); - } - if (((bitField0_ & 0x00000004) != 0)) { - output.writeSInt64(8, lat_); - } - if (((bitField0_ & 0x00000008) != 0)) { - output.writeSInt64(9, lon_); - } - unknownFields.writeTo(output); - } - - @Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeSInt64Size(1, id_); - } - { - int dataSize = 0; - for (int i = 0; i < keys_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeUInt32SizeNoTag(keys_.getInt(i)); - } - size += dataSize; - if (!getKeysList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(dataSize); - } - keysMemoizedSerializedSize = dataSize; - } - { - int dataSize = 0; - for (int i = 0; i < vals_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeUInt32SizeNoTag(vals_.getInt(i)); - } - size += dataSize; - if (!getValsList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(dataSize); - } - valsMemoizedSerializedSize = dataSize; - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getInfo()); - } - if (((bitField0_ & 0x00000004) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeSInt64Size(8, lat_); - } - if (((bitField0_ & 0x00000008) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeSInt64Size(9, lon_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @Override - public boolean equals(final Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof Node)) { - return super.equals(obj); - } - Node other = (Node) obj; - - if (hasId() != other.hasId()) return false; - if (hasId()) { - if (getId() - != other.getId()) return false; - } - if (!getKeysList() - .equals(other.getKeysList())) return false; - if (!getValsList() - .equals(other.getValsList())) return false; - if (hasInfo() != other.hasInfo()) return false; - if (hasInfo()) { - if (!getInfo() - .equals(other.getInfo())) return false; - } - if (hasLat() != other.hasLat()) return false; - if (hasLat()) { - if (getLat() - != other.getLat()) return false; - } - if (hasLon() != other.hasLon()) return false; - if (hasLon()) { - if (getLon() - != other.getLon()) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasId()) { - hash = (37 * hash) + ID_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getId()); - } - if (getKeysCount() > 0) { - hash = (37 * hash) + KEYS_FIELD_NUMBER; - hash = (53 * hash) + getKeysList().hashCode(); - } - if (getValsCount() > 0) { - hash = (37 * hash) + VALS_FIELD_NUMBER; - hash = (53 * hash) + getValsList().hashCode(); - } - if (hasInfo()) { - hash = (37 * hash) + INFO_FIELD_NUMBER; - hash = (53 * hash) + getInfo().hashCode(); - } - if (hasLat()) { - hash = (37 * hash) + LAT_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getLat()); - } - if (hasLon()) { - hash = (37 * hash) + LON_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getLon()); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static Node parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static Node parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static Node parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static Node parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static Node parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static Node parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static Node parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static Node parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static Node parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static Node parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static Node parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static Node parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(Node prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @Override - protected Builder newBuilderForType( - BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code OSMPBF.Node} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:OSMPBF.Node) - NodeOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return internal_static_OSMPBF_Node_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return internal_static_OSMPBF_Node_fieldAccessorTable - .ensureFieldAccessorsInitialized( - Node.class, Node.Builder.class); - } - - // Construct using Node.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getInfoFieldBuilder(); - } - } - @Override - public Builder clear() { - super.clear(); - id_ = 0L; - bitField0_ = (bitField0_ & ~0x00000001); - keys_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000002); - vals_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000004); - if (infoBuilder_ == null) { - info_ = null; - } else { - infoBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000008); - lat_ = 0L; - bitField0_ = (bitField0_ & ~0x00000010); - lon_ = 0L; - bitField0_ = (bitField0_ & ~0x00000020); - return this; - } - - @Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return internal_static_OSMPBF_Node_descriptor; - } - - @Override - public Node getDefaultInstanceForType() { - return Node.getDefaultInstance(); - } - - @Override - public Node build() { - Node result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @Override - public Node buildPartial() { - Node result = new Node(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.id_ = id_; - to_bitField0_ |= 0x00000001; - } - if (((bitField0_ & 0x00000002) != 0)) { - keys_.makeImmutable(); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.keys_ = keys_; - if (((bitField0_ & 0x00000004) != 0)) { - vals_.makeImmutable(); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.vals_ = vals_; - if (((from_bitField0_ & 0x00000008) != 0)) { - if (infoBuilder_ == null) { - result.info_ = info_; - } else { - result.info_ = infoBuilder_.build(); - } - to_bitField0_ |= 0x00000002; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.lat_ = lat_; - to_bitField0_ |= 0x00000004; - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.lon_ = lon_; - to_bitField0_ |= 0x00000008; - } - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - @Override - public Builder clone() { - return super.clone(); - } - @Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.setField(field, value); - } - @Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, Object value) { - return super.setRepeatedField(field, index, value); - } - @Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.addRepeatedField(field, value); - } - @Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof Node) { - return mergeFrom((Node)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(Node other) { - if (other == Node.getDefaultInstance()) return this; - if (other.hasId()) { - setId(other.getId()); - } - if (!other.keys_.isEmpty()) { - if (keys_.isEmpty()) { - keys_ = other.keys_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureKeysIsMutable(); - keys_.addAll(other.keys_); - } - onChanged(); - } - if (!other.vals_.isEmpty()) { - if (vals_.isEmpty()) { - vals_ = other.vals_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureValsIsMutable(); - vals_.addAll(other.vals_); - } - onChanged(); - } - if (other.hasInfo()) { - mergeInfo(other.getInfo()); - } - if (other.hasLat()) { - setLat(other.getLat()); - } - if (other.hasLon()) { - setLon(other.getLon()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @Override - public final boolean isInitialized() { - if (!hasId()) { - return false; - } - if (!hasLat()) { - return false; - } - if (!hasLon()) { - return false; - } - return true; - } - - @Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - Node parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (Node) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private long id_ ; - /** - * required sint64 id = 1; - * @return Whether the id field is set. - */ - public boolean hasId() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * required sint64 id = 1; - * @return The id. - */ - public long getId() { - return id_; - } - /** - * required sint64 id = 1; - * @param value The id to set. - * @return This builder for chaining. - */ - public Builder setId(long value) { - bitField0_ |= 0x00000001; - id_ = value; - onChanged(); - return this; - } - /** - * required sint64 id = 1; - * @return This builder for chaining. - */ - public Builder clearId() { - bitField0_ = (bitField0_ & ~0x00000001); - id_ = 0L; - onChanged(); - return this; - } - - private com.google.protobuf.Internal.IntList keys_ = emptyIntList(); - private void ensureKeysIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - keys_ = mutableCopy(keys_); - bitField0_ |= 0x00000002; - } - } - /** - *
-       * Parallel arrays.
-       * 
- * - * repeated uint32 keys = 2 [packed = true]; - * @return A list containing the keys. - */ - public java.util.List - getKeysList() { - return ((bitField0_ & 0x00000002) != 0) ? - java.util.Collections.unmodifiableList(keys_) : keys_; - } - /** - *
-       * Parallel arrays.
-       * 
- * - * repeated uint32 keys = 2 [packed = true]; - * @return The count of keys. - */ - public int getKeysCount() { - return keys_.size(); - } - /** - *
-       * Parallel arrays.
-       * 
- * - * repeated uint32 keys = 2 [packed = true]; - * @param index The index of the element to return. - * @return The keys at the given index. - */ - public int getKeys(int index) { - return keys_.getInt(index); - } - /** - *
-       * Parallel arrays.
-       * 
- * - * repeated uint32 keys = 2 [packed = true]; - * @param index The index to set the value at. - * @param value The keys to set. - * @return This builder for chaining. - */ - public Builder setKeys( - int index, int value) { - ensureKeysIsMutable(); - keys_.setInt(index, value); - onChanged(); - return this; - } - /** - *
-       * Parallel arrays.
-       * 
- * - * repeated uint32 keys = 2 [packed = true]; - * @param value The keys to add. - * @return This builder for chaining. - */ - public Builder addKeys(int value) { - ensureKeysIsMutable(); - keys_.addInt(value); - onChanged(); - return this; - } - /** - *
-       * Parallel arrays.
-       * 
- * - * repeated uint32 keys = 2 [packed = true]; - * @param values The keys to add. - * @return This builder for chaining. - */ - public Builder addAllKeys( - Iterable values) { - ensureKeysIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, keys_); - onChanged(); - return this; - } - /** - *
-       * Parallel arrays.
-       * 
- * - * repeated uint32 keys = 2 [packed = true]; - * @return This builder for chaining. - */ - public Builder clearKeys() { - keys_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - - private com.google.protobuf.Internal.IntList vals_ = emptyIntList(); - private void ensureValsIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - vals_ = mutableCopy(vals_); - bitField0_ |= 0x00000004; - } - } - /** - *
-       * String IDs.
-       * 
- * - * repeated uint32 vals = 3 [packed = true]; - * @return A list containing the vals. - */ - public java.util.List - getValsList() { - return ((bitField0_ & 0x00000004) != 0) ? - java.util.Collections.unmodifiableList(vals_) : vals_; - } - /** - *
-       * String IDs.
-       * 
- * - * repeated uint32 vals = 3 [packed = true]; - * @return The count of vals. - */ - public int getValsCount() { - return vals_.size(); - } - /** - *
-       * String IDs.
-       * 
- * - * repeated uint32 vals = 3 [packed = true]; - * @param index The index of the element to return. - * @return The vals at the given index. - */ - public int getVals(int index) { - return vals_.getInt(index); - } - /** - *
-       * String IDs.
-       * 
- * - * repeated uint32 vals = 3 [packed = true]; - * @param index The index to set the value at. - * @param value The vals to set. - * @return This builder for chaining. - */ - public Builder setVals( - int index, int value) { - ensureValsIsMutable(); - vals_.setInt(index, value); - onChanged(); - return this; - } - /** - *
-       * String IDs.
-       * 
- * - * repeated uint32 vals = 3 [packed = true]; - * @param value The vals to add. - * @return This builder for chaining. - */ - public Builder addVals(int value) { - ensureValsIsMutable(); - vals_.addInt(value); - onChanged(); - return this; - } - /** - *
-       * String IDs.
-       * 
- * - * repeated uint32 vals = 3 [packed = true]; - * @param values The vals to add. - * @return This builder for chaining. - */ - public Builder addAllVals( - Iterable values) { - ensureValsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, vals_); - onChanged(); - return this; - } - /** - *
-       * String IDs.
-       * 
- * - * repeated uint32 vals = 3 [packed = true]; - * @return This builder for chaining. - */ - public Builder clearVals() { - vals_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - - private Info info_; - private com.google.protobuf.SingleFieldBuilderV3< - Info, Info.Builder, InfoOrBuilder> infoBuilder_; - /** - *
-       * May be omitted in omitmeta
-       * 
- * - * optional .OSMPBF.Info info = 4; - * @return Whether the info field is set. - */ - public boolean hasInfo() { - return ((bitField0_ & 0x00000008) != 0); - } - /** - *
-       * May be omitted in omitmeta
-       * 
- * - * optional .OSMPBF.Info info = 4; - * @return The info. - */ - public Info getInfo() { - if (infoBuilder_ == null) { - return info_ == null ? Info.getDefaultInstance() : info_; - } else { - return infoBuilder_.getMessage(); - } - } - /** - *
-       * May be omitted in omitmeta
-       * 
- * - * optional .OSMPBF.Info info = 4; - */ - public Builder setInfo(Info value) { - if (infoBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - info_ = value; - onChanged(); - } else { - infoBuilder_.setMessage(value); - } - bitField0_ |= 0x00000008; - return this; - } - /** - *
-       * May be omitted in omitmeta
-       * 
- * - * optional .OSMPBF.Info info = 4; - */ - public Builder setInfo( - Info.Builder builderForValue) { - if (infoBuilder_ == null) { - info_ = builderForValue.build(); - onChanged(); - } else { - infoBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000008; - return this; - } - /** - *
-       * May be omitted in omitmeta
-       * 
- * - * optional .OSMPBF.Info info = 4; - */ - public Builder mergeInfo(Info value) { - if (infoBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0) && - info_ != null && - info_ != Info.getDefaultInstance()) { - info_ = - Info.newBuilder(info_).mergeFrom(value).buildPartial(); - } else { - info_ = value; - } - onChanged(); - } else { - infoBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000008; - return this; - } - /** - *
-       * May be omitted in omitmeta
-       * 
- * - * optional .OSMPBF.Info info = 4; - */ - public Builder clearInfo() { - if (infoBuilder_ == null) { - info_ = null; - onChanged(); - } else { - infoBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000008); - return this; - } - /** - *
-       * May be omitted in omitmeta
-       * 
- * - * optional .OSMPBF.Info info = 4; - */ - public Info.Builder getInfoBuilder() { - bitField0_ |= 0x00000008; - onChanged(); - return getInfoFieldBuilder().getBuilder(); - } - /** - *
-       * May be omitted in omitmeta
-       * 
- * - * optional .OSMPBF.Info info = 4; - */ - public InfoOrBuilder getInfoOrBuilder() { - if (infoBuilder_ != null) { - return infoBuilder_.getMessageOrBuilder(); - } else { - return info_ == null ? - Info.getDefaultInstance() : info_; - } - } - /** - *
-       * May be omitted in omitmeta
-       * 
- * - * optional .OSMPBF.Info info = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - Info, Info.Builder, InfoOrBuilder> - getInfoFieldBuilder() { - if (infoBuilder_ == null) { - infoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - Info, Info.Builder, InfoOrBuilder>( - getInfo(), - getParentForChildren(), - isClean()); - info_ = null; - } - return infoBuilder_; - } - - private long lat_ ; - /** - * required sint64 lat = 8; - * @return Whether the lat field is set. - */ - public boolean hasLat() { - return ((bitField0_ & 0x00000010) != 0); - } - /** - * required sint64 lat = 8; - * @return The lat. - */ - public long getLat() { - return lat_; - } - /** - * required sint64 lat = 8; - * @param value The lat to set. - * @return This builder for chaining. - */ - public Builder setLat(long value) { - bitField0_ |= 0x00000010; - lat_ = value; - onChanged(); - return this; - } - /** - * required sint64 lat = 8; - * @return This builder for chaining. - */ - public Builder clearLat() { - bitField0_ = (bitField0_ & ~0x00000010); - lat_ = 0L; - onChanged(); - return this; - } - - private long lon_ ; - /** - * required sint64 lon = 9; - * @return Whether the lon field is set. - */ - public boolean hasLon() { - return ((bitField0_ & 0x00000020) != 0); - } - /** - * required sint64 lon = 9; - * @return The lon. - */ - public long getLon() { - return lon_; - } - /** - * required sint64 lon = 9; - * @param value The lon to set. - * @return This builder for chaining. - */ - public Builder setLon(long value) { - bitField0_ |= 0x00000020; - lon_ = value; - onChanged(); - return this; - } - /** - * required sint64 lon = 9; - * @return This builder for chaining. - */ - public Builder clearLon() { - bitField0_ = (bitField0_ & ~0x00000020); - lon_ = 0L; - onChanged(); - return this; - } - @Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:OSMPBF.Node) - } - - // @@protoc_insertion_point(class_scope:OSMPBF.Node) - private static final Node DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new Node(); - } - - public static Node getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - @Deprecated public static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @Override - public Node parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Node(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @Override - public Node getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface DenseNodesOrBuilder extends - // @@protoc_insertion_point(interface_extends:OSMPBF.DenseNodes) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * DELTA coded
-     * 
- * - * repeated sint64 id = 1 [packed = true]; - * @return A list containing the id. - */ - java.util.List getIdList(); - /** - *
-     * DELTA coded
-     * 
- * - * repeated sint64 id = 1 [packed = true]; - * @return The count of id. - */ - int getIdCount(); - /** - *
-     * DELTA coded
-     * 
- * - * repeated sint64 id = 1 [packed = true]; - * @param index The index of the element to return. - * @return The id at the given index. - */ - long getId(int index); - - /** - *
-     *repeated Info info = 4;
-     * 
- * - * optional .OSMPBF.DenseInfo denseinfo = 5; - * @return Whether the denseinfo field is set. - */ - boolean hasDenseinfo(); - /** - *
-     *repeated Info info = 4;
-     * 
- * - * optional .OSMPBF.DenseInfo denseinfo = 5; - * @return The denseinfo. - */ - DenseInfo getDenseinfo(); - /** - *
-     *repeated Info info = 4;
-     * 
- * - * optional .OSMPBF.DenseInfo denseinfo = 5; - */ - DenseInfoOrBuilder getDenseinfoOrBuilder(); - - /** - *
-     * DELTA coded
-     * 
- * - * repeated sint64 lat = 8 [packed = true]; - * @return A list containing the lat. - */ - java.util.List getLatList(); - /** - *
-     * DELTA coded
-     * 
- * - * repeated sint64 lat = 8 [packed = true]; - * @return The count of lat. - */ - int getLatCount(); - /** - *
-     * DELTA coded
-     * 
- * - * repeated sint64 lat = 8 [packed = true]; - * @param index The index of the element to return. - * @return The lat at the given index. - */ - long getLat(int index); - - /** - *
-     * DELTA coded
-     * 
- * - * repeated sint64 lon = 9 [packed = true]; - * @return A list containing the lon. - */ - java.util.List getLonList(); - /** - *
-     * DELTA coded
-     * 
- * - * repeated sint64 lon = 9 [packed = true]; - * @return The count of lon. - */ - int getLonCount(); - /** - *
-     * DELTA coded
-     * 
- * - * repeated sint64 lon = 9 [packed = true]; - * @param index The index of the element to return. - * @return The lon at the given index. - */ - long getLon(int index); - - /** - *
-     * Special packing of keys and vals into one array. May be empty if all nodes in this block are tagless.
-     * 
- * - * repeated int32 keys_vals = 10 [packed = true]; - * @return A list containing the keysVals. - */ - java.util.List getKeysValsList(); - /** - *
-     * Special packing of keys and vals into one array. May be empty if all nodes in this block are tagless.
-     * 
- * - * repeated int32 keys_vals = 10 [packed = true]; - * @return The count of keysVals. - */ - int getKeysValsCount(); - /** - *
-     * Special packing of keys and vals into one array. May be empty if all nodes in this block are tagless.
-     * 
- * - * repeated int32 keys_vals = 10 [packed = true]; - * @param index The index of the element to return. - * @return The keysVals at the given index. - */ - int getKeysVals(int index); - } - /** - * Protobuf type {@code OSMPBF.DenseNodes} - */ - public static final class DenseNodes extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:OSMPBF.DenseNodes) - DenseNodesOrBuilder { - private static final long serialVersionUID = 0L; - // Use DenseNodes.newBuilder() to construct. - private DenseNodes(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DenseNodes() { - id_ = emptyLongList(); - lat_ = emptyLongList(); - lon_ = emptyLongList(); - keysVals_ = emptyIntList(); - } - - @Override - @SuppressWarnings({"unused"}) - protected Object newInstance( - UnusedPrivateParameter unused) { - return new DenseNodes(); - } - - @Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private DenseNodes( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - id_ = newLongList(); - mutable_bitField0_ |= 0x00000001; - } - id_.addLong(input.readSInt64()); - break; - } - case 10: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) { - id_ = newLongList(); - mutable_bitField0_ |= 0x00000001; - } - while (input.getBytesUntilLimit() > 0) { - id_.addLong(input.readSInt64()); - } - input.popLimit(limit); - break; - } - case 42: { - DenseInfo.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = denseinfo_.toBuilder(); - } - denseinfo_ = input.readMessage(DenseInfo.PARSER, extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(denseinfo_); - denseinfo_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - break; - } - case 64: { - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - lat_ = newLongList(); - mutable_bitField0_ |= 0x00000004; - } - lat_.addLong(input.readSInt64()); - break; - } - case 66: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000004) != 0) && input.getBytesUntilLimit() > 0) { - lat_ = newLongList(); - mutable_bitField0_ |= 0x00000004; - } - while (input.getBytesUntilLimit() > 0) { - lat_.addLong(input.readSInt64()); - } - input.popLimit(limit); - break; - } - case 72: { - if (!((mutable_bitField0_ & 0x00000008) != 0)) { - lon_ = newLongList(); - mutable_bitField0_ |= 0x00000008; - } - lon_.addLong(input.readSInt64()); - break; - } - case 74: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000008) != 0) && input.getBytesUntilLimit() > 0) { - lon_ = newLongList(); - mutable_bitField0_ |= 0x00000008; - } - while (input.getBytesUntilLimit() > 0) { - lon_.addLong(input.readSInt64()); - } - input.popLimit(limit); - break; - } - case 80: { - if (!((mutable_bitField0_ & 0x00000010) != 0)) { - keysVals_ = newIntList(); - mutable_bitField0_ |= 0x00000010; - } - keysVals_.addInt(input.readInt32()); - break; - } - case 82: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000010) != 0) && input.getBytesUntilLimit() > 0) { - keysVals_ = newIntList(); - mutable_bitField0_ |= 0x00000010; - } - while (input.getBytesUntilLimit() > 0) { - keysVals_.addInt(input.readInt32()); - } - input.popLimit(limit); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - id_.makeImmutable(); // C - } - if (((mutable_bitField0_ & 0x00000004) != 0)) { - lat_.makeImmutable(); // C - } - if (((mutable_bitField0_ & 0x00000008) != 0)) { - lon_.makeImmutable(); // C - } - if (((mutable_bitField0_ & 0x00000010) != 0)) { - keysVals_.makeImmutable(); // C - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return internal_static_OSMPBF_DenseNodes_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return internal_static_OSMPBF_DenseNodes_fieldAccessorTable - .ensureFieldAccessorsInitialized( - DenseNodes.class, DenseNodes.Builder.class); - } - - private int bitField0_; - public static final int ID_FIELD_NUMBER = 1; - private com.google.protobuf.Internal.LongList id_; - /** - *
-     * DELTA coded
-     * 
- * - * repeated sint64 id = 1 [packed = true]; - * @return A list containing the id. - */ - public java.util.List - getIdList() { - return id_; - } - /** - *
-     * DELTA coded
-     * 
- * - * repeated sint64 id = 1 [packed = true]; - * @return The count of id. - */ - public int getIdCount() { - return id_.size(); - } - /** - *
-     * DELTA coded
-     * 
- * - * repeated sint64 id = 1 [packed = true]; - * @param index The index of the element to return. - * @return The id at the given index. - */ - public long getId(int index) { - return id_.getLong(index); - } - private int idMemoizedSerializedSize = -1; - - public static final int DENSEINFO_FIELD_NUMBER = 5; - private DenseInfo denseinfo_; - /** - *
-     *repeated Info info = 4;
-     * 
- * - * optional .OSMPBF.DenseInfo denseinfo = 5; - * @return Whether the denseinfo field is set. - */ - public boolean hasDenseinfo() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-     *repeated Info info = 4;
-     * 
- * - * optional .OSMPBF.DenseInfo denseinfo = 5; - * @return The denseinfo. - */ - public DenseInfo getDenseinfo() { - return denseinfo_ == null ? DenseInfo.getDefaultInstance() : denseinfo_; - } - /** - *
-     *repeated Info info = 4;
-     * 
- * - * optional .OSMPBF.DenseInfo denseinfo = 5; - */ - public DenseInfoOrBuilder getDenseinfoOrBuilder() { - return denseinfo_ == null ? DenseInfo.getDefaultInstance() : denseinfo_; - } - - public static final int LAT_FIELD_NUMBER = 8; - private com.google.protobuf.Internal.LongList lat_; - /** - *
-     * DELTA coded
-     * 
- * - * repeated sint64 lat = 8 [packed = true]; - * @return A list containing the lat. - */ - public java.util.List - getLatList() { - return lat_; - } - /** - *
-     * DELTA coded
-     * 
- * - * repeated sint64 lat = 8 [packed = true]; - * @return The count of lat. - */ - public int getLatCount() { - return lat_.size(); - } - /** - *
-     * DELTA coded
-     * 
- * - * repeated sint64 lat = 8 [packed = true]; - * @param index The index of the element to return. - * @return The lat at the given index. - */ - public long getLat(int index) { - return lat_.getLong(index); - } - private int latMemoizedSerializedSize = -1; - - public static final int LON_FIELD_NUMBER = 9; - private com.google.protobuf.Internal.LongList lon_; - /** - *
-     * DELTA coded
-     * 
- * - * repeated sint64 lon = 9 [packed = true]; - * @return A list containing the lon. - */ - public java.util.List - getLonList() { - return lon_; - } - /** - *
-     * DELTA coded
-     * 
- * - * repeated sint64 lon = 9 [packed = true]; - * @return The count of lon. - */ - public int getLonCount() { - return lon_.size(); - } - /** - *
-     * DELTA coded
-     * 
- * - * repeated sint64 lon = 9 [packed = true]; - * @param index The index of the element to return. - * @return The lon at the given index. - */ - public long getLon(int index) { - return lon_.getLong(index); - } - private int lonMemoizedSerializedSize = -1; - - public static final int KEYS_VALS_FIELD_NUMBER = 10; - private com.google.protobuf.Internal.IntList keysVals_; - /** - *
-     * Special packing of keys and vals into one array. May be empty if all nodes in this block are tagless.
-     * 
- * - * repeated int32 keys_vals = 10 [packed = true]; - * @return A list containing the keysVals. - */ - public java.util.List - getKeysValsList() { - return keysVals_; - } - /** - *
-     * Special packing of keys and vals into one array. May be empty if all nodes in this block are tagless.
-     * 
- * - * repeated int32 keys_vals = 10 [packed = true]; - * @return The count of keysVals. - */ - public int getKeysValsCount() { - return keysVals_.size(); - } - /** - *
-     * Special packing of keys and vals into one array. May be empty if all nodes in this block are tagless.
-     * 
- * - * repeated int32 keys_vals = 10 [packed = true]; - * @param index The index of the element to return. - * @return The keysVals at the given index. - */ - public int getKeysVals(int index) { - return keysVals_.getInt(index); - } - private int keysValsMemoizedSerializedSize = -1; - - private byte memoizedIsInitialized = -1; - @Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (getIdList().size() > 0) { - output.writeUInt32NoTag(10); - output.writeUInt32NoTag(idMemoizedSerializedSize); - } - for (int i = 0; i < id_.size(); i++) { - output.writeSInt64NoTag(id_.getLong(i)); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(5, getDenseinfo()); - } - if (getLatList().size() > 0) { - output.writeUInt32NoTag(66); - output.writeUInt32NoTag(latMemoizedSerializedSize); - } - for (int i = 0; i < lat_.size(); i++) { - output.writeSInt64NoTag(lat_.getLong(i)); - } - if (getLonList().size() > 0) { - output.writeUInt32NoTag(74); - output.writeUInt32NoTag(lonMemoizedSerializedSize); - } - for (int i = 0; i < lon_.size(); i++) { - output.writeSInt64NoTag(lon_.getLong(i)); - } - if (getKeysValsList().size() > 0) { - output.writeUInt32NoTag(82); - output.writeUInt32NoTag(keysValsMemoizedSerializedSize); - } - for (int i = 0; i < keysVals_.size(); i++) { - output.writeInt32NoTag(keysVals_.getInt(i)); - } - unknownFields.writeTo(output); - } - - @Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - for (int i = 0; i < id_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeSInt64SizeNoTag(id_.getLong(i)); - } - size += dataSize; - if (!getIdList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(dataSize); - } - idMemoizedSerializedSize = dataSize; - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, getDenseinfo()); - } - { - int dataSize = 0; - for (int i = 0; i < lat_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeSInt64SizeNoTag(lat_.getLong(i)); - } - size += dataSize; - if (!getLatList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(dataSize); - } - latMemoizedSerializedSize = dataSize; - } - { - int dataSize = 0; - for (int i = 0; i < lon_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeSInt64SizeNoTag(lon_.getLong(i)); - } - size += dataSize; - if (!getLonList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(dataSize); - } - lonMemoizedSerializedSize = dataSize; - } - { - int dataSize = 0; - for (int i = 0; i < keysVals_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(keysVals_.getInt(i)); - } - size += dataSize; - if (!getKeysValsList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(dataSize); - } - keysValsMemoizedSerializedSize = dataSize; - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @Override - public boolean equals(final Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof DenseNodes)) { - return super.equals(obj); - } - DenseNodes other = (DenseNodes) obj; - - if (!getIdList() - .equals(other.getIdList())) return false; - if (hasDenseinfo() != other.hasDenseinfo()) return false; - if (hasDenseinfo()) { - if (!getDenseinfo() - .equals(other.getDenseinfo())) return false; - } - if (!getLatList() - .equals(other.getLatList())) return false; - if (!getLonList() - .equals(other.getLonList())) return false; - if (!getKeysValsList() - .equals(other.getKeysValsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getIdCount() > 0) { - hash = (37 * hash) + ID_FIELD_NUMBER; - hash = (53 * hash) + getIdList().hashCode(); - } - if (hasDenseinfo()) { - hash = (37 * hash) + DENSEINFO_FIELD_NUMBER; - hash = (53 * hash) + getDenseinfo().hashCode(); - } - if (getLatCount() > 0) { - hash = (37 * hash) + LAT_FIELD_NUMBER; - hash = (53 * hash) + getLatList().hashCode(); - } - if (getLonCount() > 0) { - hash = (37 * hash) + LON_FIELD_NUMBER; - hash = (53 * hash) + getLonList().hashCode(); - } - if (getKeysValsCount() > 0) { - hash = (37 * hash) + KEYS_VALS_FIELD_NUMBER; - hash = (53 * hash) + getKeysValsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static DenseNodes parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static DenseNodes parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static DenseNodes parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static DenseNodes parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static DenseNodes parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static DenseNodes parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static DenseNodes parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static DenseNodes parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static DenseNodes parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static DenseNodes parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static DenseNodes parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static DenseNodes parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(DenseNodes prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @Override - protected Builder newBuilderForType( - BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code OSMPBF.DenseNodes} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:OSMPBF.DenseNodes) - DenseNodesOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return internal_static_OSMPBF_DenseNodes_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return internal_static_OSMPBF_DenseNodes_fieldAccessorTable - .ensureFieldAccessorsInitialized( - DenseNodes.class, DenseNodes.Builder.class); - } - - // Construct using DenseNodes.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getDenseinfoFieldBuilder(); - } - } - @Override - public Builder clear() { - super.clear(); - id_ = emptyLongList(); - bitField0_ = (bitField0_ & ~0x00000001); - if (denseinfoBuilder_ == null) { - denseinfo_ = null; - } else { - denseinfoBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000002); - lat_ = emptyLongList(); - bitField0_ = (bitField0_ & ~0x00000004); - lon_ = emptyLongList(); - bitField0_ = (bitField0_ & ~0x00000008); - keysVals_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000010); - return this; - } - - @Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return internal_static_OSMPBF_DenseNodes_descriptor; - } - - @Override - public DenseNodes getDefaultInstanceForType() { - return DenseNodes.getDefaultInstance(); - } - - @Override - public DenseNodes build() { - DenseNodes result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @Override - public DenseNodes buildPartial() { - DenseNodes result = new DenseNodes(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((bitField0_ & 0x00000001) != 0)) { - id_.makeImmutable(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.id_ = id_; - if (((from_bitField0_ & 0x00000002) != 0)) { - if (denseinfoBuilder_ == null) { - result.denseinfo_ = denseinfo_; - } else { - result.denseinfo_ = denseinfoBuilder_.build(); - } - to_bitField0_ |= 0x00000001; - } - if (((bitField0_ & 0x00000004) != 0)) { - lat_.makeImmutable(); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.lat_ = lat_; - if (((bitField0_ & 0x00000008) != 0)) { - lon_.makeImmutable(); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.lon_ = lon_; - if (((bitField0_ & 0x00000010) != 0)) { - keysVals_.makeImmutable(); - bitField0_ = (bitField0_ & ~0x00000010); - } - result.keysVals_ = keysVals_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - @Override - public Builder clone() { - return super.clone(); - } - @Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.setField(field, value); - } - @Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, Object value) { - return super.setRepeatedField(field, index, value); - } - @Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.addRepeatedField(field, value); - } - @Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof DenseNodes) { - return mergeFrom((DenseNodes)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(DenseNodes other) { - if (other == DenseNodes.getDefaultInstance()) return this; - if (!other.id_.isEmpty()) { - if (id_.isEmpty()) { - id_ = other.id_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureIdIsMutable(); - id_.addAll(other.id_); - } - onChanged(); - } - if (other.hasDenseinfo()) { - mergeDenseinfo(other.getDenseinfo()); - } - if (!other.lat_.isEmpty()) { - if (lat_.isEmpty()) { - lat_ = other.lat_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureLatIsMutable(); - lat_.addAll(other.lat_); - } - onChanged(); - } - if (!other.lon_.isEmpty()) { - if (lon_.isEmpty()) { - lon_ = other.lon_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensureLonIsMutable(); - lon_.addAll(other.lon_); - } - onChanged(); - } - if (!other.keysVals_.isEmpty()) { - if (keysVals_.isEmpty()) { - keysVals_ = other.keysVals_; - bitField0_ = (bitField0_ & ~0x00000010); - } else { - ensureKeysValsIsMutable(); - keysVals_.addAll(other.keysVals_); - } - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @Override - public final boolean isInitialized() { - return true; - } - - @Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - DenseNodes parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (DenseNodes) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.protobuf.Internal.LongList id_ = emptyLongList(); - private void ensureIdIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - id_ = mutableCopy(id_); - bitField0_ |= 0x00000001; - } - } - /** - *
-       * DELTA coded
-       * 
- * - * repeated sint64 id = 1 [packed = true]; - * @return A list containing the id. - */ - public java.util.List - getIdList() { - return ((bitField0_ & 0x00000001) != 0) ? - java.util.Collections.unmodifiableList(id_) : id_; - } - /** - *
-       * DELTA coded
-       * 
- * - * repeated sint64 id = 1 [packed = true]; - * @return The count of id. - */ - public int getIdCount() { - return id_.size(); - } - /** - *
-       * DELTA coded
-       * 
- * - * repeated sint64 id = 1 [packed = true]; - * @param index The index of the element to return. - * @return The id at the given index. - */ - public long getId(int index) { - return id_.getLong(index); - } - /** - *
-       * DELTA coded
-       * 
- * - * repeated sint64 id = 1 [packed = true]; - * @param index The index to set the value at. - * @param value The id to set. - * @return This builder for chaining. - */ - public Builder setId( - int index, long value) { - ensureIdIsMutable(); - id_.setLong(index, value); - onChanged(); - return this; - } - /** - *
-       * DELTA coded
-       * 
- * - * repeated sint64 id = 1 [packed = true]; - * @param value The id to add. - * @return This builder for chaining. - */ - public Builder addId(long value) { - ensureIdIsMutable(); - id_.addLong(value); - onChanged(); - return this; - } - /** - *
-       * DELTA coded
-       * 
- * - * repeated sint64 id = 1 [packed = true]; - * @param values The id to add. - * @return This builder for chaining. - */ - public Builder addAllId( - Iterable values) { - ensureIdIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, id_); - onChanged(); - return this; - } - /** - *
-       * DELTA coded
-       * 
- * - * repeated sint64 id = 1 [packed = true]; - * @return This builder for chaining. - */ - public Builder clearId() { - id_ = emptyLongList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - private DenseInfo denseinfo_; - private com.google.protobuf.SingleFieldBuilderV3< - DenseInfo, DenseInfo.Builder, DenseInfoOrBuilder> denseinfoBuilder_; - /** - *
-       *repeated Info info = 4;
-       * 
- * - * optional .OSMPBF.DenseInfo denseinfo = 5; - * @return Whether the denseinfo field is set. - */ - public boolean hasDenseinfo() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - *
-       *repeated Info info = 4;
-       * 
- * - * optional .OSMPBF.DenseInfo denseinfo = 5; - * @return The denseinfo. - */ - public DenseInfo getDenseinfo() { - if (denseinfoBuilder_ == null) { - return denseinfo_ == null ? DenseInfo.getDefaultInstance() : denseinfo_; - } else { - return denseinfoBuilder_.getMessage(); - } - } - /** - *
-       *repeated Info info = 4;
-       * 
- * - * optional .OSMPBF.DenseInfo denseinfo = 5; - */ - public Builder setDenseinfo(DenseInfo value) { - if (denseinfoBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - denseinfo_ = value; - onChanged(); - } else { - denseinfoBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - return this; - } - /** - *
-       *repeated Info info = 4;
-       * 
- * - * optional .OSMPBF.DenseInfo denseinfo = 5; - */ - public Builder setDenseinfo( - DenseInfo.Builder builderForValue) { - if (denseinfoBuilder_ == null) { - denseinfo_ = builderForValue.build(); - onChanged(); - } else { - denseinfoBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - return this; - } - /** - *
-       *repeated Info info = 4;
-       * 
- * - * optional .OSMPBF.DenseInfo denseinfo = 5; - */ - public Builder mergeDenseinfo(DenseInfo value) { - if (denseinfoBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) && - denseinfo_ != null && - denseinfo_ != DenseInfo.getDefaultInstance()) { - denseinfo_ = - DenseInfo.newBuilder(denseinfo_).mergeFrom(value).buildPartial(); - } else { - denseinfo_ = value; - } - onChanged(); - } else { - denseinfoBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000002; - return this; - } - /** - *
-       *repeated Info info = 4;
-       * 
- * - * optional .OSMPBF.DenseInfo denseinfo = 5; - */ - public Builder clearDenseinfo() { - if (denseinfoBuilder_ == null) { - denseinfo_ = null; - onChanged(); - } else { - denseinfoBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - /** - *
-       *repeated Info info = 4;
-       * 
- * - * optional .OSMPBF.DenseInfo denseinfo = 5; - */ - public DenseInfo.Builder getDenseinfoBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getDenseinfoFieldBuilder().getBuilder(); - } - /** - *
-       *repeated Info info = 4;
-       * 
- * - * optional .OSMPBF.DenseInfo denseinfo = 5; - */ - public DenseInfoOrBuilder getDenseinfoOrBuilder() { - if (denseinfoBuilder_ != null) { - return denseinfoBuilder_.getMessageOrBuilder(); - } else { - return denseinfo_ == null ? - DenseInfo.getDefaultInstance() : denseinfo_; - } - } - /** - *
-       *repeated Info info = 4;
-       * 
- * - * optional .OSMPBF.DenseInfo denseinfo = 5; - */ - private com.google.protobuf.SingleFieldBuilderV3< - DenseInfo, DenseInfo.Builder, DenseInfoOrBuilder> - getDenseinfoFieldBuilder() { - if (denseinfoBuilder_ == null) { - denseinfoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - DenseInfo, DenseInfo.Builder, DenseInfoOrBuilder>( - getDenseinfo(), - getParentForChildren(), - isClean()); - denseinfo_ = null; - } - return denseinfoBuilder_; - } - - private com.google.protobuf.Internal.LongList lat_ = emptyLongList(); - private void ensureLatIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - lat_ = mutableCopy(lat_); - bitField0_ |= 0x00000004; - } - } - /** - *
-       * DELTA coded
-       * 
- * - * repeated sint64 lat = 8 [packed = true]; - * @return A list containing the lat. - */ - public java.util.List - getLatList() { - return ((bitField0_ & 0x00000004) != 0) ? - java.util.Collections.unmodifiableList(lat_) : lat_; - } - /** - *
-       * DELTA coded
-       * 
- * - * repeated sint64 lat = 8 [packed = true]; - * @return The count of lat. - */ - public int getLatCount() { - return lat_.size(); - } - /** - *
-       * DELTA coded
-       * 
- * - * repeated sint64 lat = 8 [packed = true]; - * @param index The index of the element to return. - * @return The lat at the given index. - */ - public long getLat(int index) { - return lat_.getLong(index); - } - /** - *
-       * DELTA coded
-       * 
- * - * repeated sint64 lat = 8 [packed = true]; - * @param index The index to set the value at. - * @param value The lat to set. - * @return This builder for chaining. - */ - public Builder setLat( - int index, long value) { - ensureLatIsMutable(); - lat_.setLong(index, value); - onChanged(); - return this; - } - /** - *
-       * DELTA coded
-       * 
- * - * repeated sint64 lat = 8 [packed = true]; - * @param value The lat to add. - * @return This builder for chaining. - */ - public Builder addLat(long value) { - ensureLatIsMutable(); - lat_.addLong(value); - onChanged(); - return this; - } - /** - *
-       * DELTA coded
-       * 
- * - * repeated sint64 lat = 8 [packed = true]; - * @param values The lat to add. - * @return This builder for chaining. - */ - public Builder addAllLat( - Iterable values) { - ensureLatIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, lat_); - onChanged(); - return this; - } - /** - *
-       * DELTA coded
-       * 
- * - * repeated sint64 lat = 8 [packed = true]; - * @return This builder for chaining. - */ - public Builder clearLat() { - lat_ = emptyLongList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - - private com.google.protobuf.Internal.LongList lon_ = emptyLongList(); - private void ensureLonIsMutable() { - if (!((bitField0_ & 0x00000008) != 0)) { - lon_ = mutableCopy(lon_); - bitField0_ |= 0x00000008; - } - } - /** - *
-       * DELTA coded
-       * 
- * - * repeated sint64 lon = 9 [packed = true]; - * @return A list containing the lon. - */ - public java.util.List - getLonList() { - return ((bitField0_ & 0x00000008) != 0) ? - java.util.Collections.unmodifiableList(lon_) : lon_; - } - /** - *
-       * DELTA coded
-       * 
- * - * repeated sint64 lon = 9 [packed = true]; - * @return The count of lon. - */ - public int getLonCount() { - return lon_.size(); - } - /** - *
-       * DELTA coded
-       * 
- * - * repeated sint64 lon = 9 [packed = true]; - * @param index The index of the element to return. - * @return The lon at the given index. - */ - public long getLon(int index) { - return lon_.getLong(index); - } - /** - *
-       * DELTA coded
-       * 
- * - * repeated sint64 lon = 9 [packed = true]; - * @param index The index to set the value at. - * @param value The lon to set. - * @return This builder for chaining. - */ - public Builder setLon( - int index, long value) { - ensureLonIsMutable(); - lon_.setLong(index, value); - onChanged(); - return this; - } - /** - *
-       * DELTA coded
-       * 
- * - * repeated sint64 lon = 9 [packed = true]; - * @param value The lon to add. - * @return This builder for chaining. - */ - public Builder addLon(long value) { - ensureLonIsMutable(); - lon_.addLong(value); - onChanged(); - return this; - } - /** - *
-       * DELTA coded
-       * 
- * - * repeated sint64 lon = 9 [packed = true]; - * @param values The lon to add. - * @return This builder for chaining. - */ - public Builder addAllLon( - Iterable values) { - ensureLonIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, lon_); - onChanged(); - return this; - } - /** - *
-       * DELTA coded
-       * 
- * - * repeated sint64 lon = 9 [packed = true]; - * @return This builder for chaining. - */ - public Builder clearLon() { - lon_ = emptyLongList(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - - private com.google.protobuf.Internal.IntList keysVals_ = emptyIntList(); - private void ensureKeysValsIsMutable() { - if (!((bitField0_ & 0x00000010) != 0)) { - keysVals_ = mutableCopy(keysVals_); - bitField0_ |= 0x00000010; - } - } - /** - *
-       * Special packing of keys and vals into one array. May be empty if all nodes in this block are tagless.
-       * 
- * - * repeated int32 keys_vals = 10 [packed = true]; - * @return A list containing the keysVals. - */ - public java.util.List - getKeysValsList() { - return ((bitField0_ & 0x00000010) != 0) ? - java.util.Collections.unmodifiableList(keysVals_) : keysVals_; - } - /** - *
-       * Special packing of keys and vals into one array. May be empty if all nodes in this block are tagless.
-       * 
- * - * repeated int32 keys_vals = 10 [packed = true]; - * @return The count of keysVals. - */ - public int getKeysValsCount() { - return keysVals_.size(); - } - /** - *
-       * Special packing of keys and vals into one array. May be empty if all nodes in this block are tagless.
-       * 
- * - * repeated int32 keys_vals = 10 [packed = true]; - * @param index The index of the element to return. - * @return The keysVals at the given index. - */ - public int getKeysVals(int index) { - return keysVals_.getInt(index); - } - /** - *
-       * Special packing of keys and vals into one array. May be empty if all nodes in this block are tagless.
-       * 
- * - * repeated int32 keys_vals = 10 [packed = true]; - * @param index The index to set the value at. - * @param value The keysVals to set. - * @return This builder for chaining. - */ - public Builder setKeysVals( - int index, int value) { - ensureKeysValsIsMutable(); - keysVals_.setInt(index, value); - onChanged(); - return this; - } - /** - *
-       * Special packing of keys and vals into one array. May be empty if all nodes in this block are tagless.
-       * 
- * - * repeated int32 keys_vals = 10 [packed = true]; - * @param value The keysVals to add. - * @return This builder for chaining. - */ - public Builder addKeysVals(int value) { - ensureKeysValsIsMutable(); - keysVals_.addInt(value); - onChanged(); - return this; - } - /** - *
-       * Special packing of keys and vals into one array. May be empty if all nodes in this block are tagless.
-       * 
- * - * repeated int32 keys_vals = 10 [packed = true]; - * @param values The keysVals to add. - * @return This builder for chaining. - */ - public Builder addAllKeysVals( - Iterable values) { - ensureKeysValsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, keysVals_); - onChanged(); - return this; - } - /** - *
-       * Special packing of keys and vals into one array. May be empty if all nodes in this block are tagless.
-       * 
- * - * repeated int32 keys_vals = 10 [packed = true]; - * @return This builder for chaining. - */ - public Builder clearKeysVals() { - keysVals_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - return this; - } - @Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:OSMPBF.DenseNodes) - } - - // @@protoc_insertion_point(class_scope:OSMPBF.DenseNodes) - private static final DenseNodes DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new DenseNodes(); - } - - public static DenseNodes getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - @Deprecated public static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @Override - public DenseNodes parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DenseNodes(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @Override - public DenseNodes getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface WayOrBuilder extends - // @@protoc_insertion_point(interface_extends:OSMPBF.Way) - com.google.protobuf.MessageOrBuilder { - - /** - * required int64 id = 1; - * @return Whether the id field is set. - */ - boolean hasId(); - /** - * required int64 id = 1; - * @return The id. - */ - long getId(); - - /** - *
-     * Parallel arrays.
-     * 
- * - * repeated uint32 keys = 2 [packed = true]; - * @return A list containing the keys. - */ - java.util.List getKeysList(); - /** - *
-     * Parallel arrays.
-     * 
- * - * repeated uint32 keys = 2 [packed = true]; - * @return The count of keys. - */ - int getKeysCount(); - /** - *
-     * Parallel arrays.
-     * 
- * - * repeated uint32 keys = 2 [packed = true]; - * @param index The index of the element to return. - * @return The keys at the given index. - */ - int getKeys(int index); - - /** - * repeated uint32 vals = 3 [packed = true]; - * @return A list containing the vals. - */ - java.util.List getValsList(); - /** - * repeated uint32 vals = 3 [packed = true]; - * @return The count of vals. - */ - int getValsCount(); - /** - * repeated uint32 vals = 3 [packed = true]; - * @param index The index of the element to return. - * @return The vals at the given index. - */ - int getVals(int index); - - /** - * optional .OSMPBF.Info info = 4; - * @return Whether the info field is set. - */ - boolean hasInfo(); - /** - * optional .OSMPBF.Info info = 4; - * @return The info. - */ - Info getInfo(); - /** - * optional .OSMPBF.Info info = 4; - */ - InfoOrBuilder getInfoOrBuilder(); - - /** - *
-     * DELTA coded
-     * 
- * - * repeated sint64 refs = 8 [packed = true]; - * @return A list containing the refs. - */ - java.util.List getRefsList(); - /** - *
-     * DELTA coded
-     * 
- * - * repeated sint64 refs = 8 [packed = true]; - * @return The count of refs. - */ - int getRefsCount(); - /** - *
-     * DELTA coded
-     * 
- * - * repeated sint64 refs = 8 [packed = true]; - * @param index The index of the element to return. - * @return The refs at the given index. - */ - long getRefs(int index); - } - /** - * Protobuf type {@code OSMPBF.Way} - */ - public static final class Way extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:OSMPBF.Way) - WayOrBuilder { - private static final long serialVersionUID = 0L; - // Use Way.newBuilder() to construct. - private Way(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Way() { - keys_ = emptyIntList(); - vals_ = emptyIntList(); - refs_ = emptyLongList(); - } - - @Override - @SuppressWarnings({"unused"}) - protected Object newInstance( - UnusedPrivateParameter unused) { - return new Way(); - } - - @Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Way( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - bitField0_ |= 0x00000001; - id_ = input.readInt64(); - break; - } - case 16: { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - keys_ = newIntList(); - mutable_bitField0_ |= 0x00000002; - } - keys_.addInt(input.readUInt32()); - break; - } - case 18: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000002) != 0) && input.getBytesUntilLimit() > 0) { - keys_ = newIntList(); - mutable_bitField0_ |= 0x00000002; - } - while (input.getBytesUntilLimit() > 0) { - keys_.addInt(input.readUInt32()); - } - input.popLimit(limit); - break; - } - case 24: { - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - vals_ = newIntList(); - mutable_bitField0_ |= 0x00000004; - } - vals_.addInt(input.readUInt32()); - break; - } - case 26: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000004) != 0) && input.getBytesUntilLimit() > 0) { - vals_ = newIntList(); - mutable_bitField0_ |= 0x00000004; - } - while (input.getBytesUntilLimit() > 0) { - vals_.addInt(input.readUInt32()); - } - input.popLimit(limit); - break; - } - case 34: { - Info.Builder subBuilder = null; - if (((bitField0_ & 0x00000002) != 0)) { - subBuilder = info_.toBuilder(); - } - info_ = input.readMessage(Info.PARSER, extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(info_); - info_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000002; - break; - } - case 64: { - if (!((mutable_bitField0_ & 0x00000010) != 0)) { - refs_ = newLongList(); - mutable_bitField0_ |= 0x00000010; - } - refs_.addLong(input.readSInt64()); - break; - } - case 66: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000010) != 0) && input.getBytesUntilLimit() > 0) { - refs_ = newLongList(); - mutable_bitField0_ |= 0x00000010; - } - while (input.getBytesUntilLimit() > 0) { - refs_.addLong(input.readSInt64()); - } - input.popLimit(limit); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000002) != 0)) { - keys_.makeImmutable(); // C - } - if (((mutable_bitField0_ & 0x00000004) != 0)) { - vals_.makeImmutable(); // C - } - if (((mutable_bitField0_ & 0x00000010) != 0)) { - refs_.makeImmutable(); // C - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return internal_static_OSMPBF_Way_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return internal_static_OSMPBF_Way_fieldAccessorTable - .ensureFieldAccessorsInitialized( - Way.class, Way.Builder.class); - } - - private int bitField0_; - public static final int ID_FIELD_NUMBER = 1; - private long id_; - /** - * required int64 id = 1; - * @return Whether the id field is set. - */ - public boolean hasId() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * required int64 id = 1; - * @return The id. - */ - public long getId() { - return id_; - } - - public static final int KEYS_FIELD_NUMBER = 2; - private com.google.protobuf.Internal.IntList keys_; - /** - *
-     * Parallel arrays.
-     * 
- * - * repeated uint32 keys = 2 [packed = true]; - * @return A list containing the keys. - */ - public java.util.List - getKeysList() { - return keys_; - } - /** - *
-     * Parallel arrays.
-     * 
- * - * repeated uint32 keys = 2 [packed = true]; - * @return The count of keys. - */ - public int getKeysCount() { - return keys_.size(); - } - /** - *
-     * Parallel arrays.
-     * 
- * - * repeated uint32 keys = 2 [packed = true]; - * @param index The index of the element to return. - * @return The keys at the given index. - */ - public int getKeys(int index) { - return keys_.getInt(index); - } - private int keysMemoizedSerializedSize = -1; - - public static final int VALS_FIELD_NUMBER = 3; - private com.google.protobuf.Internal.IntList vals_; - /** - * repeated uint32 vals = 3 [packed = true]; - * @return A list containing the vals. - */ - public java.util.List - getValsList() { - return vals_; - } - /** - * repeated uint32 vals = 3 [packed = true]; - * @return The count of vals. - */ - public int getValsCount() { - return vals_.size(); - } - /** - * repeated uint32 vals = 3 [packed = true]; - * @param index The index of the element to return. - * @return The vals at the given index. - */ - public int getVals(int index) { - return vals_.getInt(index); - } - private int valsMemoizedSerializedSize = -1; - - public static final int INFO_FIELD_NUMBER = 4; - private Info info_; - /** - * optional .OSMPBF.Info info = 4; - * @return Whether the info field is set. - */ - public boolean hasInfo() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * optional .OSMPBF.Info info = 4; - * @return The info. - */ - public Info getInfo() { - return info_ == null ? Info.getDefaultInstance() : info_; - } - /** - * optional .OSMPBF.Info info = 4; - */ - public InfoOrBuilder getInfoOrBuilder() { - return info_ == null ? Info.getDefaultInstance() : info_; - } - - public static final int REFS_FIELD_NUMBER = 8; - private com.google.protobuf.Internal.LongList refs_; - /** - *
-     * DELTA coded
-     * 
- * - * repeated sint64 refs = 8 [packed = true]; - * @return A list containing the refs. - */ - public java.util.List - getRefsList() { - return refs_; - } - /** - *
-     * DELTA coded
-     * 
- * - * repeated sint64 refs = 8 [packed = true]; - * @return The count of refs. - */ - public int getRefsCount() { - return refs_.size(); - } - /** - *
-     * DELTA coded
-     * 
- * - * repeated sint64 refs = 8 [packed = true]; - * @param index The index of the element to return. - * @return The refs at the given index. - */ - public long getRefs(int index) { - return refs_.getLong(index); - } - private int refsMemoizedSerializedSize = -1; - - private byte memoizedIsInitialized = -1; - @Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - if (!hasId()) { - memoizedIsInitialized = 0; - return false; - } - memoizedIsInitialized = 1; - return true; - } - - @Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (((bitField0_ & 0x00000001) != 0)) { - output.writeInt64(1, id_); - } - if (getKeysList().size() > 0) { - output.writeUInt32NoTag(18); - output.writeUInt32NoTag(keysMemoizedSerializedSize); - } - for (int i = 0; i < keys_.size(); i++) { - output.writeUInt32NoTag(keys_.getInt(i)); - } - if (getValsList().size() > 0) { - output.writeUInt32NoTag(26); - output.writeUInt32NoTag(valsMemoizedSerializedSize); - } - for (int i = 0; i < vals_.size(); i++) { - output.writeUInt32NoTag(vals_.getInt(i)); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeMessage(4, getInfo()); - } - if (getRefsList().size() > 0) { - output.writeUInt32NoTag(66); - output.writeUInt32NoTag(refsMemoizedSerializedSize); - } - for (int i = 0; i < refs_.size(); i++) { - output.writeSInt64NoTag(refs_.getLong(i)); - } - unknownFields.writeTo(output); - } - - @Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(1, id_); - } - { - int dataSize = 0; - for (int i = 0; i < keys_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeUInt32SizeNoTag(keys_.getInt(i)); - } - size += dataSize; - if (!getKeysList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(dataSize); - } - keysMemoizedSerializedSize = dataSize; - } - { - int dataSize = 0; - for (int i = 0; i < vals_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeUInt32SizeNoTag(vals_.getInt(i)); - } - size += dataSize; - if (!getValsList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(dataSize); - } - valsMemoizedSerializedSize = dataSize; - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getInfo()); - } - { - int dataSize = 0; - for (int i = 0; i < refs_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeSInt64SizeNoTag(refs_.getLong(i)); - } - size += dataSize; - if (!getRefsList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(dataSize); - } - refsMemoizedSerializedSize = dataSize; - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @Override - public boolean equals(final Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof Way)) { - return super.equals(obj); - } - Way other = (Way) obj; - - if (hasId() != other.hasId()) return false; - if (hasId()) { - if (getId() - != other.getId()) return false; - } - if (!getKeysList() - .equals(other.getKeysList())) return false; - if (!getValsList() - .equals(other.getValsList())) return false; - if (hasInfo() != other.hasInfo()) return false; - if (hasInfo()) { - if (!getInfo() - .equals(other.getInfo())) return false; - } - if (!getRefsList() - .equals(other.getRefsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasId()) { - hash = (37 * hash) + ID_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getId()); - } - if (getKeysCount() > 0) { - hash = (37 * hash) + KEYS_FIELD_NUMBER; - hash = (53 * hash) + getKeysList().hashCode(); - } - if (getValsCount() > 0) { - hash = (37 * hash) + VALS_FIELD_NUMBER; - hash = (53 * hash) + getValsList().hashCode(); - } - if (hasInfo()) { - hash = (37 * hash) + INFO_FIELD_NUMBER; - hash = (53 * hash) + getInfo().hashCode(); - } - if (getRefsCount() > 0) { - hash = (37 * hash) + REFS_FIELD_NUMBER; - hash = (53 * hash) + getRefsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static Way parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static Way parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static Way parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static Way parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static Way parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static Way parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static Way parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static Way parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static Way parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static Way parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static Way parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static Way parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(Way prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @Override - protected Builder newBuilderForType( - BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code OSMPBF.Way} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:OSMPBF.Way) - WayOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return internal_static_OSMPBF_Way_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return internal_static_OSMPBF_Way_fieldAccessorTable - .ensureFieldAccessorsInitialized( - Way.class, Way.Builder.class); - } - - // Construct using Way.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getInfoFieldBuilder(); - } - } - @Override - public Builder clear() { - super.clear(); - id_ = 0L; - bitField0_ = (bitField0_ & ~0x00000001); - keys_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000002); - vals_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000004); - if (infoBuilder_ == null) { - info_ = null; - } else { - infoBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000008); - refs_ = emptyLongList(); - bitField0_ = (bitField0_ & ~0x00000010); - return this; - } - - @Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return internal_static_OSMPBF_Way_descriptor; - } - - @Override - public Way getDefaultInstanceForType() { - return Way.getDefaultInstance(); - } - - @Override - public Way build() { - Way result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @Override - public Way buildPartial() { - Way result = new Way(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.id_ = id_; - to_bitField0_ |= 0x00000001; - } - if (((bitField0_ & 0x00000002) != 0)) { - keys_.makeImmutable(); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.keys_ = keys_; - if (((bitField0_ & 0x00000004) != 0)) { - vals_.makeImmutable(); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.vals_ = vals_; - if (((from_bitField0_ & 0x00000008) != 0)) { - if (infoBuilder_ == null) { - result.info_ = info_; - } else { - result.info_ = infoBuilder_.build(); - } - to_bitField0_ |= 0x00000002; - } - if (((bitField0_ & 0x00000010) != 0)) { - refs_.makeImmutable(); - bitField0_ = (bitField0_ & ~0x00000010); - } - result.refs_ = refs_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - @Override - public Builder clone() { - return super.clone(); - } - @Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.setField(field, value); - } - @Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, Object value) { - return super.setRepeatedField(field, index, value); - } - @Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.addRepeatedField(field, value); - } - @Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof Way) { - return mergeFrom((Way)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(Way other) { - if (other == Way.getDefaultInstance()) return this; - if (other.hasId()) { - setId(other.getId()); - } - if (!other.keys_.isEmpty()) { - if (keys_.isEmpty()) { - keys_ = other.keys_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureKeysIsMutable(); - keys_.addAll(other.keys_); - } - onChanged(); - } - if (!other.vals_.isEmpty()) { - if (vals_.isEmpty()) { - vals_ = other.vals_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureValsIsMutable(); - vals_.addAll(other.vals_); - } - onChanged(); - } - if (other.hasInfo()) { - mergeInfo(other.getInfo()); - } - if (!other.refs_.isEmpty()) { - if (refs_.isEmpty()) { - refs_ = other.refs_; - bitField0_ = (bitField0_ & ~0x00000010); - } else { - ensureRefsIsMutable(); - refs_.addAll(other.refs_); - } - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @Override - public final boolean isInitialized() { - if (!hasId()) { - return false; - } - return true; - } - - @Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - Way parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (Way) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private long id_ ; - /** - * required int64 id = 1; - * @return Whether the id field is set. - */ - public boolean hasId() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * required int64 id = 1; - * @return The id. - */ - public long getId() { - return id_; - } - /** - * required int64 id = 1; - * @param value The id to set. - * @return This builder for chaining. - */ - public Builder setId(long value) { - bitField0_ |= 0x00000001; - id_ = value; - onChanged(); - return this; - } - /** - * required int64 id = 1; - * @return This builder for chaining. - */ - public Builder clearId() { - bitField0_ = (bitField0_ & ~0x00000001); - id_ = 0L; - onChanged(); - return this; - } - - private com.google.protobuf.Internal.IntList keys_ = emptyIntList(); - private void ensureKeysIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - keys_ = mutableCopy(keys_); - bitField0_ |= 0x00000002; - } - } - /** - *
-       * Parallel arrays.
-       * 
- * - * repeated uint32 keys = 2 [packed = true]; - * @return A list containing the keys. - */ - public java.util.List - getKeysList() { - return ((bitField0_ & 0x00000002) != 0) ? - java.util.Collections.unmodifiableList(keys_) : keys_; - } - /** - *
-       * Parallel arrays.
-       * 
- * - * repeated uint32 keys = 2 [packed = true]; - * @return The count of keys. - */ - public int getKeysCount() { - return keys_.size(); - } - /** - *
-       * Parallel arrays.
-       * 
- * - * repeated uint32 keys = 2 [packed = true]; - * @param index The index of the element to return. - * @return The keys at the given index. - */ - public int getKeys(int index) { - return keys_.getInt(index); - } - /** - *
-       * Parallel arrays.
-       * 
- * - * repeated uint32 keys = 2 [packed = true]; - * @param index The index to set the value at. - * @param value The keys to set. - * @return This builder for chaining. - */ - public Builder setKeys( - int index, int value) { - ensureKeysIsMutable(); - keys_.setInt(index, value); - onChanged(); - return this; - } - /** - *
-       * Parallel arrays.
-       * 
- * - * repeated uint32 keys = 2 [packed = true]; - * @param value The keys to add. - * @return This builder for chaining. - */ - public Builder addKeys(int value) { - ensureKeysIsMutable(); - keys_.addInt(value); - onChanged(); - return this; - } - /** - *
-       * Parallel arrays.
-       * 
- * - * repeated uint32 keys = 2 [packed = true]; - * @param values The keys to add. - * @return This builder for chaining. - */ - public Builder addAllKeys( - Iterable values) { - ensureKeysIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, keys_); - onChanged(); - return this; - } - /** - *
-       * Parallel arrays.
-       * 
- * - * repeated uint32 keys = 2 [packed = true]; - * @return This builder for chaining. - */ - public Builder clearKeys() { - keys_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - - private com.google.protobuf.Internal.IntList vals_ = emptyIntList(); - private void ensureValsIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - vals_ = mutableCopy(vals_); - bitField0_ |= 0x00000004; - } - } - /** - * repeated uint32 vals = 3 [packed = true]; - * @return A list containing the vals. - */ - public java.util.List - getValsList() { - return ((bitField0_ & 0x00000004) != 0) ? - java.util.Collections.unmodifiableList(vals_) : vals_; - } - /** - * repeated uint32 vals = 3 [packed = true]; - * @return The count of vals. - */ - public int getValsCount() { - return vals_.size(); - } - /** - * repeated uint32 vals = 3 [packed = true]; - * @param index The index of the element to return. - * @return The vals at the given index. - */ - public int getVals(int index) { - return vals_.getInt(index); - } - /** - * repeated uint32 vals = 3 [packed = true]; - * @param index The index to set the value at. - * @param value The vals to set. - * @return This builder for chaining. - */ - public Builder setVals( - int index, int value) { - ensureValsIsMutable(); - vals_.setInt(index, value); - onChanged(); - return this; - } - /** - * repeated uint32 vals = 3 [packed = true]; - * @param value The vals to add. - * @return This builder for chaining. - */ - public Builder addVals(int value) { - ensureValsIsMutable(); - vals_.addInt(value); - onChanged(); - return this; - } - /** - * repeated uint32 vals = 3 [packed = true]; - * @param values The vals to add. - * @return This builder for chaining. - */ - public Builder addAllVals( - Iterable values) { - ensureValsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, vals_); - onChanged(); - return this; - } - /** - * repeated uint32 vals = 3 [packed = true]; - * @return This builder for chaining. - */ - public Builder clearVals() { - vals_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - - private Info info_; - private com.google.protobuf.SingleFieldBuilderV3< - Info, Info.Builder, InfoOrBuilder> infoBuilder_; - /** - * optional .OSMPBF.Info info = 4; - * @return Whether the info field is set. - */ - public boolean hasInfo() { - return ((bitField0_ & 0x00000008) != 0); - } - /** - * optional .OSMPBF.Info info = 4; - * @return The info. - */ - public Info getInfo() { - if (infoBuilder_ == null) { - return info_ == null ? Info.getDefaultInstance() : info_; - } else { - return infoBuilder_.getMessage(); - } - } - /** - * optional .OSMPBF.Info info = 4; - */ - public Builder setInfo(Info value) { - if (infoBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - info_ = value; - onChanged(); - } else { - infoBuilder_.setMessage(value); - } - bitField0_ |= 0x00000008; - return this; - } - /** - * optional .OSMPBF.Info info = 4; - */ - public Builder setInfo( - Info.Builder builderForValue) { - if (infoBuilder_ == null) { - info_ = builderForValue.build(); - onChanged(); - } else { - infoBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000008; - return this; - } - /** - * optional .OSMPBF.Info info = 4; - */ - public Builder mergeInfo(Info value) { - if (infoBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0) && - info_ != null && - info_ != Info.getDefaultInstance()) { - info_ = - Info.newBuilder(info_).mergeFrom(value).buildPartial(); - } else { - info_ = value; - } - onChanged(); - } else { - infoBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000008; - return this; - } - /** - * optional .OSMPBF.Info info = 4; - */ - public Builder clearInfo() { - if (infoBuilder_ == null) { - info_ = null; - onChanged(); - } else { - infoBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000008); - return this; - } - /** - * optional .OSMPBF.Info info = 4; - */ - public Info.Builder getInfoBuilder() { - bitField0_ |= 0x00000008; - onChanged(); - return getInfoFieldBuilder().getBuilder(); - } - /** - * optional .OSMPBF.Info info = 4; - */ - public InfoOrBuilder getInfoOrBuilder() { - if (infoBuilder_ != null) { - return infoBuilder_.getMessageOrBuilder(); - } else { - return info_ == null ? - Info.getDefaultInstance() : info_; - } - } - /** - * optional .OSMPBF.Info info = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - Info, Info.Builder, InfoOrBuilder> - getInfoFieldBuilder() { - if (infoBuilder_ == null) { - infoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - Info, Info.Builder, InfoOrBuilder>( - getInfo(), - getParentForChildren(), - isClean()); - info_ = null; - } - return infoBuilder_; - } - - private com.google.protobuf.Internal.LongList refs_ = emptyLongList(); - private void ensureRefsIsMutable() { - if (!((bitField0_ & 0x00000010) != 0)) { - refs_ = mutableCopy(refs_); - bitField0_ |= 0x00000010; - } - } - /** - *
-       * DELTA coded
-       * 
- * - * repeated sint64 refs = 8 [packed = true]; - * @return A list containing the refs. - */ - public java.util.List - getRefsList() { - return ((bitField0_ & 0x00000010) != 0) ? - java.util.Collections.unmodifiableList(refs_) : refs_; - } - /** - *
-       * DELTA coded
-       * 
- * - * repeated sint64 refs = 8 [packed = true]; - * @return The count of refs. - */ - public int getRefsCount() { - return refs_.size(); - } - /** - *
-       * DELTA coded
-       * 
- * - * repeated sint64 refs = 8 [packed = true]; - * @param index The index of the element to return. - * @return The refs at the given index. - */ - public long getRefs(int index) { - return refs_.getLong(index); - } - /** - *
-       * DELTA coded
-       * 
- * - * repeated sint64 refs = 8 [packed = true]; - * @param index The index to set the value at. - * @param value The refs to set. - * @return This builder for chaining. - */ - public Builder setRefs( - int index, long value) { - ensureRefsIsMutable(); - refs_.setLong(index, value); - onChanged(); - return this; - } - /** - *
-       * DELTA coded
-       * 
- * - * repeated sint64 refs = 8 [packed = true]; - * @param value The refs to add. - * @return This builder for chaining. - */ - public Builder addRefs(long value) { - ensureRefsIsMutable(); - refs_.addLong(value); - onChanged(); - return this; - } - /** - *
-       * DELTA coded
-       * 
- * - * repeated sint64 refs = 8 [packed = true]; - * @param values The refs to add. - * @return This builder for chaining. - */ - public Builder addAllRefs( - Iterable values) { - ensureRefsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, refs_); - onChanged(); - return this; - } - /** - *
-       * DELTA coded
-       * 
- * - * repeated sint64 refs = 8 [packed = true]; - * @return This builder for chaining. - */ - public Builder clearRefs() { - refs_ = emptyLongList(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - return this; - } - @Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:OSMPBF.Way) - } - - // @@protoc_insertion_point(class_scope:OSMPBF.Way) - private static final Way DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new Way(); - } - - public static Way getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - @Deprecated public static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @Override - public Way parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Way(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @Override - public Way getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface RelationOrBuilder extends - // @@protoc_insertion_point(interface_extends:OSMPBF.Relation) - com.google.protobuf.MessageOrBuilder { - - /** - * required int64 id = 1; - * @return Whether the id field is set. - */ - boolean hasId(); - /** - * required int64 id = 1; - * @return The id. - */ - long getId(); - - /** - *
-     * Parallel arrays.
-     * 
- * - * repeated uint32 keys = 2 [packed = true]; - * @return A list containing the keys. - */ - java.util.List getKeysList(); - /** - *
-     * Parallel arrays.
-     * 
- * - * repeated uint32 keys = 2 [packed = true]; - * @return The count of keys. - */ - int getKeysCount(); - /** - *
-     * Parallel arrays.
-     * 
- * - * repeated uint32 keys = 2 [packed = true]; - * @param index The index of the element to return. - * @return The keys at the given index. - */ - int getKeys(int index); - - /** - * repeated uint32 vals = 3 [packed = true]; - * @return A list containing the vals. - */ - java.util.List getValsList(); - /** - * repeated uint32 vals = 3 [packed = true]; - * @return The count of vals. - */ - int getValsCount(); - /** - * repeated uint32 vals = 3 [packed = true]; - * @param index The index of the element to return. - * @return The vals at the given index. - */ - int getVals(int index); - - /** - * optional .OSMPBF.Info info = 4; - * @return Whether the info field is set. - */ - boolean hasInfo(); - /** - * optional .OSMPBF.Info info = 4; - * @return The info. - */ - Info getInfo(); - /** - * optional .OSMPBF.Info info = 4; - */ - InfoOrBuilder getInfoOrBuilder(); - - /** - *
-     * Parallel arrays
-     * 
- * - * repeated int32 roles_sid = 8 [packed = true]; - * @return A list containing the rolesSid. - */ - java.util.List getRolesSidList(); - /** - *
-     * Parallel arrays
-     * 
- * - * repeated int32 roles_sid = 8 [packed = true]; - * @return The count of rolesSid. - */ - int getRolesSidCount(); - /** - *
-     * Parallel arrays
-     * 
- * - * repeated int32 roles_sid = 8 [packed = true]; - * @param index The index of the element to return. - * @return The rolesSid at the given index. - */ - int getRolesSid(int index); - - /** - *
-     * DELTA encoded
-     * 
- * - * repeated sint64 memids = 9 [packed = true]; - * @return A list containing the memids. - */ - java.util.List getMemidsList(); - /** - *
-     * DELTA encoded
-     * 
- * - * repeated sint64 memids = 9 [packed = true]; - * @return The count of memids. - */ - int getMemidsCount(); - /** - *
-     * DELTA encoded
-     * 
- * - * repeated sint64 memids = 9 [packed = true]; - * @param index The index of the element to return. - * @return The memids at the given index. - */ - long getMemids(int index); - - /** - * repeated .OSMPBF.Relation.MemberType types = 10 [packed = true]; - * @return A list containing the types. - */ - java.util.List getTypesList(); - /** - * repeated .OSMPBF.Relation.MemberType types = 10 [packed = true]; - * @return The count of types. - */ - int getTypesCount(); - /** - * repeated .OSMPBF.Relation.MemberType types = 10 [packed = true]; - * @param index The index of the element to return. - * @return The types at the given index. - */ - Relation.MemberType getTypes(int index); - } - /** - * Protobuf type {@code OSMPBF.Relation} - */ - public static final class Relation extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:OSMPBF.Relation) - RelationOrBuilder { - private static final long serialVersionUID = 0L; - // Use Relation.newBuilder() to construct. - private Relation(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Relation() { - keys_ = emptyIntList(); - vals_ = emptyIntList(); - rolesSid_ = emptyIntList(); - memids_ = emptyLongList(); - types_ = java.util.Collections.emptyList(); - } - - @Override - @SuppressWarnings({"unused"}) - protected Object newInstance( - UnusedPrivateParameter unused) { - return new Relation(); - } - - @Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Relation( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - bitField0_ |= 0x00000001; - id_ = input.readInt64(); - break; - } - case 16: { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - keys_ = newIntList(); - mutable_bitField0_ |= 0x00000002; - } - keys_.addInt(input.readUInt32()); - break; - } - case 18: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000002) != 0) && input.getBytesUntilLimit() > 0) { - keys_ = newIntList(); - mutable_bitField0_ |= 0x00000002; - } - while (input.getBytesUntilLimit() > 0) { - keys_.addInt(input.readUInt32()); - } - input.popLimit(limit); - break; - } - case 24: { - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - vals_ = newIntList(); - mutable_bitField0_ |= 0x00000004; - } - vals_.addInt(input.readUInt32()); - break; - } - case 26: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000004) != 0) && input.getBytesUntilLimit() > 0) { - vals_ = newIntList(); - mutable_bitField0_ |= 0x00000004; - } - while (input.getBytesUntilLimit() > 0) { - vals_.addInt(input.readUInt32()); - } - input.popLimit(limit); - break; - } - case 34: { - Info.Builder subBuilder = null; - if (((bitField0_ & 0x00000002) != 0)) { - subBuilder = info_.toBuilder(); - } - info_ = input.readMessage(Info.PARSER, extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(info_); - info_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000002; - break; - } - case 64: { - if (!((mutable_bitField0_ & 0x00000010) != 0)) { - rolesSid_ = newIntList(); - mutable_bitField0_ |= 0x00000010; - } - rolesSid_.addInt(input.readInt32()); - break; - } - case 66: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000010) != 0) && input.getBytesUntilLimit() > 0) { - rolesSid_ = newIntList(); - mutable_bitField0_ |= 0x00000010; - } - while (input.getBytesUntilLimit() > 0) { - rolesSid_.addInt(input.readInt32()); - } - input.popLimit(limit); - break; - } - case 72: { - if (!((mutable_bitField0_ & 0x00000020) != 0)) { - memids_ = newLongList(); - mutable_bitField0_ |= 0x00000020; - } - memids_.addLong(input.readSInt64()); - break; - } - case 74: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000020) != 0) && input.getBytesUntilLimit() > 0) { - memids_ = newLongList(); - mutable_bitField0_ |= 0x00000020; - } - while (input.getBytesUntilLimit() > 0) { - memids_.addLong(input.readSInt64()); - } - input.popLimit(limit); - break; - } - case 80: { - int rawValue = input.readEnum(); - @SuppressWarnings("deprecation") - Relation.MemberType value = Relation.MemberType.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(10, rawValue); - } else { - if (!((mutable_bitField0_ & 0x00000040) != 0)) { - types_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000040; - } - types_.add(rawValue); - } - break; - } - case 82: { - int length = input.readRawVarint32(); - int oldLimit = input.pushLimit(length); - while(input.getBytesUntilLimit() > 0) { - int rawValue = input.readEnum(); - @SuppressWarnings("deprecation") - Relation.MemberType value = Relation.MemberType.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(10, rawValue); - } else { - if (!((mutable_bitField0_ & 0x00000040) != 0)) { - types_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000040; - } - types_.add(rawValue); - } - } - input.popLimit(oldLimit); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000002) != 0)) { - keys_.makeImmutable(); // C - } - if (((mutable_bitField0_ & 0x00000004) != 0)) { - vals_.makeImmutable(); // C - } - if (((mutable_bitField0_ & 0x00000010) != 0)) { - rolesSid_.makeImmutable(); // C - } - if (((mutable_bitField0_ & 0x00000020) != 0)) { - memids_.makeImmutable(); // C - } - if (((mutable_bitField0_ & 0x00000040) != 0)) { - types_ = java.util.Collections.unmodifiableList(types_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return internal_static_OSMPBF_Relation_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return internal_static_OSMPBF_Relation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - Relation.class, Relation.Builder.class); - } - - /** - * Protobuf enum {@code OSMPBF.Relation.MemberType} - */ - public enum MemberType - implements com.google.protobuf.ProtocolMessageEnum { - /** - * NODE = 0; - */ - NODE(0), - /** - * WAY = 1; - */ - WAY(1), - /** - * RELATION = 2; - */ - RELATION(2), - ; - - /** - * NODE = 0; - */ - public static final int NODE_VALUE = 0; - /** - * WAY = 1; - */ - public static final int WAY_VALUE = 1; - /** - * RELATION = 2; - */ - public static final int RELATION_VALUE = 2; - - - public final int getNumber() { - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @Deprecated - public static MemberType valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static MemberType forNumber(int value) { - switch (value) { - case 0: return NODE; - case 1: return WAY; - case 2: return RELATION; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - MemberType> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public MemberType findValueByNumber(int number) { - return MemberType.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return Relation.getDescriptor().getEnumTypes().get(0); - } - - private static final MemberType[] VALUES = values(); - - public static MemberType valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private MemberType(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:OSMPBF.Relation.MemberType) - } - - private int bitField0_; - public static final int ID_FIELD_NUMBER = 1; - private long id_; - /** - * required int64 id = 1; - * @return Whether the id field is set. - */ - public boolean hasId() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * required int64 id = 1; - * @return The id. - */ - public long getId() { - return id_; - } - - public static final int KEYS_FIELD_NUMBER = 2; - private com.google.protobuf.Internal.IntList keys_; - /** - *
-     * Parallel arrays.
-     * 
- * - * repeated uint32 keys = 2 [packed = true]; - * @return A list containing the keys. - */ - public java.util.List - getKeysList() { - return keys_; - } - /** - *
-     * Parallel arrays.
-     * 
- * - * repeated uint32 keys = 2 [packed = true]; - * @return The count of keys. - */ - public int getKeysCount() { - return keys_.size(); - } - /** - *
-     * Parallel arrays.
-     * 
- * - * repeated uint32 keys = 2 [packed = true]; - * @param index The index of the element to return. - * @return The keys at the given index. - */ - public int getKeys(int index) { - return keys_.getInt(index); - } - private int keysMemoizedSerializedSize = -1; - - public static final int VALS_FIELD_NUMBER = 3; - private com.google.protobuf.Internal.IntList vals_; - /** - * repeated uint32 vals = 3 [packed = true]; - * @return A list containing the vals. - */ - public java.util.List - getValsList() { - return vals_; - } - /** - * repeated uint32 vals = 3 [packed = true]; - * @return The count of vals. - */ - public int getValsCount() { - return vals_.size(); - } - /** - * repeated uint32 vals = 3 [packed = true]; - * @param index The index of the element to return. - * @return The vals at the given index. - */ - public int getVals(int index) { - return vals_.getInt(index); - } - private int valsMemoizedSerializedSize = -1; - - public static final int INFO_FIELD_NUMBER = 4; - private Info info_; - /** - * optional .OSMPBF.Info info = 4; - * @return Whether the info field is set. - */ - public boolean hasInfo() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * optional .OSMPBF.Info info = 4; - * @return The info. - */ - public Info getInfo() { - return info_ == null ? Info.getDefaultInstance() : info_; - } - /** - * optional .OSMPBF.Info info = 4; - */ - public InfoOrBuilder getInfoOrBuilder() { - return info_ == null ? Info.getDefaultInstance() : info_; - } - - public static final int ROLES_SID_FIELD_NUMBER = 8; - private com.google.protobuf.Internal.IntList rolesSid_; - /** - *
-     * Parallel arrays
-     * 
- * - * repeated int32 roles_sid = 8 [packed = true]; - * @return A list containing the rolesSid. - */ - public java.util.List - getRolesSidList() { - return rolesSid_; - } - /** - *
-     * Parallel arrays
-     * 
- * - * repeated int32 roles_sid = 8 [packed = true]; - * @return The count of rolesSid. - */ - public int getRolesSidCount() { - return rolesSid_.size(); - } - /** - *
-     * Parallel arrays
-     * 
- * - * repeated int32 roles_sid = 8 [packed = true]; - * @param index The index of the element to return. - * @return The rolesSid at the given index. - */ - public int getRolesSid(int index) { - return rolesSid_.getInt(index); - } - private int rolesSidMemoizedSerializedSize = -1; - - public static final int MEMIDS_FIELD_NUMBER = 9; - private com.google.protobuf.Internal.LongList memids_; - /** - *
-     * DELTA encoded
-     * 
- * - * repeated sint64 memids = 9 [packed = true]; - * @return A list containing the memids. - */ - public java.util.List - getMemidsList() { - return memids_; - } - /** - *
-     * DELTA encoded
-     * 
- * - * repeated sint64 memids = 9 [packed = true]; - * @return The count of memids. - */ - public int getMemidsCount() { - return memids_.size(); - } - /** - *
-     * DELTA encoded
-     * 
- * - * repeated sint64 memids = 9 [packed = true]; - * @param index The index of the element to return. - * @return The memids at the given index. - */ - public long getMemids(int index) { - return memids_.getLong(index); - } - private int memidsMemoizedSerializedSize = -1; - - public static final int TYPES_FIELD_NUMBER = 10; - private java.util.List types_; - private static final com.google.protobuf.Internal.ListAdapter.Converter< - Integer, Relation.MemberType> types_converter_ = - new com.google.protobuf.Internal.ListAdapter.Converter< - Integer, Relation.MemberType>() { - public Relation.MemberType convert(Integer from) { - @SuppressWarnings("deprecation") - Relation.MemberType result = Relation.MemberType.valueOf(from); - return result == null ? Relation.MemberType.NODE : result; - } - }; - /** - * repeated .OSMPBF.Relation.MemberType types = 10 [packed = true]; - * @return A list containing the types. - */ - public java.util.List getTypesList() { - return new com.google.protobuf.Internal.ListAdapter< - Integer, Relation.MemberType>(types_, types_converter_); - } - /** - * repeated .OSMPBF.Relation.MemberType types = 10 [packed = true]; - * @param value The types to add. - */ - public int getTypesCount() { - return types_.size(); - } - /** - * repeated .OSMPBF.Relation.MemberType types = 10 [packed = true]; - * @param index The index of the element to return. - * @return The types at the given index. - */ - public Relation.MemberType getTypes(int index) { - return types_converter_.convert(types_.get(index)); - } - private int typesMemoizedSerializedSize; - - private byte memoizedIsInitialized = -1; - @Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - if (!hasId()) { - memoizedIsInitialized = 0; - return false; - } - memoizedIsInitialized = 1; - return true; - } - - @Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (((bitField0_ & 0x00000001) != 0)) { - output.writeInt64(1, id_); - } - if (getKeysList().size() > 0) { - output.writeUInt32NoTag(18); - output.writeUInt32NoTag(keysMemoizedSerializedSize); - } - for (int i = 0; i < keys_.size(); i++) { - output.writeUInt32NoTag(keys_.getInt(i)); - } - if (getValsList().size() > 0) { - output.writeUInt32NoTag(26); - output.writeUInt32NoTag(valsMemoizedSerializedSize); - } - for (int i = 0; i < vals_.size(); i++) { - output.writeUInt32NoTag(vals_.getInt(i)); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeMessage(4, getInfo()); - } - if (getRolesSidList().size() > 0) { - output.writeUInt32NoTag(66); - output.writeUInt32NoTag(rolesSidMemoizedSerializedSize); - } - for (int i = 0; i < rolesSid_.size(); i++) { - output.writeInt32NoTag(rolesSid_.getInt(i)); - } - if (getMemidsList().size() > 0) { - output.writeUInt32NoTag(74); - output.writeUInt32NoTag(memidsMemoizedSerializedSize); - } - for (int i = 0; i < memids_.size(); i++) { - output.writeSInt64NoTag(memids_.getLong(i)); - } - if (getTypesList().size() > 0) { - output.writeUInt32NoTag(82); - output.writeUInt32NoTag(typesMemoizedSerializedSize); - } - for (int i = 0; i < types_.size(); i++) { - output.writeEnumNoTag(types_.get(i)); - } - unknownFields.writeTo(output); - } - - @Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(1, id_); - } - { - int dataSize = 0; - for (int i = 0; i < keys_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeUInt32SizeNoTag(keys_.getInt(i)); - } - size += dataSize; - if (!getKeysList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(dataSize); - } - keysMemoizedSerializedSize = dataSize; - } - { - int dataSize = 0; - for (int i = 0; i < vals_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeUInt32SizeNoTag(vals_.getInt(i)); - } - size += dataSize; - if (!getValsList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(dataSize); - } - valsMemoizedSerializedSize = dataSize; - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getInfo()); - } - { - int dataSize = 0; - for (int i = 0; i < rolesSid_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(rolesSid_.getInt(i)); - } - size += dataSize; - if (!getRolesSidList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(dataSize); - } - rolesSidMemoizedSerializedSize = dataSize; - } - { - int dataSize = 0; - for (int i = 0; i < memids_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeSInt64SizeNoTag(memids_.getLong(i)); - } - size += dataSize; - if (!getMemidsList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(dataSize); - } - memidsMemoizedSerializedSize = dataSize; - } - { - int dataSize = 0; - for (int i = 0; i < types_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeEnumSizeNoTag(types_.get(i)); - } - size += dataSize; - if (!getTypesList().isEmpty()) { size += 1; - size += com.google.protobuf.CodedOutputStream - .computeUInt32SizeNoTag(dataSize); - }typesMemoizedSerializedSize = dataSize; - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @Override - public boolean equals(final Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof Relation)) { - return super.equals(obj); - } - Relation other = (Relation) obj; - - if (hasId() != other.hasId()) return false; - if (hasId()) { - if (getId() - != other.getId()) return false; - } - if (!getKeysList() - .equals(other.getKeysList())) return false; - if (!getValsList() - .equals(other.getValsList())) return false; - if (hasInfo() != other.hasInfo()) return false; - if (hasInfo()) { - if (!getInfo() - .equals(other.getInfo())) return false; - } - if (!getRolesSidList() - .equals(other.getRolesSidList())) return false; - if (!getMemidsList() - .equals(other.getMemidsList())) return false; - if (!types_.equals(other.types_)) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasId()) { - hash = (37 * hash) + ID_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getId()); - } - if (getKeysCount() > 0) { - hash = (37 * hash) + KEYS_FIELD_NUMBER; - hash = (53 * hash) + getKeysList().hashCode(); - } - if (getValsCount() > 0) { - hash = (37 * hash) + VALS_FIELD_NUMBER; - hash = (53 * hash) + getValsList().hashCode(); - } - if (hasInfo()) { - hash = (37 * hash) + INFO_FIELD_NUMBER; - hash = (53 * hash) + getInfo().hashCode(); - } - if (getRolesSidCount() > 0) { - hash = (37 * hash) + ROLES_SID_FIELD_NUMBER; - hash = (53 * hash) + getRolesSidList().hashCode(); - } - if (getMemidsCount() > 0) { - hash = (37 * hash) + MEMIDS_FIELD_NUMBER; - hash = (53 * hash) + getMemidsList().hashCode(); - } - if (getTypesCount() > 0) { - hash = (37 * hash) + TYPES_FIELD_NUMBER; - hash = (53 * hash) + types_.hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static Relation parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static Relation parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static Relation parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static Relation parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static Relation parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static Relation parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static Relation parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static Relation parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static Relation parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static Relation parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static Relation parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static Relation parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(Relation prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @Override - protected Builder newBuilderForType( - BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code OSMPBF.Relation} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:OSMPBF.Relation) - RelationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return internal_static_OSMPBF_Relation_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return internal_static_OSMPBF_Relation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - Relation.class, Relation.Builder.class); - } - - // Construct using Relation.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getInfoFieldBuilder(); - } - } - @Override - public Builder clear() { - super.clear(); - id_ = 0L; - bitField0_ = (bitField0_ & ~0x00000001); - keys_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000002); - vals_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000004); - if (infoBuilder_ == null) { - info_ = null; - } else { - infoBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000008); - rolesSid_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000010); - memids_ = emptyLongList(); - bitField0_ = (bitField0_ & ~0x00000020); - types_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000040); - return this; - } - - @Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return internal_static_OSMPBF_Relation_descriptor; - } - - @Override - public Relation getDefaultInstanceForType() { - return Relation.getDefaultInstance(); - } - - @Override - public Relation build() { - Relation result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @Override - public Relation buildPartial() { - Relation result = new Relation(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.id_ = id_; - to_bitField0_ |= 0x00000001; - } - if (((bitField0_ & 0x00000002) != 0)) { - keys_.makeImmutable(); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.keys_ = keys_; - if (((bitField0_ & 0x00000004) != 0)) { - vals_.makeImmutable(); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.vals_ = vals_; - if (((from_bitField0_ & 0x00000008) != 0)) { - if (infoBuilder_ == null) { - result.info_ = info_; - } else { - result.info_ = infoBuilder_.build(); - } - to_bitField0_ |= 0x00000002; - } - if (((bitField0_ & 0x00000010) != 0)) { - rolesSid_.makeImmutable(); - bitField0_ = (bitField0_ & ~0x00000010); - } - result.rolesSid_ = rolesSid_; - if (((bitField0_ & 0x00000020) != 0)) { - memids_.makeImmutable(); - bitField0_ = (bitField0_ & ~0x00000020); - } - result.memids_ = memids_; - if (((bitField0_ & 0x00000040) != 0)) { - types_ = java.util.Collections.unmodifiableList(types_); - bitField0_ = (bitField0_ & ~0x00000040); - } - result.types_ = types_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - @Override - public Builder clone() { - return super.clone(); - } - @Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.setField(field, value); - } - @Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, Object value) { - return super.setRepeatedField(field, index, value); - } - @Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.addRepeatedField(field, value); - } - @Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof Relation) { - return mergeFrom((Relation)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(Relation other) { - if (other == Relation.getDefaultInstance()) return this; - if (other.hasId()) { - setId(other.getId()); - } - if (!other.keys_.isEmpty()) { - if (keys_.isEmpty()) { - keys_ = other.keys_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureKeysIsMutable(); - keys_.addAll(other.keys_); - } - onChanged(); - } - if (!other.vals_.isEmpty()) { - if (vals_.isEmpty()) { - vals_ = other.vals_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureValsIsMutable(); - vals_.addAll(other.vals_); - } - onChanged(); - } - if (other.hasInfo()) { - mergeInfo(other.getInfo()); - } - if (!other.rolesSid_.isEmpty()) { - if (rolesSid_.isEmpty()) { - rolesSid_ = other.rolesSid_; - bitField0_ = (bitField0_ & ~0x00000010); - } else { - ensureRolesSidIsMutable(); - rolesSid_.addAll(other.rolesSid_); - } - onChanged(); - } - if (!other.memids_.isEmpty()) { - if (memids_.isEmpty()) { - memids_ = other.memids_; - bitField0_ = (bitField0_ & ~0x00000020); - } else { - ensureMemidsIsMutable(); - memids_.addAll(other.memids_); - } - onChanged(); - } - if (!other.types_.isEmpty()) { - if (types_.isEmpty()) { - types_ = other.types_; - bitField0_ = (bitField0_ & ~0x00000040); - } else { - ensureTypesIsMutable(); - types_.addAll(other.types_); - } - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @Override - public final boolean isInitialized() { - if (!hasId()) { - return false; - } - return true; - } - - @Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - Relation parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (Relation) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private long id_ ; - /** - * required int64 id = 1; - * @return Whether the id field is set. - */ - public boolean hasId() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * required int64 id = 1; - * @return The id. - */ - public long getId() { - return id_; - } - /** - * required int64 id = 1; - * @param value The id to set. - * @return This builder for chaining. - */ - public Builder setId(long value) { - bitField0_ |= 0x00000001; - id_ = value; - onChanged(); - return this; - } - /** - * required int64 id = 1; - * @return This builder for chaining. - */ - public Builder clearId() { - bitField0_ = (bitField0_ & ~0x00000001); - id_ = 0L; - onChanged(); - return this; - } - - private com.google.protobuf.Internal.IntList keys_ = emptyIntList(); - private void ensureKeysIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - keys_ = mutableCopy(keys_); - bitField0_ |= 0x00000002; - } - } - /** - *
-       * Parallel arrays.
-       * 
- * - * repeated uint32 keys = 2 [packed = true]; - * @return A list containing the keys. - */ - public java.util.List - getKeysList() { - return ((bitField0_ & 0x00000002) != 0) ? - java.util.Collections.unmodifiableList(keys_) : keys_; - } - /** - *
-       * Parallel arrays.
-       * 
- * - * repeated uint32 keys = 2 [packed = true]; - * @return The count of keys. - */ - public int getKeysCount() { - return keys_.size(); - } - /** - *
-       * Parallel arrays.
-       * 
- * - * repeated uint32 keys = 2 [packed = true]; - * @param index The index of the element to return. - * @return The keys at the given index. - */ - public int getKeys(int index) { - return keys_.getInt(index); - } - /** - *
-       * Parallel arrays.
-       * 
- * - * repeated uint32 keys = 2 [packed = true]; - * @param index The index to set the value at. - * @param value The keys to set. - * @return This builder for chaining. - */ - public Builder setKeys( - int index, int value) { - ensureKeysIsMutable(); - keys_.setInt(index, value); - onChanged(); - return this; - } - /** - *
-       * Parallel arrays.
-       * 
- * - * repeated uint32 keys = 2 [packed = true]; - * @param value The keys to add. - * @return This builder for chaining. - */ - public Builder addKeys(int value) { - ensureKeysIsMutable(); - keys_.addInt(value); - onChanged(); - return this; - } - /** - *
-       * Parallel arrays.
-       * 
- * - * repeated uint32 keys = 2 [packed = true]; - * @param values The keys to add. - * @return This builder for chaining. - */ - public Builder addAllKeys( - Iterable values) { - ensureKeysIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, keys_); - onChanged(); - return this; - } - /** - *
-       * Parallel arrays.
-       * 
- * - * repeated uint32 keys = 2 [packed = true]; - * @return This builder for chaining. - */ - public Builder clearKeys() { - keys_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - - private com.google.protobuf.Internal.IntList vals_ = emptyIntList(); - private void ensureValsIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - vals_ = mutableCopy(vals_); - bitField0_ |= 0x00000004; - } - } - /** - * repeated uint32 vals = 3 [packed = true]; - * @return A list containing the vals. - */ - public java.util.List - getValsList() { - return ((bitField0_ & 0x00000004) != 0) ? - java.util.Collections.unmodifiableList(vals_) : vals_; - } - /** - * repeated uint32 vals = 3 [packed = true]; - * @return The count of vals. - */ - public int getValsCount() { - return vals_.size(); - } - /** - * repeated uint32 vals = 3 [packed = true]; - * @param index The index of the element to return. - * @return The vals at the given index. - */ - public int getVals(int index) { - return vals_.getInt(index); - } - /** - * repeated uint32 vals = 3 [packed = true]; - * @param index The index to set the value at. - * @param value The vals to set. - * @return This builder for chaining. - */ - public Builder setVals( - int index, int value) { - ensureValsIsMutable(); - vals_.setInt(index, value); - onChanged(); - return this; - } - /** - * repeated uint32 vals = 3 [packed = true]; - * @param value The vals to add. - * @return This builder for chaining. - */ - public Builder addVals(int value) { - ensureValsIsMutable(); - vals_.addInt(value); - onChanged(); - return this; - } - /** - * repeated uint32 vals = 3 [packed = true]; - * @param values The vals to add. - * @return This builder for chaining. - */ - public Builder addAllVals( - Iterable values) { - ensureValsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, vals_); - onChanged(); - return this; - } - /** - * repeated uint32 vals = 3 [packed = true]; - * @return This builder for chaining. - */ - public Builder clearVals() { - vals_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - - private Info info_; - private com.google.protobuf.SingleFieldBuilderV3< - Info, Info.Builder, InfoOrBuilder> infoBuilder_; - /** - * optional .OSMPBF.Info info = 4; - * @return Whether the info field is set. - */ - public boolean hasInfo() { - return ((bitField0_ & 0x00000008) != 0); - } - /** - * optional .OSMPBF.Info info = 4; - * @return The info. - */ - public Info getInfo() { - if (infoBuilder_ == null) { - return info_ == null ? Info.getDefaultInstance() : info_; - } else { - return infoBuilder_.getMessage(); - } - } - /** - * optional .OSMPBF.Info info = 4; - */ - public Builder setInfo(Info value) { - if (infoBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - info_ = value; - onChanged(); - } else { - infoBuilder_.setMessage(value); - } - bitField0_ |= 0x00000008; - return this; - } - /** - * optional .OSMPBF.Info info = 4; - */ - public Builder setInfo( - Info.Builder builderForValue) { - if (infoBuilder_ == null) { - info_ = builderForValue.build(); - onChanged(); - } else { - infoBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000008; - return this; - } - /** - * optional .OSMPBF.Info info = 4; - */ - public Builder mergeInfo(Info value) { - if (infoBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0) && - info_ != null && - info_ != Info.getDefaultInstance()) { - info_ = - Info.newBuilder(info_).mergeFrom(value).buildPartial(); - } else { - info_ = value; - } - onChanged(); - } else { - infoBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000008; - return this; - } - /** - * optional .OSMPBF.Info info = 4; - */ - public Builder clearInfo() { - if (infoBuilder_ == null) { - info_ = null; - onChanged(); - } else { - infoBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000008); - return this; - } - /** - * optional .OSMPBF.Info info = 4; - */ - public Info.Builder getInfoBuilder() { - bitField0_ |= 0x00000008; - onChanged(); - return getInfoFieldBuilder().getBuilder(); - } - /** - * optional .OSMPBF.Info info = 4; - */ - public InfoOrBuilder getInfoOrBuilder() { - if (infoBuilder_ != null) { - return infoBuilder_.getMessageOrBuilder(); - } else { - return info_ == null ? - Info.getDefaultInstance() : info_; - } - } - /** - * optional .OSMPBF.Info info = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - Info, Info.Builder, InfoOrBuilder> - getInfoFieldBuilder() { - if (infoBuilder_ == null) { - infoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - Info, Info.Builder, InfoOrBuilder>( - getInfo(), - getParentForChildren(), - isClean()); - info_ = null; - } - return infoBuilder_; - } - - private com.google.protobuf.Internal.IntList rolesSid_ = emptyIntList(); - private void ensureRolesSidIsMutable() { - if (!((bitField0_ & 0x00000010) != 0)) { - rolesSid_ = mutableCopy(rolesSid_); - bitField0_ |= 0x00000010; - } - } - /** - *
-       * Parallel arrays
-       * 
- * - * repeated int32 roles_sid = 8 [packed = true]; - * @return A list containing the rolesSid. - */ - public java.util.List - getRolesSidList() { - return ((bitField0_ & 0x00000010) != 0) ? - java.util.Collections.unmodifiableList(rolesSid_) : rolesSid_; - } - /** - *
-       * Parallel arrays
-       * 
- * - * repeated int32 roles_sid = 8 [packed = true]; - * @return The count of rolesSid. - */ - public int getRolesSidCount() { - return rolesSid_.size(); - } - /** - *
-       * Parallel arrays
-       * 
- * - * repeated int32 roles_sid = 8 [packed = true]; - * @param index The index of the element to return. - * @return The rolesSid at the given index. - */ - public int getRolesSid(int index) { - return rolesSid_.getInt(index); - } - /** - *
-       * Parallel arrays
-       * 
- * - * repeated int32 roles_sid = 8 [packed = true]; - * @param index The index to set the value at. - * @param value The rolesSid to set. - * @return This builder for chaining. - */ - public Builder setRolesSid( - int index, int value) { - ensureRolesSidIsMutable(); - rolesSid_.setInt(index, value); - onChanged(); - return this; - } - /** - *
-       * Parallel arrays
-       * 
- * - * repeated int32 roles_sid = 8 [packed = true]; - * @param value The rolesSid to add. - * @return This builder for chaining. - */ - public Builder addRolesSid(int value) { - ensureRolesSidIsMutable(); - rolesSid_.addInt(value); - onChanged(); - return this; - } - /** - *
-       * Parallel arrays
-       * 
- * - * repeated int32 roles_sid = 8 [packed = true]; - * @param values The rolesSid to add. - * @return This builder for chaining. - */ - public Builder addAllRolesSid( - Iterable values) { - ensureRolesSidIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, rolesSid_); - onChanged(); - return this; - } - /** - *
-       * Parallel arrays
-       * 
- * - * repeated int32 roles_sid = 8 [packed = true]; - * @return This builder for chaining. - */ - public Builder clearRolesSid() { - rolesSid_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - return this; - } - - private com.google.protobuf.Internal.LongList memids_ = emptyLongList(); - private void ensureMemidsIsMutable() { - if (!((bitField0_ & 0x00000020) != 0)) { - memids_ = mutableCopy(memids_); - bitField0_ |= 0x00000020; - } - } - /** - *
-       * DELTA encoded
-       * 
- * - * repeated sint64 memids = 9 [packed = true]; - * @return A list containing the memids. - */ - public java.util.List - getMemidsList() { - return ((bitField0_ & 0x00000020) != 0) ? - java.util.Collections.unmodifiableList(memids_) : memids_; - } - /** - *
-       * DELTA encoded
-       * 
- * - * repeated sint64 memids = 9 [packed = true]; - * @return The count of memids. - */ - public int getMemidsCount() { - return memids_.size(); - } - /** - *
-       * DELTA encoded
-       * 
- * - * repeated sint64 memids = 9 [packed = true]; - * @param index The index of the element to return. - * @return The memids at the given index. - */ - public long getMemids(int index) { - return memids_.getLong(index); - } - /** - *
-       * DELTA encoded
-       * 
- * - * repeated sint64 memids = 9 [packed = true]; - * @param index The index to set the value at. - * @param value The memids to set. - * @return This builder for chaining. - */ - public Builder setMemids( - int index, long value) { - ensureMemidsIsMutable(); - memids_.setLong(index, value); - onChanged(); - return this; - } - /** - *
-       * DELTA encoded
-       * 
- * - * repeated sint64 memids = 9 [packed = true]; - * @param value The memids to add. - * @return This builder for chaining. - */ - public Builder addMemids(long value) { - ensureMemidsIsMutable(); - memids_.addLong(value); - onChanged(); - return this; - } - /** - *
-       * DELTA encoded
-       * 
- * - * repeated sint64 memids = 9 [packed = true]; - * @param values The memids to add. - * @return This builder for chaining. - */ - public Builder addAllMemids( - Iterable values) { - ensureMemidsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, memids_); - onChanged(); - return this; - } - /** - *
-       * DELTA encoded
-       * 
- * - * repeated sint64 memids = 9 [packed = true]; - * @return This builder for chaining. - */ - public Builder clearMemids() { - memids_ = emptyLongList(); - bitField0_ = (bitField0_ & ~0x00000020); - onChanged(); - return this; - } - - private java.util.List types_ = - java.util.Collections.emptyList(); - private void ensureTypesIsMutable() { - if (!((bitField0_ & 0x00000040) != 0)) { - types_ = new java.util.ArrayList(types_); - bitField0_ |= 0x00000040; - } - } - /** - * repeated .OSMPBF.Relation.MemberType types = 10 [packed = true]; - * @return A list containing the types. - */ - public java.util.List getTypesList() { - return new com.google.protobuf.Internal.ListAdapter< - Integer, Relation.MemberType>(types_, types_converter_); - } - /** - * repeated .OSMPBF.Relation.MemberType types = 10 [packed = true]; - * @return The count of types. - */ - public int getTypesCount() { - return types_.size(); - } - /** - * repeated .OSMPBF.Relation.MemberType types = 10 [packed = true]; - * @param index The index of the element to return. - * @return The types at the given index. - */ - public Relation.MemberType getTypes(int index) { - return types_converter_.convert(types_.get(index)); - } - /** - * repeated .OSMPBF.Relation.MemberType types = 10 [packed = true]; - * @param index The index to set the value at. - * @param value The types to set. - * @return This builder for chaining. - */ - public Builder setTypes( - int index, Relation.MemberType value) { - if (value == null) { - throw new NullPointerException(); - } - ensureTypesIsMutable(); - types_.set(index, value.getNumber()); - onChanged(); - return this; - } - /** - * repeated .OSMPBF.Relation.MemberType types = 10 [packed = true]; - * @param value The types to add. - * @return This builder for chaining. - */ - public Builder addTypes(Relation.MemberType value) { - if (value == null) { - throw new NullPointerException(); - } - ensureTypesIsMutable(); - types_.add(value.getNumber()); - onChanged(); - return this; - } - /** - * repeated .OSMPBF.Relation.MemberType types = 10 [packed = true]; - * @param values The types to add. - * @return This builder for chaining. - */ - public Builder addAllTypes( - Iterable values) { - ensureTypesIsMutable(); - for (Relation.MemberType value : values) { - types_.add(value.getNumber()); - } - onChanged(); - return this; - } - /** - * repeated .OSMPBF.Relation.MemberType types = 10 [packed = true]; - * @return This builder for chaining. - */ - public Builder clearTypes() { - types_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000040); - onChanged(); - return this; - } - @Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:OSMPBF.Relation) - } - - // @@protoc_insertion_point(class_scope:OSMPBF.Relation) - private static final Relation DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new Relation(); - } - - public static Relation getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - @Deprecated public static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @Override - public Relation parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Relation(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @Override - public Relation getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_OSMPBF_HeaderBlock_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_OSMPBF_HeaderBlock_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_OSMPBF_HeaderBBox_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_OSMPBF_HeaderBBox_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_OSMPBF_PrimitiveBlock_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_OSMPBF_PrimitiveBlock_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_OSMPBF_PrimitiveGroup_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_OSMPBF_PrimitiveGroup_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_OSMPBF_StringTable_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_OSMPBF_StringTable_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_OSMPBF_Info_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_OSMPBF_Info_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_OSMPBF_DenseInfo_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_OSMPBF_DenseInfo_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_OSMPBF_ChangeSet_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_OSMPBF_ChangeSet_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_OSMPBF_Node_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_OSMPBF_Node_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_OSMPBF_DenseNodes_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_OSMPBF_DenseNodes_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_OSMPBF_Way_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_OSMPBF_Way_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_OSMPBF_Relation_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_OSMPBF_Relation_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - String[] descriptorData = { - "\n\017proto\022\006OSMPBF\"\207\002\n\013HeaderBloc" + - "k\022 \n\004bbox\030\001 \001(\0132\022.OSMPBF.HeaderBBox\022\031\n\021r" + - "equired_features\030\004 \003(\t\022\031\n\021optional_featu" + - "res\030\005 \003(\t\022\026\n\016writingprogram\030\020 \001(\t\022\016\n\006sou" + - "rce\030\021 \001(\t\022%\n\035osmosis_replication_timesta" + - "mp\030 \001(\003\022+\n#osmosis_replication_sequence" + - "_number\030! \001(\003\022$\n\034osmosis_replication_bas" + - "e_url\030\" \001(\t\"F\n\nHeaderBBox\022\014\n\004left\030\001 \002(\022\022" + - "\r\n\005right\030\002 \002(\022\022\013\n\003top\030\003 \002(\022\022\016\n\006bottom\030\004 " + - "\002(\022\"\322\001\n\016PrimitiveBlock\022(\n\013stringtable\030\001 " + - "\002(\0132\023.OSMPBF.StringTable\022.\n\016primitivegro" + - "up\030\002 \003(\0132\026.OSMPBF.PrimitiveGroup\022\030\n\013gran" + - "ularity\030\021 \001(\005:\003100\022\025\n\nlat_offset\030\023 \001(\003:\001" + - "0\022\025\n\nlon_offset\030\024 \001(\003:\0010\022\036\n\020date_granula" + - "rity\030\022 \001(\005:\0041000\"\267\001\n\016PrimitiveGroup\022\033\n\005n" + - "odes\030\001 \003(\0132\014.OSMPBF.Node\022!\n\005dense\030\002 \001(\0132" + - "\022.OSMPBF.DenseNodes\022\031\n\004ways\030\003 \003(\0132\013.OSMP" + - "BF.Way\022#\n\trelations\030\004 \003(\0132\020.OSMPBF.Relat" + - "ion\022%\n\nchangesets\030\005 \003(\0132\021.OSMPBF.ChangeS" + - "et\"\030\n\013StringTable\022\t\n\001s\030\001 \003(\014\"q\n\004Info\022\023\n\007" + - "version\030\001 \001(\005:\002-1\022\021\n\ttimestamp\030\002 \001(\003\022\021\n\t" + - "changeset\030\003 \001(\003\022\013\n\003uid\030\004 \001(\005\022\020\n\010user_sid" + - "\030\005 \001(\r\022\017\n\007visible\030\006 \001(\010\"\212\001\n\tDenseInfo\022\023\n" + - "\007version\030\001 \003(\005B\002\020\001\022\025\n\ttimestamp\030\002 \003(\022B\002\020" + - "\001\022\025\n\tchangeset\030\003 \003(\022B\002\020\001\022\017\n\003uid\030\004 \003(\021B\002\020" + - "\001\022\024\n\010user_sid\030\005 \003(\021B\002\020\001\022\023\n\007visible\030\006 \003(\010" + - "B\002\020\001\"\027\n\tChangeSet\022\n\n\002id\030\001 \002(\003\"l\n\004Node\022\n\n" + - "\002id\030\001 \002(\022\022\020\n\004keys\030\002 \003(\rB\002\020\001\022\020\n\004vals\030\003 \003(" + - "\rB\002\020\001\022\032\n\004info\030\004 \001(\0132\014.OSMPBF.Info\022\013\n\003lat" + - "\030\010 \002(\022\022\013\n\003lon\030\t \002(\022\"{\n\nDenseNodes\022\016\n\002id\030" + - "\001 \003(\022B\002\020\001\022$\n\tdenseinfo\030\005 \001(\0132\021.OSMPBF.De" + - "nseInfo\022\017\n\003lat\030\010 \003(\022B\002\020\001\022\017\n\003lon\030\t \003(\022B\002\020" + - "\001\022\025\n\tkeys_vals\030\n \003(\005B\002\020\001\"c\n\003Way\022\n\n\002id\030\001 " + - "\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" + - "\032\n\004info\030\004 \001(\0132\014.OSMPBF.Info\022\020\n\004refs\030\010 \003(" + - "\022B\002\020\001\"\340\001\n\010Relation\022\n\n\002id\030\001 \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\032\n\004info\030\004 \001(\013" + - "2\014.OSMPBF.Info\022\025\n\troles_sid\030\010 \003(\005B\002\020\001\022\022\n" + - "\006memids\030\t \003(\022B\002\020\001\022.\n\005types\030\n \003(\0162\033.OSMPB" + - "F.Relation.MemberTypeB\002\020\001\"-\n\nMemberType\022" + - "\010\n\004NODE\020\000\022\007\n\003WAY\020\001\022\014\n\010RELATION\020\002B\021\n\rcros" + - "by.binaryH\003" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - }); - internal_static_OSMPBF_HeaderBlock_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_OSMPBF_HeaderBlock_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_OSMPBF_HeaderBlock_descriptor, - new String[] { "Bbox", "RequiredFeatures", "OptionalFeatures", "Writingprogram", "Source", "OsmosisReplicationTimestamp", "OsmosisReplicationSequenceNumber", "OsmosisReplicationBaseUrl", }); - internal_static_OSMPBF_HeaderBBox_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_OSMPBF_HeaderBBox_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_OSMPBF_HeaderBBox_descriptor, - new String[] { "Left", "Right", "Top", "Bottom", }); - internal_static_OSMPBF_PrimitiveBlock_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_OSMPBF_PrimitiveBlock_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_OSMPBF_PrimitiveBlock_descriptor, - new String[] { "Stringtable", "Primitivegroup", "Granularity", "LatOffset", "LonOffset", "DateGranularity", }); - internal_static_OSMPBF_PrimitiveGroup_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_OSMPBF_PrimitiveGroup_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_OSMPBF_PrimitiveGroup_descriptor, - new String[] { "Nodes", "Dense", "Ways", "Relations", "Changesets", }); - internal_static_OSMPBF_StringTable_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_OSMPBF_StringTable_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_OSMPBF_StringTable_descriptor, - new String[] { "S", }); - internal_static_OSMPBF_Info_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_OSMPBF_Info_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_OSMPBF_Info_descriptor, - new String[] { "Version", "Timestamp", "Changeset", "Uid", "UserSid", "Visible", }); - internal_static_OSMPBF_DenseInfo_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_OSMPBF_DenseInfo_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_OSMPBF_DenseInfo_descriptor, - new String[] { "Version", "Timestamp", "Changeset", "Uid", "UserSid", "Visible", }); - internal_static_OSMPBF_ChangeSet_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_OSMPBF_ChangeSet_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_OSMPBF_ChangeSet_descriptor, - new String[] { "Id", }); - internal_static_OSMPBF_Node_descriptor = - getDescriptor().getMessageTypes().get(8); - internal_static_OSMPBF_Node_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_OSMPBF_Node_descriptor, - new String[] { "Id", "Keys", "Vals", "Info", "Lat", "Lon", }); - internal_static_OSMPBF_DenseNodes_descriptor = - getDescriptor().getMessageTypes().get(9); - internal_static_OSMPBF_DenseNodes_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_OSMPBF_DenseNodes_descriptor, - new String[] { "Id", "Denseinfo", "Lat", "Lon", "KeysVals", }); - internal_static_OSMPBF_Way_descriptor = - getDescriptor().getMessageTypes().get(10); - internal_static_OSMPBF_Way_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_OSMPBF_Way_descriptor, - new String[] { "Id", "Keys", "Vals", "Info", "Refs", }); - internal_static_OSMPBF_Relation_descriptor = - getDescriptor().getMessageTypes().get(11); - internal_static_OSMPBF_Relation_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_OSMPBF_Relation_descriptor, - new String[] { "Id", "Keys", "Vals", "Info", "RolesSid", "Memids", "Types", }); - } - - // @@protoc_insertion_point(outer_class_scope) -}