public class Sequence extends Structure
| Modifier and Type | Class and Description |
|---|---|
static class |
Sequence.Builder<T extends Sequence.Builder<T>>
A builder of Sequences
|
defaultCoordsSizeToCache, defaultSizeToCache, permitCaching| Modifier and Type | Method and Description |
|---|---|
static Sequence.Builder<?> |
builder()
Get Builder for this class that allows subclassing.
|
StructureDataIterator |
getStructureIterator(int bufferSize)
Get an efficient iterator over all the data in the Structure.
|
Array |
read(int[] origin,
int[] shape)
Read a section of the data for this Variable and return a memory resident Array.
|
Array |
read(java.util.List<Range> ranges)
Read a section of the data for this Variable from the netcdf file and return a memory resident Array.
|
Array |
read(Section section)
Read a section of the data for this Variable from the netcdf file and return a memory resident Array.
|
Array |
read(java.lang.String sectionSpec)
Read data section specified by a "section selector", and return a memory resident Array.
|
StructureData |
readStructure()
Use this when this is a scalar Structure.
|
StructureData |
readStructure(int index)
Use this when this is a one dimensional array of Structures, or you are doing the index calculation yourself for
a multidimension array.
|
ArrayStructure |
readStructure(int start,
int count)
For rank 1 array of Structures, read count Structures and return the data as an ArrayStructure.
|
Variable |
section(Section subsection)
Create a new Variable that is a logical subsection of this Variable.
|
Variable |
slice(int dim,
int value)
Create a new Variable that is a logical slice of this Variable, by
fixing the specified dimension at the specified index value.
|
Sequence.Builder<?> |
toBuilder()
Turn into a mutable Builder.
|
findVariable, getElementSize, getNameAndAttributes, getNumberOfMemberVariables, getStructureIterator, getVariableNames, getVariables, isCaching, isSubset, makeStructureMembers, select, select, setCachingattributes, compareTo, createNewCache, equals, findAttribute, findAttributeString, findDimensionIndex, getDatasetLocation, getDataType, getDescription, getDimension, getDimensions, getDimensionsString, getEnumTypedef, getFileTypeId, getFullName, getNameAndDimensions, getNameAndDimensions, getNameAndDimensions, getNetcdfFile, getParentGroup, getParentStructure, getRanges, getRank, getShape, getShape, getShapeAsSection, getSize, getSizeToCache, getSPobject, getUnitsString, hasCachedData, hashCode, isCoordinateVariable, isMemberOfStructure, isMetadata, isScalar, isUnlimited, isVariableLength, lookupEnumString, read, readScalarByte, readScalarDouble, readScalarFloat, readScalarInt, readScalarLong, readScalarShort, readScalarString, readToStream, reallyRead, reallyRead, reduce, section, toString, toStringDebuggetShortNamefilter, findAttributeDouble, findAttributeIgnoreCase, findAttributeInteger, getName, hasAttribute, hasAttributeIgnoreCase, isEmpty, iteratorpublic static Sequence.Builder<?> builder()
public StructureDataIterator getStructureIterator(int bufferSize) throws java.io.IOException
Structure
Example:
StructureDataIterator ii = structVariable.getStructureIterator(100 * 1000);
while (ii.hasNext()) {
StructureData sdata = ii.next();
}
getStructureIterator in class StructurebufferSize - size in bytes to buffer, set < 0 to use default sizejava.io.IOException - on read errorpublic Array read(int[] origin, int[] shape)
Variableassert(origin[ii] + shape[ii]*stride[ii] <= Variable.shape[ii]);
read in class Variableorigin - int array specifying the starting index. If null, assume all zeroes.shape - int array specifying the extents in each dimension.
This becomes the shape of the returned Array.java.lang.UnsupportedOperationException - alwayspublic Array read(java.util.List<Range> ranges)
Variableread in class Variableranges - list of Range specifying the section of data to read.java.lang.UnsupportedOperationException - alwaysVariable.read(Section)public Array read(Section section) throws java.io.IOException
Variableread in class Variablesection - list of Range specifying the section of data to read.
Must be null or same rank as variable.
If list is null, assume all data.
Each Range corresponds to a Dimension. If the Range object is null, it means use the entire dimension.java.io.IOException - if errorpublic Array read(java.lang.String sectionSpec)
Variableread in class VariablesectionSpec - specification string, eg "1:2,10,:,1:100:10". May optionally have ().java.lang.UnsupportedOperationException - alwaysfor sectionSpec syntaxpublic StructureData readStructure()
StructurereadStructure in class Structurejava.lang.UnsupportedOperationException - alwayspublic StructureData readStructure(int index)
StructurereadStructure in class Structureindex - index into 1D arrayjava.lang.UnsupportedOperationException - alwayspublic ArrayStructure readStructure(int start, int count)
StructurereadStructure in class Structurestart - start at this indexcount - return this many StructureDatajava.lang.UnsupportedOperationException - alwayspublic Variable section(Section subsection)
Variablesection in class Variablesubsection - Section of this variable.
Each Range in the section corresponds to a Dimension, and specifies the section of data to read in that
Dimension.
A Range object may be null, which means use the entire dimension.java.lang.UnsupportedOperationException - alwayspublic Variable slice(int dim, int value)
Variablepublic Sequence.Builder<?> toBuilder()