protected Group makeRootGroup() { Group root = new Group(this, null, ""); root.setParentGroup(null); return root; }
protected Group makeRootGroup() { Group root = new Group(this, null, ""); // The value of rootGroup will be queried during the course of setParentGroup. // If there's an existing rootGroup that we're trying to replace, it's important that the value of the // field be null for that. rootGroup = null; root.setParentGroup(null); return root; }
protected Group makeRootGroup() { Group root = new Group(this, null, ""); root.setParentGroup(null); return root; }
/** * Constructor * * @param ncfile NetcdfFile owns this Group * @param parent parent of Group. If null, this is the root Group. * @param shortName short name of Group. */ public Group(NetcdfFile ncfile, Group parent, String shortName) { super(shortName); this.ncfile = ncfile; setParentGroup(parent == null ? ncfile.getRootGroup() : parent); }
/** * Constructor * * @param ncfile NetcdfFile owns this Group * @param parent parent of Group. If null, this is the root Group. * @param shortName short name of Group. */ public Group(NetcdfFile ncfile, Group parent, String shortName) { super(shortName); this.ncfile = ncfile; setParentGroup(parent == null ? ncfile.getRootGroup() : parent); }
/** * Constructor * * @param ncfile NetcdfFile owns this Group * @param parent parent of Group. If null, this is the root Group. * @param shortName short name of Group. */ public Group(NetcdfFile ncfile, Group parent, String shortName) { super(shortName); this.ncfile = ncfile; this.attributes = new AttributeContainerHelper(shortName); setParentGroup(parent == null ? ncfile.getRootGroup() : parent); }
/** * Add a nested Group * * @param g add this Group. */ public void addGroup(Group g) { if (immutable) throw new IllegalStateException("Cant modify"); if (findGroup(g.getShortName()) != null) throw new IllegalArgumentException("Group name (" + g.getShortName() + ") must be unique within Group " + getShortName()); groups.add(g); g.setParentGroup(this); // groups are a tree - only one parent }
/** * Add a nested Group * * @param g add this Group. */ public void addGroup(Group g) { if (immutable) throw new IllegalStateException("Cant modify"); if (findGroup(g.getShortName()) != null) throw new IllegalArgumentException("Group name (" + g.getShortName() + ") must be unique within Group " + getShortName()); groups.add(g); g.setParentGroup(this); // groups are a tree - only one parent }
/** * Add a nested Group * * @param g add this Group. */ public void addGroup(Group g) { if (immutable) throw new IllegalStateException("Cant modify"); if (findGroup(g.getShortName()) != null) throw new IllegalArgumentException("Group name (" + g.getShortName() + ") must be unique within Group " + getShortName()); groups.add(g); g.setParentGroup(this); // groups are a tree - only one parent }
if ((vg.group != null) && (vg.group.getParentGroup() == ncfile.getRootGroup())) { addGroupToGroup(group, vg.group, vg); vg.group.setParentGroup(group); } else {
if ((vg.group != null) && (vg.group.getParentGroup() == ncfile.getRootGroup())) { addGroupToGroup(group, vg.group, vg); vg.group.setParentGroup(group); } else {
if ((vg.group != null) && (vg.group.getParentGroup() == ncfile.getRootGroup())) { addGroupToGroup(group, vg.group, vg); vg.group.setParentGroup(group); } else {