@Override public Structure select(List<String> memberNames) { StructureDS result = new StructureDS(getParentGroup(), orgVar); List<Variable> members = new ArrayList<>(); for (String name : memberNames) { Variable m = findVariable(name); if (null != m) members.add(m); } result.setMemberVariables(members); result.isSubset = true; return result; }
@Override public Structure select(List<String> memberNames) { StructureDS result = new StructureDS(getParentGroup(), orgVar); List<Variable> members = new ArrayList<>(); for (String name : memberNames) { Variable m = findVariable(name); if (null != m) members.add(m); } result.setMemberVariables(members); result.isSubset = true; return result; }
@Override public Structure select(List<String> memberNames) { StructureDS result = new StructureDS(getParentGroup(), orgVar); List<Variable> members = new ArrayList<Variable>(); for (String name : memberNames) { Variable m = findVariable(name); if (null != m) members.add(m); } result.setMemberVariables(members); result.isSubset = true; return result; }
/** * Create a StructureDS thats wraps a Structure * * @param g parent group * @param orgVar original Structure */ public StructureDS(Group g, ucar.nc2.Structure orgVar) { // , boolean reparent) { super(orgVar); setParentGroup(g); this.orgVar = orgVar; this.proxy = new EnhancementsImpl(this); // dont share cache, iosp : all IO is delegated this.ncfile = null; this.spiObject = null; createNewCache(); if (orgVar instanceof StructureDS) return; // all member variables must be wrapped, reparented List<Variable> newList = new ArrayList<>(members.size()); for (Variable v : members) { Variable newVar = convertVariable(g, v); newVar.setParentStructure(this); newList.add(newVar); } setMemberVariables(newList); }
/** * Create a StructureDS thats wraps a Structure * * @param g parent group * @param orgVar original Structure */ public StructureDS(Group g, ucar.nc2.Structure orgVar) { // , boolean reparent) { super(orgVar); setParentGroup(g); this.orgVar = orgVar; this.proxy = new EnhancementsImpl(this); // dont share cache, iosp : all IO is delegated this.ncfile = null; this.spiObject = null; createNewCache(); if (orgVar instanceof StructureDS) return; // all member variables must be wrapped, reparented List<Variable> newList = new ArrayList<Variable>(members.size()); for (Variable v : members) { Variable newVar = convertVariable(g, v); newVar.setParentStructure(this); newList.add(newVar); } setMemberVariables(newList); }
/** * Create a StructureDS thats wraps a Structure * * @param g parent group * @param orgVar original Structure */ public StructureDS(Group g, ucar.nc2.Structure orgVar) { // , boolean reparent) { super(orgVar); setParentGroup(g); this.orgVar = orgVar; this.proxy = new EnhancementsImpl(this); // dont share cache, iosp : all IO is delegated this.ncfile = null; this.spiObject = null; createNewCache(); if (orgVar instanceof StructureDS) return; // all member variables must be wrapped, reparented List<Variable> newList = new ArrayList<>(members.size()); for (Variable v : members) { Variable newVar = convertVariable(g, v); newVar.setParentStructure(this); newList.add(newVar); } setMemberVariables(newList); }