public Builder mergeFrom(ucar.nc2.stream.NcStreamProto.Header other) { if (other == ucar.nc2.stream.NcStreamProto.Header.getDefaultInstance()) return this; if (!other.getLocation().isEmpty()) { location_ = other.location_; onChanged(); } if (!other.getTitle().isEmpty()) { title_ = other.title_; onChanged(); } if (!other.getId().isEmpty()) { id_ = other.id_; onChanged(); } if (other.hasRoot()) { mergeRoot(other.getRoot()); } if (other.getVersion() != 0) { setVersion(other.getVersion()); } onChanged(); return this; }
public Builder mergeFrom(ucar.nc2.stream.NcStreamProto.Header other) { if (other == ucar.nc2.stream.NcStreamProto.Header.getDefaultInstance()) return this; if (other.hasLocation()) { bitField0_ |= 0x00000001; location_ = other.location_; onChanged(); } if (other.hasTitle()) { bitField0_ |= 0x00000002; title_ = other.title_; onChanged(); } if (other.hasId()) { bitField0_ |= 0x00000004; id_ = other.id_; onChanged(); } if (other.hasRoot()) { mergeRoot(other.getRoot()); } if (other.hasVersion()) { setVersion(other.getVersion()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
public Builder mergeFrom(ucar.nc2.stream.NcStreamProto.Header other) { if (other == ucar.nc2.stream.NcStreamProto.Header.getDefaultInstance()) return this; if (other.hasLocation()) { bitField0_ |= 0x00000001; location_ = other.location_; onChanged(); } if (other.hasTitle()) { bitField0_ |= 0x00000002; title_ = other.title_; onChanged(); } if (other.hasId()) { bitField0_ |= 0x00000004; id_ = other.id_; onChanged(); } if (other.hasRoot()) { mergeRoot(other.getRoot()); } if (other.hasVersion()) { setVersion(other.getVersion()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
public NcStreamWriter(NetcdfFile ncfile, String location) throws IOException { this.ncfile = ncfile; NcStreamProto.Group.Builder rootBuilder = NcStream.encodeGroup(ncfile.getRootGroup(), sizeToCache); NcStreamProto.Header.Builder headerBuilder = NcStreamProto.Header.newBuilder(); headerBuilder.setLocation(location == null ? ncfile.getLocation() : location); if (ncfile.getTitle() != null) headerBuilder.setTitle(ncfile.getTitle()); if (ncfile.getId() != null) headerBuilder.setId(ncfile.getId()); headerBuilder.setRoot(rootBuilder); headerBuilder.setVersion(currentVersion); header = headerBuilder.build(); }
public NcStreamWriter(NetcdfFile ncfile, String location) throws IOException { this.ncfile = ncfile; NcStreamProto.Group.Builder rootBuilder = NcStream.encodeGroup(ncfile.getRootGroup(), sizeToCache); NcStreamProto.Header.Builder headerBuilder = NcStreamProto.Header.newBuilder(); headerBuilder.setLocation(location == null ? ncfile.getLocation() : location); if (ncfile.getTitle() != null) headerBuilder.setTitle(ncfile.getTitle()); if (ncfile.getId() != null) headerBuilder.setId(ncfile.getId()); headerBuilder.setRoot(rootBuilder); headerBuilder.setVersion(currentVersion); header = headerBuilder.build(); }
public NcStreamWriter(NetcdfFile ncfile, String location) throws IOException { this.ncfile = ncfile; NcStreamProto.Group.Builder rootBuilder = NcStream.encodeGroup(ncfile.getRootGroup(), sizeToCache); NcStreamProto.Header.Builder headerBuilder = NcStreamProto.Header.newBuilder(); headerBuilder.setLocation(location == null ? ncfile.getLocation() : location); if (ncfile.getTitle() != null) headerBuilder.setTitle(ncfile.getTitle()); if (ncfile.getId() != null) headerBuilder.setId(ncfile.getId()); headerBuilder.setRoot(rootBuilder); headerBuilder.setVersion(currentVersion); header = headerBuilder.build(); }