/** * <code>repeated .Dimension shape = 3;</code> * * <pre> * actual dimension instead of reference * </pre> */ public ucar.nc2.stream.NcStreamProto.Dimension.Builder addShapeBuilder( int index) { return getShapeFieldBuilder().addBuilder( index, ucar.nc2.stream.NcStreamProto.Dimension.getDefaultInstance()); } /**
public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(1, getNameBytes()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream .computeUInt64Size(2, length_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(3, isUnlimited_); } if (((bitField0_ & 0x00000008) == 0x00000008)) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(4, isVlen_); } if (((bitField0_ & 0x00000010) == 0x00000010)) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(5, isPrivate_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; }
com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = break; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable();
com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = break; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable();
e.getMessage()).setUnfinishedMessage(this)); } finally { makeExtensionsImmutable();
Dimension d = g.findDimension(ncdim.getShortName()); if (d == null) throw new IllegalStateException("Can find shared dimension " + dim.getName()); dims.add(d);
Dimension d = g.findDimension(ncdim.getShortName()); if (d == null) throw new IllegalStateException("Can find shared dimension " + dim.getName()); dims.add(d);
if (dim.getIsPrivate()) dims.add(new Dimension(dim.getName(), (int) dim.getLength(), false, dim.getIsUnlimited(), dim.getIsVlen())); else { Dimension d = g.findDimension(dim.getName()); if (d == null) throw new IllegalStateException("Can find shared dimension " + dim.getName()); dims.add(d);
public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(1, getNameBytes()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream .computeUInt64Size(2, length_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(3, isUnlimited_); } if (((bitField0_ & 0x00000008) == 0x00000008)) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(4, isVlen_); } if (((bitField0_ & 0x00000010) == 0x00000010)) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(5, isPrivate_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; }
public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!getNameBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); } if (length_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeUInt64Size(2, length_); } if (isUnlimited_ != false) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(3, isUnlimited_); } if (isVlen_ != false) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(4, isVlen_); } if (isPrivate_ != false) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(5, isPrivate_); } memoizedSize = size; return size; }
public ucar.nc2.stream.NcStreamProto.Dimension buildPartial() { ucar.nc2.stream.NcStreamProto.Dimension result = new ucar.nc2.stream.NcStreamProto.Dimension(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.name_ = name_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } result.length_ = length_; if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000004; } result.isUnlimited_ = isUnlimited_; if (((from_bitField0_ & 0x00000008) == 0x00000008)) { to_bitField0_ |= 0x00000008; } result.isVlen_ = isVlen_; if (((from_bitField0_ & 0x00000010) == 0x00000010)) { to_bitField0_ |= 0x00000010; } result.isPrivate_ = isPrivate_; result.bitField0_ = to_bitField0_; onBuilt(); return result; }
public ucar.nc2.stream.NcStreamProto.Dimension buildPartial() { ucar.nc2.stream.NcStreamProto.Dimension result = new ucar.nc2.stream.NcStreamProto.Dimension(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.name_ = name_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } result.length_ = length_; if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000004; } result.isUnlimited_ = isUnlimited_; if (((from_bitField0_ & 0x00000008) == 0x00000008)) { to_bitField0_ |= 0x00000008; } result.isVlen_ = isVlen_; if (((from_bitField0_ & 0x00000010) == 0x00000010)) { to_bitField0_ |= 0x00000010; } result.isPrivate_ = isPrivate_; result.bitField0_ = to_bitField0_; onBuilt(); return result; }
static Structure decodeStructure(NetcdfFile ncfile, Group g, Structure parent, NcStreamProto.Structure s) { Structure ncvar = (s.getDataType() == ucar.nc2.stream.NcStreamProto.DataType.SEQUENCE) ? new Sequence(ncfile, g, parent, s.getName()) : new Structure(ncfile, g, parent, s.getName()); ncvar.setDataType(convertDataType(s.getDataType())); List<Dimension> dims = new ArrayList<>(6); for (ucar.nc2.stream.NcStreamProto.Dimension dim : s.getShapeList()) { Dimension ncdim = decodeDim(dim); if (!ncdim.isShared()) dims.add(ncdim); else { Dimension d = g.findDimension(ncdim.getShortName()); if (d == null) throw new IllegalStateException("Can find shared dimension " + dim.getName()); dims.add(d); } } ncvar.setDimensions(dims); for (ucar.nc2.stream.NcStreamProto.Attribute att : s.getAttsList()) ncvar.addAttribute(decodeAtt(att)); for (ucar.nc2.stream.NcStreamProto.Variable vp : s.getVarsList()) ncvar.addMemberVariable(decodeVar(ncfile, g, ncvar, vp)); for (NcStreamProto.Structure sp : s.getStructsList()) ncvar.addMemberVariable(decodeStructure(ncfile, g, ncvar, sp)); return ncvar; }
static Structure decodeStructure(NetcdfFile ncfile, Group g, Structure parent, NcStreamProto.Structure s) { Structure ncvar = (s.getDataType() == ucar.nc2.stream.NcStreamProto.DataType.SEQUENCE) ? new Sequence(ncfile, g, parent, s.getName()) : new Structure(ncfile, g, parent, s.getName()); ncvar.setDataType(decodeDataType(s.getDataType())); List<Dimension> dims = new ArrayList<Dimension>(6); for (ucar.nc2.stream.NcStreamProto.Dimension dim : s.getShapeList()) { Dimension ncdim = decodeDim(dim); if (!ncdim.isShared()) dims.add(ncdim); else { Dimension d = g.findDimension(ncdim.getShortName()); if (d == null) throw new IllegalStateException("Can find shared dimension " + dim.getName()); dims.add(d); } } ncvar.setDimensions(dims); for (ucar.nc2.stream.NcStreamProto.Attribute att : s.getAttsList()) ncvar.addAttribute(decodeAtt(att)); for (ucar.nc2.stream.NcStreamProto.Variable vp : s.getVarsList()) ncvar.addMemberVariable(decodeVar(ncfile, g, ncvar, vp)); for (NcStreamProto.Structure sp : s.getStructsList()) ncvar.addMemberVariable(decodeStructure(ncfile, g, ncvar, sp)); return ncvar; }
static Structure decodeStructure(NetcdfFile ncfile, Group g, Structure parent, NcStreamProto.Structure s) { Structure ncvar = (s.getDataType() == ucar.nc2.stream.NcStreamProto.DataType.SEQUENCE) ? new Sequence(ncfile, g, parent, s.getName()) : new Structure(ncfile, g, parent, s.getName()); ncvar.setDataType(decodeDataType(s.getDataType())); List<Dimension> dims = new ArrayList<Dimension>(6); for (ucar.nc2.stream.NcStreamProto.Dimension dim : s.getShapeList()) { if (dim.getIsPrivate() || dim.getIsVlen()) dims.add(new Dimension(dim.getName(), (int) dim.getLength(), false, dim.getIsUnlimited(), dim.getIsVlen())); else { Dimension d = g.findDimension(dim.getName()); if (d == null) throw new IllegalStateException("Can find shared dimension " + dim.getName()); dims.add(d); } } ncvar.setDimensions(dims); for (ucar.nc2.stream.NcStreamProto.Attribute att : s.getAttsList()) ncvar.addAttribute(decodeAtt(att)); for (ucar.nc2.stream.NcStreamProto.Variable vp : s.getVarsList()) ncvar.addMemberVariable(decodeVar(ncfile, g, ncvar, vp)); for (NcStreamProto.Structure sp : s.getStructsList()) ncvar.addMemberVariable(decodeStructure(ncfile, g, ncvar, sp)); return ncvar; }
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.writeUInt64(2, length_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeBool(3, isUnlimited_); } if (((bitField0_ & 0x00000008) == 0x00000008)) { output.writeBool(4, isVlen_); } if (((bitField0_ & 0x00000010) == 0x00000010)) { output.writeBool(5, isPrivate_); } getUnknownFields().writeTo(output); }
public Builder mergeFrom(ucar.nc2.stream.NcStreamProto.Dimension other) { if (other == ucar.nc2.stream.NcStreamProto.Dimension.getDefaultInstance()) return this; if (other.hasName()) { bitField0_ |= 0x00000001; name_ = other.name_; onChanged(); } if (other.hasLength()) { setLength(other.getLength()); } if (other.hasIsUnlimited()) { setIsUnlimited(other.getIsUnlimited()); } if (other.hasIsVlen()) { setIsVlen(other.getIsVlen()); } if (other.hasIsPrivate()) { setIsPrivate(other.getIsPrivate()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
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.writeUInt64(2, length_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeBool(3, isUnlimited_); } if (((bitField0_ & 0x00000008) == 0x00000008)) { output.writeBool(4, isVlen_); } if (((bitField0_ & 0x00000010) == 0x00000010)) { output.writeBool(5, isPrivate_); } getUnknownFields().writeTo(output); }
public Builder mergeFrom(ucar.nc2.stream.NcStreamProto.Dimension other) { if (other == ucar.nc2.stream.NcStreamProto.Dimension.getDefaultInstance()) return this; if (other.hasName()) { bitField0_ |= 0x00000001; name_ = other.name_; onChanged(); } if (other.hasLength()) { setLength(other.getLength()); } if (other.hasIsUnlimited()) { setIsUnlimited(other.getIsUnlimited()); } if (other.hasIsVlen()) { setIsVlen(other.getIsVlen()); } if (other.hasIsPrivate()) { setIsPrivate(other.getIsPrivate()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
public Builder mergeFrom(ucar.nc2.stream.NcStreamProto.Dimension other) { if (other == ucar.nc2.stream.NcStreamProto.Dimension.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; onChanged(); } if (other.getLength() != 0L) { setLength(other.getLength()); } if (other.getIsUnlimited() != false) { setIsUnlimited(other.getIsUnlimited()); } if (other.getIsVlen() != false) { setIsVlen(other.getIsVlen()); } if (other.getIsPrivate() != false) { setIsPrivate(other.getIsPrivate()); } onChanged(); return this; }