static public String getDAPName(String name, Variable context) { if (RC.getUseGroups()) { // leave off leading '/' for root entries Group xg = context.getParentGroup(); if (!xg.isRoot()) { // Get the list of parent groups List<Group> path = Group.collectPath(xg); Formatter dapname = new Formatter(); for (int i = 1; i < path.size(); i++) { // start at 1 to skip root group Group g = path.get(i); dapname.format("/%s", g.getShortName()); } dapname.format("/%s", name); name = dapname.toString(); } } return name; }
static public String getDAPName(String name, Variable context) { if (RC.getUseGroups()) { // leave off leading '/' for root entries Group xg = context.getParentGroup(); if (!xg.isRoot()) { // Get the list of parent groups List<Group> path = Group.collectPath(xg); Formatter dapname = new Formatter(); for (int i = 1; i < path.size(); i++) { // start at 1 to skip root group Group g = path.get(i); dapname.format("/%s", g.getShortName()); } dapname.format("/%s", name); name = dapname.toString(); } } return name; }
static public String getDAPName(String name, Variable context) { if(RC.getUseGroups()) { // leave off leading '/' for root entries Group xg = context.getParentGroup(); if(!xg.isRoot()) { // Get the list of parent groups List<Group> path = Group.collectPath(xg); StringBuilder dapname = new StringBuilder(); for(int i=1;i<path.size();i++) { // start at 1 to skip root group Group g = path.get(i); dapname.append("/"+g.getShortName()); } dapname.append("/" + name); name = dapname.toString(); } } return name; }
Group computeGroup(String path, Variable v, Group parentGroup/*Ostensibly*/) { if (parentGroup == null) parentGroup = getRootGroup(); if (RC.getUseGroups()) { // If the path has '/' in it, then we need to insert // this variable into the proper group and rename it. However, // if this variable is within a structure, we cannot do it. if (v.getParentStructure() == null) { // HACK: Since only the grid array is used in converting // to netcdf-3, we look for group info on the array. String dodsname = v.getDODSName(); int sindex = dodsname.indexOf('/'); if (sindex >= 0) { assert (parentGroup != null); Group g = parentGroup.makeRelativeGroup(this, dodsname, true/*ignorelast*/); parentGroup = g; if (OLDGROUPCODE) { // change variable's name dodsname = dodsname.substring(dodsname.lastIndexOf('/') + 1); v.setName(dodsname); // change name } } } } return parentGroup; }
if (RC.getUseGroups() && dodsV.bt instanceof DGrid) { DodsV array = dodsV.findByIndex(0); if (array != null) {
if (RC.getUseGroups()) { if (name.indexOf('/') >= 0) {// place dimension in proper group group = group.makeRelativeGroup(this, name, true);
if (cancelTask != null && cancelTask.isCancel()) return; if (RC.getUseGroups()) { try { reGroup();
throws DAP2Exception assert (RC.getUseGroups()); Group rootgroup = this.getRootGroup();