public static boolean getEosInfo(NetcdfFile ncfile, Group eosGroup, Formatter f) throws IOException { String smeta = getStructMetadata(eosGroup); if (smeta == null) { f.format("No StructMetadata variables in group %s %n", eosGroup.getFullName()); return false; } f.format("raw = %n%s%n", smeta); ODLparser parser = new ODLparser(); parser.parseFromString(smeta); // now we have the ODL in JDOM elements StringWriter sw = new StringWriter(5000); parser.showDoc(new PrintWriter(sw)); f.format("parsed = %n%s%n", sw.toString()); return true; }
void makeChildren() { children = new ArrayList<>(); List dims = group.getDimensions(); for (int i = 0; i < dims.size(); i++) children.add(new DimensionNode(this, (Dimension) dims.get(i))); List vars = group.getVariables(); for (int i = 0; i < vars.size(); i++) children.add(new VariableNode(this, (VariableIF) vars.get(i))); List groups = group.getGroups(); for (int i = 0; i < groups.size(); i++) children.add(new GroupNode(this, (Group) groups.get(i))); if (debugTree) System.out.println("children=" + group.getFullName() + " "); }
public int getIndex(TreeNode child) { if (debugTree) System.out.println("getIndex=" + group.getFullName() + " " + child); return children.indexOf(child); }
GroupNode(GroupNode parent, Group group) { this.parent = parent; this.group = group; if (debugTree) System.out.println("new=" + group.getFullName() + " "); // firePropertyChangeEvent(new PropertyChangeEvent(this, "TreeNode", null, group)); }