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
public class StructurePseudoDS extends StructureDS
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 Classes Modifier and Type Class Description static classStructurePseudoDS.Builder<T extends StructurePseudoDS.Builder<T>>-
Nested classes/interfaces inherited from class ucar.nc2.Variable
Variable.Cache
-
-
Field Summary
Fields Modifier and Type Field Description protected static Set<NetcdfDataset.Enhance>enhanceScaleMissingprotected List<Variable>orgVariables-
Fields inherited from class ucar.nc2.dataset.StructureDS
orgName, orgVar, proxy
-
Fields inherited from class ucar.nc2.Variable
attributes, cache, dataType, debugCaching, defaultCoordsSizeToCache, defaultSizeToCache, dimensions, elementSize, hashCode, isVariableLength, ncfile, permitCaching, proxyReader, shape, sizeToCache, spiObject
-
Fields inherited from class ucar.nc2.CDMNode
annotations, dodsname, group, immutable, parentstruct, shortName, sort
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedStructurePseudoDS(NetcdfDataset ncfile, Group group, String shortName)Deprecated.Use StructurePseudoDS.builder()StructurePseudoDS(NetcdfDataset ncfile, Group group, String shortName, List<String> varNames, Dimension outerDim)Deprecated.Use StructurePseudoDS.builder()protectedStructurePseudoDS(StructurePseudoDS.Builder<?> builder, Group parentGroup)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected StructurePseudoDS.Builder<?>addLocalFieldsToBuilder(StructurePseudoDS.Builder<? extends StructurePseudoDS.Builder<?>> b)static StructurePseudoDS.Builder<?>builder()protected StructureDScopy()ArrayreallyRead(Variable mainv, Section section, CancelTask cancelTask)public by accident, do not call directly.ArrayreallyRead(Variable mainv, CancelTask cancelTask)public by accident, do not call directly.booleanremoveMemberVariable(Variable v)Deprecated.Use StructurePseudoDS.builder()Structureselect(List<String> memberNames)Create a subset of the Structure consisting only of the given member variablesStructurePseudoDS.Builder<?>toBuilder()Turn into a mutable Builder.-
Methods inherited from class ucar.nc2.dataset.StructureDS
addCoordinateSystem, addLocalFieldsToBuilder, clearCoordinateSystems, convert, convert, enhance, getCoordinateSystems, getDescription, getOriginalDataType, getOriginalName, getOriginalVariable, getUnitsString, removeCoordinateSystem, setName, setOriginalVariable, setUnitsString
-
Methods inherited from class ucar.nc2.Structure
addLocalFieldsToBuilder, addMemberVariable, calcElementSize, calcStructureSize, findVariable, getElementSize, getNameAndAttributes, getNumberOfMemberVariables, getStructureIterator, getStructureIterator, getVariableNames, getVariables, isCaching, isSubset, makeStructureMembers, readStructure, readStructure, readStructure, replaceMemberVariable, select, setCaching, setImmutable, setMemberVariables, setParentGroup, writeCDL
-
Methods inherited from class ucar.nc2.Variable
_read, _read, _readScalarData, addAll, addAttribute, addLocalFieldsToBuilder, attributes, compareTo, createNewCache, equals, extraInfo, 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, getScalarData, 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, writeCDL
-
Methods inherited from class ucar.nc2.CDMNode
annotate, annotation, getDODSName, getFullNameEscaped, getGroup, getImmutable, getName, getShortName, getSort, localhash, setDODSName, setParentStructure, setShortName, setSort, unwrap
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface ucar.nc2.AttributeContainer
findAttValueIgnoreCase, getName, hasAttribute, hasAttributeIgnoreCase, iterator
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Methods inherited from interface ucar.nc2.dataset.VariableEnhanced
getFullName, getShortName
-
Methods inherited from interface ucar.nc2.VariableSimpleIF
getName, getShortName
-
-
-
-
Field Detail
-
enhanceScaleMissing
protected static final Set<NetcdfDataset.Enhance> enhanceScaleMissing
-
-
Constructor Detail
-
StructurePseudoDS
@Deprecated protected StructurePseudoDS(NetcdfDataset ncfile, Group group, String shortName)
Deprecated.Use StructurePseudoDS.builder()
-
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
-
StructurePseudoDS
protected StructurePseudoDS(StructurePseudoDS.Builder<?> builder, Group parentGroup)
-
-
Method Detail
-
copy
protected StructureDS copy()
- Overrides:
copyin classStructureDS
-
select
public Structure select(List<String> memberNames)
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 public boolean removeMemberVariable(Variable v)
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
public Array reallyRead(Variable mainv, CancelTask cancelTask) throws IOException
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
public StructurePseudoDS.Builder<?> toBuilder()
Description copied from class:StructureTurn into a mutable Builder. Can use toBuilder().build() to copy.- Overrides:
toBuilderin classStructureDS
-
addLocalFieldsToBuilder
protected StructurePseudoDS.Builder<?> addLocalFieldsToBuilder(StructurePseudoDS.Builder<? extends StructurePseudoDS.Builder<?>> b)
-
builder
public static StructurePseudoDS.Builder<?> builder()
-
-