ucar.nc2.ft.point.standard
Class Table.TableMultiDimInner

java.lang.Object
  extended by ucar.nc2.ft.point.standard.Table
      extended by ucar.nc2.ft.point.standard.Table.TableMultiDimInner
Enclosing class:
Table

public static class Table.TableMultiDimInner
extends Table

A collection of Multdimensional Variables:

Variable stn(outDim) Variable v1(outDim, innerDim, ...) Variable v2(outDim, innerDim)

can be thought of as a structure:

Structure { stn; v1(innerDim, ...) v2(innerDim); } so(outerDim);

and as nested structures:

Structure { stn; Structure { v1(...), v2 } si(innerDim); } so(outerDim);

1) When outerDim is the record variable, (ie it really is a structure) it makes sense to read the entire record at once:

Structure { v1(innerDim, ...) v2(innerDim); stn; } so(outerDim);

and return the StructureData with the inner variables removed:

StructureData { stn1; stn2 } so(outerDim);

LOOK (This may be hard, when is subset done ?? since inner need access to other members)

And for the inner iterator, given the original StructureData for outerDim=fixed

StructureData { v1(innerDim, ...) v2(innerDim); stn; } so(outerDim=fixed);

rearrange it into an ArrayStructure:

ArrayStructure(innerDim) { StructureData { v1(...); v2; } }

Use Table types MultdimOuter, MultidimInner for this case

2) When its not, it makes sense to read the outer variables seperately:

outer iterator is over outDim

Variable stn1(outDim) Variable stn2(outDim)

inner iterator over innerDim:

Variable v1(outDim=fixed, innerDim, ...) Variable v2(outDim=fixed, innerDim)

Use Table types Structure(psuedo, with vars set), TableMultiDimStructure (psuedo) for this case


Nested Class Summary
 
Nested classes/interfaces inherited from class ucar.nc2.ft.point.standard.Table
Table.CoordName, Table.TableArrayStructure, Table.TableConstruct, Table.TableContiguous, Table.TableLinkedList, Table.TableMultiDimInner, Table.TableMultiDimStructure, Table.TableMultiDimStructurePsuedo, Table.TableNestedStructure, Table.TableParentIndex, Table.TableSingleton, Table.TableStructure, Table.TableTop, Table.Type
 
Method Summary
 Variable findVariable(java.lang.String axisName)
           
 StructureDataIterator getStructureDataIterator(Cursor cursor, int bufferSize)
          Iterate over the rows of this table.
 java.lang.String showDimension()
           
protected  void showTableExtraInfo(java.lang.String indent, java.util.Formatter f)
           
 
Methods inherited from class ucar.nc2.ft.point.standard.Table
factory, getDataVariables, getFeatureType, getName, show, showAll, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

showTableExtraInfo

protected void showTableExtraInfo(java.lang.String indent,
                                  java.util.Formatter f)
Specified by:
showTableExtraInfo in class Table

showDimension

public java.lang.String showDimension()
Overrides:
showDimension in class Table

findVariable

public Variable findVariable(java.lang.String axisName)
Overrides:
findVariable in class Table

getStructureDataIterator

public StructureDataIterator getStructureDataIterator(Cursor cursor,
                                                      int bufferSize)
                                               throws java.io.IOException
Description copied from class: Table
Iterate over the rows of this table. Subclasses must implement this.

Specified by:
getStructureDataIterator in class Table
Parameters:
cursor - state of comlpete iteration. Table implementations may not modify.
bufferSize - hit on how much memory (in bytes) can be used to buffer.
Returns:
iterater over the rows of this table.
Throws:
java.io.IOException - on read error