/** * Find first nested structure * @param s in this structure * @return first nested structure or null */ static public Structure findNestedStructure(Structure s) { for (Variable v : s.getVariables()) { if ((v instanceof Structure)) return (Structure) v; } return null; }
/** * Find first nested structure * @param s in this structure * @return first nested structure or null */ static public Structure findNestedStructure(Structure s) { for (Variable v : s.getVariables()) { if ((v instanceof Structure)) return (Structure) v; } return null; }
/** * Find first nested structure * @param s in this structure * @return first nested structure or null */ static public Structure findNestedStructure(Structure s) { for (Variable v : s.getVariables()) { if ((v instanceof Structure)) return (Structure) v; } return null; }
TableNestedStructure(NetcdfDataset ds, TableConfig config) { super(ds, config); this.nestedTableName = config.nestedTableName; struct = (Structure) ds.findVariable(config.structName); assert (struct != null) : config.structName; for (Variable v : struct.getVariables()) cols.add(v); }
private void dumpVariables(List<Variable> vars, PrintWriter out) { for (Variable v : vars) { out.print(" " + v.getFullName() + " " + v.getClass().getName()); // +" "+Integer.toHexString(v.hashCode())); if (v instanceof CoordinateAxis) out.println(" " + ((CoordinateAxis) v).getAxisType()); else out.println(); if (v instanceof Structure) dumpVariables(((Structure) v).getVariables(), out); } }
TableNestedStructure(NetcdfDataset ds, TableConfig config) { super(ds, config); this.nestedTableName = config.nestedTableName; struct = (Structure) ds.findVariable(config.structName); assert (struct != null) : config.structName; for (Variable v : struct.getVariables()) cols.put(v.getShortName(), v); }
private void dumpVariables(List<Variable> vars, PrintStream out) { for (Variable v : vars) { out.print(" " + v.getFullName() + " " + v.getClass().getName()); // +" "+Integer.toHexString(v.hashCode())); if (v instanceof CoordinateAxis) out.println(" " + ((CoordinateAxis) v).getAxisType()); else out.println(); if (v instanceof Structure) dumpVariables(((Structure) v).getVariables(), out); } }
TableNestedStructure(NetcdfDataset ds, TableConfig config) { super(ds, config); this.nestedTableName = config.nestedTableName; struct = (Structure) ds.findVariable(config.structName); assert (struct != null) : config.structName; for (Variable v : struct.getVariables()) cols.put(v.getShortName(), v); }
private void addVariables(NetcdfDataset ncDataset, List<Variable> varList, List<VarProcess> varProcessList) { for (Variable v : varList) { varProcessList.add(new VarProcess(ncDataset, v)); if (v instanceof Structure) { List<Variable> nested = ((Structure) v).getVariables(); addVariables(ncDataset, nested, varProcessList); } } }
private void addVariables(NetcdfDataset ncDataset, List<Variable> varList, List<VarProcess> varProcessList) { for (Variable v : varList) { varProcessList.add(new VarProcess(ncDataset, v)); if (v instanceof Structure) { List<Variable> nested = ((Structure) v).getVariables(); addVariables(ncDataset, nested, varProcessList); } } }
private void addVariables(NetcdfDataset ncDataset, List<Variable> varList, List<VarProcess> varProcessList) { for (Variable v : varList) { varProcessList.add(new VarProcess(ncDataset, v)); if (v instanceof Structure) { List<Variable> nested = ((Structure) v).getVariables(); addVariables(ncDataset, nested, varProcessList); } } }
private void findAxes(List<Variable> vars) { for (Variable v : vars) { checkIfAxis(v); if (v instanceof Structure) { List<Variable> nested = ((Structure) v).getVariables(); findAxes(nested); } } }
private void findAxes(List<Variable> vars) { for (Variable v : vars) { checkIfAxis(v); if (v instanceof Structure) { List<Variable> nested = ((Structure) v).getVariables(); findAxes(nested); } } }
private void findAxes(List<Variable> vars) { for (Variable v : vars) { checkIfAxis(v); if (v instanceof Structure) { List<Variable> nested = ((Structure) v).getVariables(); findAxes(nested); } } }
CatIterator(Entry[] entries, Structure useStructure) { this.entries = entries; members = useStructure.makeStructureMembers(); for (Variable v2 : useStructure.getVariables()) { Vinfo vinfo = (Vinfo) v2.getSPobject(); StructureMembers.Member m = members.findMember(v2.getShortName()); m.setDataParam(vinfo.offset); } }
private StructureData readStructure(Structure s, ArrayStructureW asw, long dataPos) throws IOException, InvalidRangeException { StructureDataW sdata = new StructureDataW(asw.getStructureMembers()); if (debug) System.out.println(" readStructure " + s.getFullName() + " dataPos = " + dataPos); for (Variable v2 : s.getVariables()) { H5header.Vinfo vinfo = (H5header.Vinfo) v2.getSPobject(); if (debug) System.out.println(" readStructureMember " + v2.getFullName() + " vinfo = " + vinfo); Array dataArray = readData(v2, dataPos + vinfo.dataPos, v2.getShapeAsSection()); sdata.setMemberData(v2.getShortName(), dataArray); } return sdata; }
CatIterator(Entry[] entries, Structure useStructure) { this.entries = entries; members = useStructure.makeStructureMembers(); for (Variable v2 : useStructure.getVariables()) { Vinfo vinfo = (Vinfo) v2.getSPobject(); StructureMembers.Member m = members.findMember(v2.getShortName()); m.setDataParam(vinfo.offset); } }
CatIterator(Entry[] entries, Structure useStructure) { this.entries = entries; members = useStructure.makeStructureMembers(); for (Variable v2 : useStructure.getVariables()) { Vinfo vinfo = (Vinfo) v2.getSPobject(); StructureMembers.Member m = members.findMember(v2.getShortName()); m.setDataParam(vinfo.offset); } }
private StructureData readStructure(Structure s, ArrayStructureW asw, long dataPos) throws IOException, InvalidRangeException { StructureDataW sdata = new StructureDataW(asw.getStructureMembers()); if (debug) System.out.println(" readStructure " + s.getFullName() + " dataPos = " + dataPos); for (Variable v2 : s.getVariables()) { H5header.Vinfo vinfo = (H5header.Vinfo) v2.getSPobject(); if (debug) System.out.println(" readStructureMember " + v2.getFullName() + " vinfo = " + vinfo); Array dataArray = readData(v2, dataPos + vinfo.dataPos, v2.getShapeAsSection()); sdata.setMemberData(v2.getShortName(), dataArray); } return sdata; }
private StructureData readStructure(Structure s, ArrayStructureW asw, long dataPos) throws IOException, InvalidRangeException { StructureDataW sdata = new StructureDataW(asw.getStructureMembers()); if (debug) System.out.println(" readStructure " + s.getFullName() + " dataPos = " + dataPos); for (Variable v2 : s.getVariables()) { H5header.Vinfo vinfo = (H5header.Vinfo) v2.getSPobject(); if (debug) System.out.println(" readStructureMember " + v2.getFullName() + " vinfo = " + vinfo); Array dataArray = readData(v2, dataPos + vinfo.dataPos, v2.getShapeAsSection()); sdata.setMemberData(v2.getShortName(), dataArray); } return sdata; }