Package ucar.nc2.dataset
Class StructurePseudoDS
java.lang.Object
ucar.nc2.CDMNode
ucar.nc2.Variable
ucar.nc2.Structure
ucar.nc2.dataset.StructureDS
ucar.nc2.dataset.StructurePseudoDS
- All Implemented Interfaces:
Comparable<VariableSimpleIF>,Iterable<Attribute>,AttributeContainer,Enhancements,VariableEnhanced,ProxyReader,VariableSimpleIF
- Direct Known Subclasses:
StructurePseudo2Dim
Make a collection of variables with the same outer dimension into a fake Structure.
Its fake because the variables are not stored contiguously.
so
var1(dim, other);
var2(dim, other);
var3(dim, other);
becomes
struct {
var1(other);
var2(other);
var3(other);
} name(dim);
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classStructurePseudoDS.Builder<T extends StructurePseudoDS.Builder<T>> -
Field Summary
Fields inherited from class ucar.nc2.Variable
defaultCoordsSizeToCache, defaultSizeToCache, permitCaching -
Constructor Summary
ConstructorsConstructorDescriptionStructurePseudoDS(NetcdfDataset ncfile, Group group, String shortName, List<String> varNames, Dimension outerDim) Deprecated.Use StructurePseudoDS.builder() -
Method Summary
Modifier and TypeMethodDescriptionstatic StructurePseudoDS.Builder<?>builder()reallyRead(Variable mainv, Section section, CancelTask cancelTask) public by accident, do not call directly.reallyRead(Variable mainv, CancelTask cancelTask) public by accident, do not call directly.booleanDeprecated.Use StructurePseudoDS.builder()Create a subset of the Structure consisting only of the given member variablesTurn into a mutable Builder.Methods inherited from class ucar.nc2.dataset.StructureDS
addCoordinateSystem, clearCoordinateSystems, enhance, getCoordinateSystems, getDescription, getOriginalDataType, getOriginalName, getOriginalVariable, getUnitsString, removeCoordinateSystem, setName, setOriginalVariable, setUnitsStringMethods inherited from class ucar.nc2.Structure
addMemberVariable, calcElementSize, findVariable, getElementSize, getNameAndAttributes, getNumberOfMemberVariables, getStructureIterator, getStructureIterator, getVariableNames, getVariables, isCaching, isSubset, makeStructureMembers, readStructure, readStructure, readStructure, replaceMemberVariable, select, setCaching, setImmutable, setMemberVariables, setParentGroupMethods inherited from class ucar.nc2.Variable
addAll, addAttribute, attributes, compareTo, createNewCache, equals, findAttribute, findAttributeDouble, findAttributeIgnoreCase, findAttributeInteger, findAttributeString, findDimensionIndex, getAttributes, getDAPName, getDAPName, getDatasetLocation, getDataType, getDimension, getDimensions, getDimensionsAll, getDimensionsString, getEnumTypedef, getFileTypeId, getFullName, getNameAndDimensions, getNameAndDimensions, getNameAndDimensions, getNameAndDimensions, getNameAndDimensions, getNameAndDimensions, getNetcdfFile, getParentGroup, getParentGroupOrRoot, getParentStructure, getProxyReader, getRanges, getRank, getShape, getShape, getShapeAll, getShapeAsSection, getSize, getSizeToCache, getSPobject, hasCachedData, hashCode, invalidateCache, isCoordinateVariable, isEmpty, isImmutable, isMemberOfStructure, isMetadata, isScalar, isUnknownLength, isUnlimited, isVariableLength, lookupEnumString, read, read, read, read, read, readScalarByte, readScalarDouble, readScalarFloat, readScalarInt, readScalarLong, readScalarShort, readScalarString, readToByteChannel, readToStream, reduce, remove, removeAttribute, removeAttributeIgnoreCase, resetDimensions, resetShape, section, section, setCachedData, setCachedData, setDataType, setDimension, setDimensions, setDimensions, setDimensionsAnonymous, setElementSize, setEnumTypedef, setIsScalar, setProxyReader, setSizeToCache, setSPobject, setValues, setValues, slice, toString, toStringDebug, writeCDLMethods inherited from class ucar.nc2.CDMNode
annotate, annotation, getDODSName, getFullNameEscaped, getGroup, getImmutable, getName, getShortName, getSort, localhash, setDODSName, setParentStructure, setShortName, setSort, unwrapMethods inherited from interface ucar.nc2.AttributeContainer
findAttValueIgnoreCase, getName, hasAttribute, hasAttributeIgnoreCase, iteratorMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface ucar.nc2.dataset.VariableEnhanced
getFullName, getShortNameMethods inherited from interface ucar.nc2.VariableSimpleIF
getName, getShortName
-
Constructor Details
-
StructurePseudoDS
@Deprecated public StructurePseudoDS(NetcdfDataset ncfile, Group group, String shortName, List<String> varNames, Dimension outerDim) Deprecated.Use StructurePseudoDS.builder()Make a Structure out of all Variables with the named dimension as their outermost dimension, or from a list named Variables, each has the same named outermost dimension.- Parameters:
ncfile- part of this filegroup- part of this groupshortName- short name of this StructurevarNames- limited to these variables, all must have dim as outer dimension. If null, use all Variables with that outer dimensionouterDim- existing, outer dimension
-
-
Method Details
-
select
Description copied from class:StructureCreate a subset of the Structure consisting only of the given member variables- Overrides:
selectin classStructureDS- Parameters:
memberNames- list of Variable names, already a member- Returns:
- Structure containing just those members
-
removeMemberVariable
Deprecated.Use StructurePseudoDS.builder()Description copied from class:StructureRemove a Variable : uses the Variable name to find it.- Overrides:
removeMemberVariablein classStructure- Parameters:
v- remove this variable as a member of this structure- Returns:
- true if was found and removed
-
reallyRead
Description copied from class:Variablepublic by accident, do not call directly.- Specified by:
reallyReadin interfaceProxyReader- Overrides:
reallyReadin classStructureDS- Parameters:
mainv- the client VariablecancelTask- user may cancel- Returns:
- Array
- Throws:
IOException- on error
-
reallyRead
public Array reallyRead(Variable mainv, Section section, CancelTask cancelTask) throws IOException, InvalidRangeException Description copied from class:Variablepublic by accident, do not call directly.- Specified by:
reallyReadin interfaceProxyReader- Overrides:
reallyReadin classStructureDS- Parameters:
mainv- the client Variablesection- the section of data to read.cancelTask- user may cancel- Returns:
- Array
- Throws:
IOException- on errorInvalidRangeException- if section has incorrect rank or illegal shape.
-
toBuilder
Description copied from class:StructureTurn into a mutable Builder. Can use toBuilder().build() to copy.- Overrides:
toBuilderin classStructureDS
-
builder
-