/** * Get the index-th StructureData of this ArrayStructure. * * @param index which one to get, specified by an integer. * @return object of type StructureData. */ public Object getObject(int index) { return getStructureData(index); }
@Override public StructureData next() throws IOException { StructureData result = abb.getStructureData(start + count); count++; return result; }
@Override public StructureData next() throws IOException { StructureData result = abb.getStructureData(start + count); count++; return result; }
/** * Get the index-th StructureData of this ArrayStructure. * * @param index which one to get, specified by an integer. * @return object of type StructureData. */ public Object getObject(int index) { return getStructureData(index); }
/** * Get member data of type Structure. * @param m get data from this StructureMembers.Member. Must be of type Structure. * @return StructureData */ public StructureData getScalarStructure(StructureMembers.Member m) { ArrayStructure data = (ArrayStructure) getArray(m); return data.getStructureData(0); }
@Override public StructureData next() throws IOException { if (count >= readStart) { readNext(); } count++; return as.getStructureData( readCount++); }
@Override public StructureData next() throws IOException { if (count >= readStart) { readNext(); } count++; return as.getStructureData( readCount++); }
public StructureData getJoinData(Cursor cursor) { StructureData sdata = cursor.tableData[0]; // LOOK ?? int index = sdata.getScalarInt(parentIndex); return parentData.getStructureData(index); }
@Override public StructureData next() throws IOException { if (count >= readStart) readNextGeneralRank(); count++; return as.getStructureData( readCount++); }
/** * Get member data of type Structure. * @param m get data from this StructureMembers.Member. Must be of type Structure. * @return StructureData */ public StructureData getScalarStructure(StructureMembers.Member m) { ArrayStructure data = (ArrayStructure) getArray(m); return data.getStructureData(0); }
public StructureData getJoinData(Cursor cursor) { StructureData sdata = cursor.tableData[0]; // LOOK ?? int index = sdata.getScalarInt(parentIndex); return parentData.getStructureData(index); }
@Override public StructureData next() throws IOException { if (count >= readStart) readNextGeneralRank(); count++; return as.getStructureData( readCount++); }
/** * Get the index-th StructureData of this ArrayStructure. * * @param i which one to get, specified by an Index. * @return object of type StructureData. */ public StructureData getStructureData(Index i) { return getStructureData(i.currentElement()); }
/** * Use this when this is a scalar Structure. Its the same as read(), but it extracts the single * StructureData out of the Array. * @return StructureData for a scalar * @throws java.io.IOException on read error */ public StructureData readStructure() throws IOException { if (getRank() != 0) throw new java.lang.UnsupportedOperationException("not a scalar structure"); Array dataArray = read(); ArrayStructure data = (ArrayStructure) dataArray; return data.getStructureData(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; }
/** * Get member data of type Structure. * @param recnum get data from the recnum-th StructureData of the ArrayStructure. Must be less than getSize(); * @param m get data from this StructureMembers.Member. Must be of type Structure. * @return scalar StructureData */ public StructureData getScalarStructure(int recnum, StructureMembers.Member m) { if (m.getDataType() != DataType.STRUCTURE) throw new IllegalArgumentException("Type is " + m.getDataType() + ", must be Structure"); ArrayStructure data = (ArrayStructure) m.getDataArray(); return data.getStructureData(recnum * m.getSize()); // gets first in the array }
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; }
/** * Get member data of type Structure. * @param recnum get data from the recnum-th StructureData of the ArrayStructure. Must be less than getSize(); * @param m get data from this StructureMembers.Member. Must be of type Structure. * @return scalar StructureData */ public StructureData getScalarStructure(int recnum, StructureMembers.Member m) { if (m.getDataType() != DataType.STRUCTURE) throw new IllegalArgumentException("Type is " + m.getDataType() + ", must be Structure"); ArrayStructure data = (ArrayStructure) m.getDataArray(); return data.getStructureData(recnum * m.getSize()); // gets first in the array }
static private ArrayStructure sectionArrayStructure(ParsedSectionSpec child, ArrayStructure innerData, StructureMembers.Member m) throws IOException, InvalidRangeException { StructureMembers membersw = new StructureMembers(m.getStructureMembers()); // no data arrays get propagated ArrayStructureW result = new ArrayStructureW(membersw, child.section.getShape()); int count = 0; Section.Iterator iter = child.section.getIterator(child.v.getShape()); while (iter.hasNext()) { int recno = iter.next(); StructureData sd = innerData.getStructureData(recno); result.setStructureData(sd, count++); } return result; }
static private ArrayStructure sectionArrayStructure(ParsedSectionSpec child, ArrayStructure innerData, StructureMembers.Member m) throws IOException, InvalidRangeException { StructureMembers membersw = new StructureMembers(m.getStructureMembers()); // no data arrays get propagated ArrayStructureW result = new ArrayStructureW(membersw, child.section.getShape()); int count = 0; Section.Iterator iter = child.section.getIterator(child.v.getShape()); while (iter.hasNext()) { int recno = iter.next(null); StructureData sd = innerData.getStructureData(recno); result.setStructureData(sd, count++); } return result; }