public ucar.nc2.stream.NcStreamProto.Variable buildPartial() { ucar.nc2.stream.NcStreamProto.Variable result = new ucar.nc2.stream.NcStreamProto.Variable(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0;
public Builder mergeFrom(ucar.nc2.stream.NcStreamProto.Variable other) { if (other == ucar.nc2.stream.NcStreamProto.Variable.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; onChanged(); setDataTypeValue(other.getDataTypeValue()); if (other.getUnsigned() != false) { setUnsigned(other.getUnsigned()); if (other.getData() != com.google.protobuf.ByteString.EMPTY) { setData(other.getData()); if (!other.getEnumType().isEmpty()) { enumType_ = other.enumType_; onChanged();
if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(1, getNameBytes()); .computeBytesSize(7, getEnumTypeBytes()); size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size;
public Builder mergeFrom(ucar.nc2.stream.NcStreamProto.Variable other) { if (other == ucar.nc2.stream.NcStreamProto.Variable.getDefaultInstance()) return this; if (other.hasName()) { bitField0_ |= 0x00000001; name_ = other.name_; onChanged(); if (other.hasDataType()) { setDataType(other.getDataType()); if (other.hasUnsigned()) { setUnsigned(other.getUnsigned()); if (other.hasData()) { setData(other.getData()); if (other.hasEnumType()) { bitField0_ |= 0x00000040; enumType_ = other.enumType_; onChanged(); this.mergeUnknownFields(other.getUnknownFields()); return this;
public Builder mergeFrom(ucar.nc2.stream.NcStreamProto.Variable other) { if (other == ucar.nc2.stream.NcStreamProto.Variable.getDefaultInstance()) return this; if (other.hasName()) { bitField0_ |= 0x00000001; name_ = other.name_; onChanged(); if (other.hasDataType()) { setDataType(other.getDataType()); if (other.hasUnsigned()) { setUnsigned(other.getUnsigned()); if (other.hasData()) { setData(other.getData()); if (other.hasEnumType()) { bitField0_ |= 0x00000040; enumType_ = other.enumType_; onChanged(); this.mergeUnknownFields(other.getUnknownFields()); return this;
public ucar.nc2.stream.NcStreamProto.Variable buildPartial() { ucar.nc2.stream.NcStreamProto.Variable result = new ucar.nc2.stream.NcStreamProto.Variable(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0;
if (!getNameBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); .computeBytesSize(6, data_); if (!getEnumTypeBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessage.computeStringSize(7, enumType_);
if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(1, getNameBytes()); .computeBytesSize(7, getEnumTypeBytes()); size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size;
public ucar.nc2.stream.NcStreamProto.Variable buildPartial() { ucar.nc2.stream.NcStreamProto.Variable result = new ucar.nc2.stream.NcStreamProto.Variable(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0;
static Variable decodeVar(NetcdfFile ncfile, Group g, Structure parent, NcStreamProto.Variable var) { Variable ncvar = new Variable(ncfile, g, parent, var.getName()); DataType varType = decodeDataType(var.getDataType()); ncvar.setDataType(decodeDataType(var.getDataType())); String enumName = var.getEnumType(); EnumTypedef enumType = g.findEnumeration(enumName); if (enumType != null) for (ucar.nc2.stream.NcStreamProto.Dimension dim : var.getShapeList()) { if (dim.getIsPrivate()) dims.add(new Dimension(dim.getName(), (int) dim.getLength(), false, dim.getIsUnlimited(), dim.getIsVlen())); for (ucar.nc2.stream.NcStreamProto.Attribute att : var.getAttsList()) ncvar.addAttribute(decodeAtt(att)); if (var.getUnsigned()) ncvar.addAttribute(new Attribute(CDM.UNSIGNED, "true")); if (var.hasData()) { ByteBuffer bb = ByteBuffer.wrap(var.getData().toByteArray()); Array data = Array.factory(varType, ncvar.getShape(), bb); ncvar.setCachedData(data, false);
static Variable decodeVar(NetcdfFile ncfile, Group g, Structure parent, NcStreamProto.Variable var) { Variable ncvar = new Variable(ncfile, g, parent, var.getName()); DataType varType = decodeDataType(var.getDataType()); ncvar.setDataType(decodeDataType(var.getDataType())); String enumName = var.getEnumType(); EnumTypedef enumType = g.findEnumeration(enumName); if (enumType != null) for (ucar.nc2.stream.NcStreamProto.Dimension dim : var.getShapeList()) { Dimension ncdim = decodeDim(dim); if (!ncdim.isShared()) for (ucar.nc2.stream.NcStreamProto.Attribute att : var.getAttsList()) ncvar.addAttribute(decodeAtt(att)); if (var.getUnsigned()) ncvar.addAttribute(new Attribute(CDM.UNSIGNED, "true")); if (var.hasData()) { ByteBuffer bb = ByteBuffer.wrap(var.getData().toByteArray()); Array data = Array.factory(varType, ncvar.getShape(), bb); ncvar.setCachedData(data, false);
static Variable decodeVar(NetcdfFile ncfile, Group g, Structure parent, NcStreamProto.Variable var) { Variable ncvar = new Variable(ncfile, g, parent, var.getName()); DataType varType = convertDataType(var.getDataType()); ncvar.setDataType(convertDataType(var.getDataType())); String enumName = var.getEnumType(); EnumTypedef enumType = g.findEnumeration(enumName); if (enumType != null) for (ucar.nc2.stream.NcStreamProto.Dimension dim : var.getShapeList()) { Dimension ncdim = decodeDim(dim); if (!ncdim.isShared()) for (ucar.nc2.stream.NcStreamProto.Attribute att : var.getAttsList()) ncvar.addAttribute(decodeAtt(att)); if (!var.getData().isEmpty()) { ByteBuffer bb = ByteBuffer.wrap(var.getData().toByteArray()); Array data = Array.factory(varType, ncvar.getShape(), bb); ncvar.setCachedData(data, false);
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBytes(1, getNameBytes()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeEnum(2, dataType_.getNumber()); } for (int i = 0; i < shape_.size(); i++) { output.writeMessage(3, shape_.get(i)); } for (int i = 0; i < atts_.size(); i++) { output.writeMessage(4, atts_.get(i)); } if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeBool(5, unsigned_); } if (((bitField0_ & 0x00000008) == 0x00000008)) { output.writeBytes(6, data_); } if (((bitField0_ & 0x00000010) == 0x00000010)) { output.writeBytes(7, getEnumTypeBytes()); } getUnknownFields().writeTo(output); }
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBytes(1, getNameBytes()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeEnum(2, dataType_.getNumber()); } for (int i = 0; i < shape_.size(); i++) { output.writeMessage(3, shape_.get(i)); } for (int i = 0; i < atts_.size(); i++) { output.writeMessage(4, atts_.get(i)); } if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeBool(5, unsigned_); } if (((bitField0_ & 0x00000008) == 0x00000008)) { output.writeBytes(6, data_); } if (((bitField0_ & 0x00000010) == 0x00000010)) { output.writeBytes(7, getEnumTypeBytes()); } getUnknownFields().writeTo(output); }
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getNameBytes().isEmpty()) { com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); } if (dataType_ != ucar.nc2.stream.NcStreamProto.DataType.CHAR.getNumber()) { output.writeEnum(2, dataType_); } for (int i = 0; i < shape_.size(); i++) { output.writeMessage(3, shape_.get(i)); } for (int i = 0; i < atts_.size(); i++) { output.writeMessage(4, atts_.get(i)); } if (unsigned_ != false) { output.writeBool(5, unsigned_); } if (!data_.isEmpty()) { output.writeBytes(6, data_); } if (!getEnumTypeBytes().isEmpty()) { com.google.protobuf.GeneratedMessage.writeString(output, 7, enumType_); } }
public ucar.nc2.stream.NcStreamProto.Variable getDefaultInstanceForType() { return ucar.nc2.stream.NcStreamProto.Variable.getDefaultInstance(); }
public ucar.nc2.stream.NcStreamProto.Variable getDefaultInstanceForType() { return ucar.nc2.stream.NcStreamProto.Variable.getDefaultInstance(); }
/** * <code>required string name = 1;</code> * * <pre> * short name * </pre> */ public Builder clearName() { bitField0_ = (bitField0_ & ~0x00000001); name_ = getDefaultInstance().getName(); onChanged(); return this; } /**
public ucar.nc2.stream.NcStreamProto.Variable getDefaultInstanceForType() { return ucar.nc2.stream.NcStreamProto.Variable.getDefaultInstance(); }
/** * <code>required string name = 1;</code> * * <pre> * short name * </pre> */ public Builder clearName() { bitField0_ = (bitField0_ & ~0x00000001); name_ = getDefaultInstance().getName(); onChanged(); return this; } /**