@Immutable public class Sequence extends Structure implements Iterable<StructureData>
| Modifier and Type | Class and Description |
|---|---|
static class |
Sequence.Builder<T extends Sequence.Builder<T>> |
Variable.Cacheattributes, cache, dataType, dimensions, elementSize, hashCode, isVariableLength, ncfile, permitCaching, proxyReader, shape, spiObject| Modifier | Constructor and Description |
|---|---|
protected |
Sequence(Sequence.Builder<?> builder,
Group parentGroup) |
| Modifier and Type | Method and Description |
|---|---|
protected Sequence.Builder<?> |
addLocalFieldsToBuilder(Sequence.Builder<? extends Sequence.Builder<?>> b) |
static Sequence.Builder<?> |
builder()
Get Builder for this class that allows subclassing.
|
StructureDataIterator |
getStructureIterator(int bufferSize)
Deprecated.
use iterator()
|
Iterator<StructureData> |
iterator()
An iterator over all the data in the sequence.
|
Array |
read(int[] origin,
int[] shape)
Deprecated.
|
Array |
read(List<Range> ranges)
Deprecated.
|
Array |
read(Section section)
Deprecated.
|
Array |
read(String sectionSpec)
Deprecated.
|
StructureData |
readStructure(int index)
Deprecated.
|
ArrayStructure |
readStructure(int start,
int count)
Deprecated.
|
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.
|
addLocalFieldsToBuilder, findVariable, getElementSize, getNameAndAttributes, getNumberOfMemberVariables, getStructureIterator, getVariableNames, getVariables, isSubset, makeStructureMembers, makeStructureMembersBuilder, select, select, writeCDL_read, _read, _readScalarData, addLocalFieldsToBuilder, attributes, compareTo, equals, extraInfo, findAttribute, findAttributeString, findDimensionIndex, getArrayType, getDatasetLocation, getDataType, getDescription, getDimension, getDimensions, getDimensionSet, getDimensionsString, getEnumTypedef, getFileTypeId, getFullName, getNameAndDimensions, getNameAndDimensions, getNetcdfFile, getParentGroup, getParentStructure, getRanges, getRank, getSection, getShape, getShape, getShapeAsSection, getShortName, getSize, getSizeToCache, getSPobject, getUnitsString, hasCachedData, hashCode, invalidateCache, isCaching, isCoordinateVariable, isMemberOfStructure, isMetadata, isScalar, isUnlimited, isVariableLength, lookupEnumString, proxyReadArray, proxyReadArray, read, readArray, readArray, readScalarByte, readScalarDouble, readScalarFloat, readScalarInt, readScalarLong, readScalarShort, readScalarString, readToStream, reallyRead, reallyRead, reduce, resetShape, section, setCachedData, setCaching, toString, toStringDebugclone, finalize, getClass, notify, notifyAll, wait, wait, waitforEach, spliteratorprotected Sequence(Sequence.Builder<?> builder, Group parentGroup)
@Deprecated public StructureDataIterator getStructureIterator(int bufferSize) throws 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 sizeIOException - on read errorpublic Iterator<StructureData> iterator()
iterator in interface Iterable<StructureData>@Deprecated public Array read(Section section) throws IOException
read 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.IOException - if error@Deprecated public 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.UnsupportedOperationException - always@Deprecated public Array read(String sectionSpec)
Variableread in class VariablesectionSpec - specification string, eg "1:2,10,:,1:100:10". May optionally have ().UnsupportedOperationException - alwaysfor sectionSpec syntax@Deprecated public Array read(List<Range> ranges)
Variableread in class Variableranges - list of Range specifying the section of data to read.UnsupportedOperationException - alwaysVariable.read(Section)@Deprecated public StructureData readStructure(int index)
StructurereadStructure in class Structureindex - linear index into the arrayUnsupportedOperationException - always@Deprecated public ArrayStructure readStructure(int start, int count)
StructurereadStructure in class Structurestart - start at this indexcount - return this many StructureDataUnsupportedOperationException - alwayspublic Variable slice(int dim, int value)
Variableslice in class Variabledim - which dimension to fixvalue - at what index valueUnsupportedOperationException - 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.UnsupportedOperationException - alwayspublic Sequence.Builder<?> toBuilder()
protected Sequence.Builder<?> addLocalFieldsToBuilder(Sequence.Builder<? extends Sequence.Builder<?>> b)
public static Sequence.Builder<?> builder()