/** * Add a EnumTypedef to the file. Must be in define mode. * @param g the group to add to. if null, use root group * @param td the EnumTypedef. * @return the created attribute */ public EnumTypedef addTypedef(Group g, EnumTypedef td) { if (!defineMode) throw new UnsupportedOperationException("not in define mode"); g.addEnumeration(td); return td; }
/** * Add a EnumTypedef to the file. Must be in define mode. * * @param g the group to add to. if null, use root group * @param td the EnumTypedef. * @return the created attribute */ public EnumTypedef addTypedef(Group g, EnumTypedef td) { if (!defineMode) throw new UnsupportedOperationException("not in define mode"); if (!version.isExtendedModel()) throw new IllegalArgumentException("Enum type only supported in extended model, this version is="+version); g.addEnumeration(td); return td; }
/** * Add a EnumTypedef to the file. Must be in define mode. * * @param g the group to add to. if null, use root group * @param td the EnumTypedef. * @return the created attribute */ public EnumTypedef addTypedef(Group g, EnumTypedef td) { if (!defineMode) throw new UnsupportedOperationException("not in define mode"); if (!version.isExtendedModel()) throw new IllegalArgumentException("Enum type only supported in extended model, this version is="+version); g.addEnumeration(td); return td; }
if (enumTypedef == null) { enumTypedef = new EnumTypedef(facadeNested.name, facadeNested.dobj.mdt.map); ncGroup.addEnumeration(enumTypedef); if (enumTypedef == null) { enumTypedef = new EnumTypedef(facadeNested.name, facadeNested.dobj.mdt.map); ncGroup.addEnumeration(enumTypedef);
ncFile.getRootGroup().addEnumeration(dessertType);
Map<Integer, String> map = makeEnum(grpid, typeid); ut.e = new EnumTypedef(name, map, ut.getEnumBaseType()); g.addEnumeration(ut.e);
private void convertGroup(Group g, Group from) { for (EnumTypedef et : from.getEnumTypedefs()) g.addEnumeration(et); for (Dimension d : from.getDimensions()) g.addDimension(new Dimension(d.getShortName(), d)); for (Attribute a : from.getAttributes()) g.addAttribute(a); for (Variable v : from.getVariables()) g.addVariable(convertVariable(g, v)); for (Group nested : from.getGroups()) { Group nnested = new Group(this, g, nested.getShortName()); g.addGroup(nnested); convertGroup(nnested, nested); } }
private void convertGroup(Group g, Group from) { for (EnumTypedef et : from.getEnumTypedefs()) g.addEnumeration(et); for (Dimension d : from.getDimensions()) g.addDimension(new Dimension(d.getShortName(), d)); for (Attribute a : from.getAttributes()) g.addAttribute(a); for (Variable v : from.getVariables()) g.addVariable(convertVariable(g, v)); for (Group nested : from.getGroups()) { Group nnested = new Group(this, g, nested.getShortName()); g.addGroup(nnested); convertGroup(nnested, nested); } }
private void convertGroup(Group g, Group from) { for (EnumTypedef et : from.getEnumTypedefs()) g.addEnumeration(et); for (Dimension d : from.getDimensions()) g.addDimension(new Dimension(d.getShortName(), d)); for (Attribute a : from.getAttributes()) g.addAttribute(a); for (Variable v : from.getVariables()) g.addVariable(convertVariable(g, v)); for (Group nested : from.getGroups()) { Group nnested = new Group(this, g, nested.getShortName()); g.addGroup(nnested); convertGroup(nnested, nested); } }
Map<Integer, String> map = makeEnum(grpid, typeid); EnumTypedef e = new EnumTypedef(name, map); g.addEnumeration(e); ut.setEnum(e);
Map<Integer, String> map = makeEnum(grpid, typeid); ut.e = new EnumTypedef(name, map, ut.getEnumBaseType()); g.addEnumeration(ut.e);
static void readGroup(NcStreamProto.Group proto, NetcdfFile ncfile, Group g) throws InvalidProtocolBufferException { for (NcStreamProto.Dimension dim : proto.getDimsList()) g.addDimension(NcStream.decodeDim(dim)); for (NcStreamProto.Attribute att : proto.getAttsList()) g.addAttribute(NcStream.decodeAtt(att)); for (NcStreamProto.EnumTypedef enumType : proto.getEnumTypesList()) g.addEnumeration(NcStream.decodeEnumTypedef(enumType)); for (NcStreamProto.Variable var : proto.getVarsList()) g.addVariable(NcStream.decodeVar(ncfile, g, null, var)); for (NcStreamProto.Structure s : proto.getStructsList()) g.addVariable(NcStream.decodeStructure(ncfile, g, null, s)); for (NcStreamProto.Group gp : proto.getGroupsList()) { Group ng = new Group(ncfile, g, gp.getName()); g.addGroup(ng); readGroup(gp, ncfile, ng); } }
static void readGroup(NcStreamProto.Group proto, NetcdfFile ncfile, Group g) throws InvalidProtocolBufferException { for (NcStreamProto.Dimension dim : proto.getDimsList()) g.addDimension(NcStream.decodeDim(dim)); for (NcStreamProto.Attribute att : proto.getAttsList()) g.addAttribute(NcStream.decodeAtt(att)); for (NcStreamProto.EnumTypedef enumType : proto.getEnumTypesList()) g.addEnumeration(NcStream.decodeEnumTypedef(enumType)); for (NcStreamProto.Variable var : proto.getVarsList()) g.addVariable(NcStream.decodeVar(ncfile, g, null, var)); for (NcStreamProto.Structure s : proto.getStructsList()) g.addVariable(NcStream.decodeStructure(ncfile, g, null, s)); for (NcStreamProto.Group gp : proto.getGroupsList()) { Group ng = new Group(ncfile, g, gp.getName()); g.addGroup(ng); readGroup(gp, ncfile, ng); } }
static void readGroup(NcStreamProto.Group proto, NetcdfFile ncfile, Group g) throws InvalidProtocolBufferException { for (NcStreamProto.Dimension dim : proto.getDimsList()) g.addDimension(NcStream.decodeDim(dim)); for (NcStreamProto.Attribute att : proto.getAttsList()) g.addAttribute(NcStream.decodeAtt(att)); for (NcStreamProto.EnumTypedef enumType : proto.getEnumTypesList()) g.addEnumeration(NcStream.decodeEnumTypedef(enumType)); for (NcStreamProto.Variable var : proto.getVarsList()) g.addVariable(NcStream.decodeVar(ncfile, g, null, var)); for (NcStreamProto.Structure s : proto.getStructsList()) g.addVariable(NcStream.decodeStructure(ncfile, g, null, s)); for (NcStreamProto.Group gp : proto.getGroupsList()) { Group ng = new Group(ncfile, g, gp.getName()); g.addGroup(ng); readGroup(gp, ncfile, ng); } }
if (enumTypedef == null) { enumTypedef = new EnumTypedef(ct.getName(), ct.getMap()); g.addEnumeration(enumTypedef);
targetGroup.addGroup(nested); for (EnumTypedef et : srcNested.getEnumTypedefs()) { targetGroup.addEnumeration(et);
targetGroup.addGroup(nested); for (EnumTypedef et : srcNested.getEnumTypedefs()) { targetGroup.addEnumeration(et);
targetGroup.addGroup(nested); for (EnumTypedef et : srcNested.getEnumTypedefs()) { targetGroup.addEnumeration(et);