public ArrayStructureComposite(StructureMembers members, List<ArrayStructure> c, int total) { super(members, new int[total]); this.compose = c; start = new int[total]; int count = 0; int i = 0; for (ArrayStructure as : compose) { start[i++] = count; count += (int) as.getSize(); } }
public ArrayStructureComposite(StructureMembers members, List<ArrayStructure> c, int total) { super(members, new int[total]); this.compose = c; start = new int[total]; int count = 0; int i = 0; for (ArrayStructure as : compose) { start[i++] = count; count += (int) as.getSize(); } }
public ArrayStructureComposite(StructureMembers members, List<ArrayStructure> c, int total) { super(members, new int[total]); this.compose = c; start = new int[total]; int count = 0; int i = 0; for (ArrayStructure as : compose) { start[i++] = count; count += (int) as.getSize(); } }
/** * DO NOT USE, throws UnsupportedOperationException */ public Array createView(Index index) { if (index.getSize() == getSize()) return this; throw new UnsupportedOperationException(); }
SequenceIterator(String CE) throws java.io.IOException { // nothin better to do for now !! structArray = (ArrayStructure) read(); nrows = (int) structArray.getSize(); }
public void showInternal(Formatter f, Indent indent) { f.format("%sArrayStructure %s size=%d class=%s hash=0x%x%n", indent, members.getName(), getSize(), this.getClass().getName(), hashCode()); }
public void showInternal(Formatter f, String leadingSpace) { f.format("%sArrayStructure %s size=%d class=%s hash=0x%x%n", leadingSpace, members.getName(), getSize(), this.getClass().getName(), hashCode()); }
public void showInternal(Formatter f, Indent indent) { f.format("%sArrayStructure %s size=%d class=%s hash=0x%x%n", indent, members.getName(), getSize(), this.getClass().getName(), hashCode()); }
Table(NetcdfFile f) throws IOException { this.f = f; this.structure = structure(); this.rows = structure.getSize(); this.types = getColTypes(); trace("Column types: %s", this.types); }
private void readNextGeneralRank() throws IOException { try { Section section = new Section(shape); section.setRange( 0, new Range(outerCount, outerCount)); as = (ArrayStructure) read( section); if (NetcdfFile.debugStructureIterator) System.out.println("readNext inner="+outerCount+" total="+outerCount); outerCount++; } catch (InvalidRangeException e) { log.error("Structure.Iterator.readNext() ",e); throw new IllegalStateException("Structure.Iterator.readNext() ",e); } // cant happen readStart += as.getSize(); readCount = 0; }
public List getData(CancelTask cancel) throws IOException { String CE = outerSequence.getFullName(); ArrayStructure as = (ArrayStructure) dodsFile.readWithCE(outerSequence, CE); extractMembers(as); int n = (int) as.getSize(); List<SeqPointObs> dataList = new ArrayList<SeqPointObs>(n); for (int i=0; i<n; i++) dataList.add( new SeqPointObs( i, as.getStructureData(i))); return dataList; }
public List getData(CancelTask cancel) throws IOException { String CE = sequenceOuter.getShortName(); ArrayStructure as = (ArrayStructure) dodsFile.readWithCE(sequenceOuter, CE); extractMembers(as); int n = (int) as.getSize(); ArrayList dataList = new ArrayList(n); for (int i=0; i<n; i++) dataList.add( new SeqPointObs( i, as.getStructureData(i))); return dataList; }
TableArrayStructure(NetcdfDataset ds, TableConfig config) { super(ds, config); this.as = config.as; this.dim = new Dimension(config.structName, (int) config.as.getSize(), false); assert (this.as != null); for (StructureMembers.Member m : config.as.getStructureMembers().getMembers()) cols.add(new VariableSimpleAdapter(m)); }
TableArrayStructure(NetcdfDataset ds, TableConfig config) { super(ds, config); assert (config.as != null); this.as = config.as; this.dim = new Dimension(config.structName, (int) config.as.getSize(), false); for (StructureMembers.Member m : config.as.getStructureMembers().getMembers()) cols.put(m.getName(), new VariableSimpleAdapter(m)); }
public List getData(LatLonRect boundingBox, CancelTask cancel) throws IOException { String CE = outerSequence.getFullName() + "&" + makeBB( boundingBox); ArrayStructure as = (ArrayStructure) dodsFile.readWithCE(outerSequence, CE); extractMembers(as); int n = (int) as.getSize(); ArrayList dataList = new ArrayList(n); for (int i=0; i<n; i++) dataList.add( new SeqPointObs( i, as.getStructureData(i))); return dataList; }
public List getData(LatLonRect boundingBox, CancelTask cancel) throws IOException { String CE = sequenceOuter.getShortName() + "&" + makeBB( boundingBox); ArrayStructure as = (ArrayStructure) dodsFile.readWithCE(sequenceOuter, CE); extractMembers(as); int n = (int) as.getSize(); ArrayList dataList = new ArrayList(n); for (int i=0; i<n; i++) dataList.add( new SeqPointObs( i, as.getStructureData(i))); return dataList; }
TableArrayStructure(NetcdfDataset ds, TableConfig config) { super(ds, config); assert (config.as != null); this.as = config.as; this.dim = new Dimension(config.structName, (int) config.as.getSize(), false); for (StructureMembers.Member m : config.as.getStructureMembers().getMembers()) cols.put(m.getName(), new VariableSimpleAdapter(m)); }
public List getData(LatLonRect boundingBox, Date start, Date end, CancelTask cancel) throws IOException { String CE = sequenceOuter.getShortName() + "&" + makeBB( boundingBox) + "&"+ makeTimeRange( start, end); ArrayStructure as = (ArrayStructure) dodsFile.readWithCE(sequenceOuter, CE); extractMembers(as); int n = (int) as.getSize(); ArrayList dataList = new ArrayList(n); for (int i=0; i<n; i++) dataList.add( new SeqPointObs( i, as.getStructureData(i))); return dataList; }
public List getData(LatLonRect boundingBox, Date start, Date end, CancelTask cancel) throws IOException { String CE = outerSequence.getFullName() + "&" + makeBB( boundingBox) + "&"+ makeTimeRange( start, end); ArrayStructure as = (ArrayStructure) dodsFile.readWithCE(outerSequence, CE); extractMembers(as); int n = (int) as.getSize(); ArrayList dataList = new ArrayList(n); for (int i=0; i<n; i++) dataList.add( new SeqPointObs( i, as.getStructureData(i))); return dataList; }
private void addTime(ArrayStructure as) throws IOException { int n = (int) as.getSize(); Array timeData = Array.factory(double.class, new int[]{n}); IndexIterator ii = timeData.getIndexIterator(); StructureDataIterator iter = as.getStructureDataIterator(); while (iter.hasNext()) ii.setDoubleNext(construct.makeObsTimeValue(iter.next())); StructureMembers.Member m = as.findMember(ConstructNC.TIME_NAME); m.setDataArray(timeData); }