Package ucar.nc2.dataset
Class StructureDS
java.lang.Object
ucar.nc2.CDMNode
ucar.nc2.Variable
ucar.nc2.Structure
ucar.nc2.dataset.StructureDS
- All Implemented Interfaces:
Comparable<VariableSimpleIF>,Iterable<Attribute>,AttributeContainer,Enhancements,VariableEnhanced,ProxyReader,VariableSimpleIF
- Direct Known Subclasses:
SequenceDS,StructurePseudoDS
An "enhanced" Structure.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classStructureDS.Builder<T extends StructureDS.Builder<T>> -
Field Summary
Fields inherited from class ucar.nc2.Variable
defaultCoordsSizeToCache, defaultSizeToCache, permitCaching -
Constructor Summary
ConstructorsConstructorDescriptionStructureDS(NetcdfDataset ds, Group group, Structure parentStructure, String shortName, String dims, String units, String desc) Deprecated.Use StructureDS.builder()StructureDS(NetcdfDataset ds, Group group, Structure parent, String shortName, Structure orgVar) Deprecated.Use StructureDS.builder()StructureDS(Group g, Structure orgVar) Deprecated.Use StructureDS.builder() -
Method Summary
Modifier and TypeMethodDescriptionvoidDeprecated.Use StructureDS.builder()static StructureDS.Builder<?>builder()voidDeprecated.Use StructureDS.builder()voidenhance(Set<NetcdfDataset.Enhance> mode) Deprecated.do not usecom.google.common.collect.ImmutableList<CoordinateSystem>Get the list of Coordinate Systems for this Variable.Get the description of the Variable.When this wraps another Variable, get the original Variable's DataType.When this wraps another Variable, get the original Variable's DataType.A StructureDS may wrap another Structure.Get the Unit String for the Variable.reallyRead(Variable client, Section section, CancelTask cancelTask) public by accident, do not call directly.reallyRead(Variable client, CancelTask cancelTask) public by accident, do not call directly.voidDeprecated.Use StructureDS.builder()Create a subset of the Structure consisting only of the given member variablesDeprecated.voidsetOriginalVariable(Variable orgVar) Deprecated.Use StructureDS.builder()voidsetUnitsString(String units) Deprecated.Use StructureDS.builder()Turn into a mutable Builder.Methods inherited from class ucar.nc2.Structure
addMemberVariable, calcElementSize, findVariable, getElementSize, getNameAndAttributes, getNumberOfMemberVariables, getStructureIterator, getStructureIterator, getVariableNames, getVariables, isCaching, isSubset, makeStructureMembers, readStructure, readStructure, readStructure, removeMemberVariable, 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
-
StructureDS
@Deprecated public StructureDS(NetcdfDataset ds, Group group, Structure parentStructure, String shortName, String dims, String units, String desc) Deprecated.Use StructureDS.builder()Constructor when theres no underlying variable. You better set the values too!- Parameters:
ds- the containing NetcdfDataset.group- the containing group; if null, use rootGroupparentStructure- parent Structure, may be nullshortName- variable shortName, must be unique within the Groupdims- list of dimension names, space delimitedunits- unit string (may be null)desc- description (may be null)
-
StructureDS
Deprecated.Use StructureDS.builder()Create a StructureDS that wraps a Structure- Parameters:
g- parent grouporgVar- original Structure
-
StructureDS
@Deprecated public StructureDS(NetcdfDataset ds, Group group, Structure parent, String shortName, Structure orgVar) Deprecated.Use StructureDS.builder()Wrap the given Structure, making it into a StructureDS. Delegate data reading to the original variable. Does not share cache, iosp. This is for NcML explicit mode- Parameters:
ds- the containing NetcdfDataset.group- the containing group; may not be nullparent- parent Structure, may be nullshortName- variable shortName, must be unique within the GrouporgVar- the original Structure to wrap.
-
-
Method Details
-
select
Description copied from class:StructureCreate a subset of the Structure consisting only of the given member variables -
getOriginalVariable
A StructureDS may wrap another Structure.- Specified by:
getOriginalVariablein interfaceVariableEnhanced- Returns:
- original Structure or null
-
setOriginalVariable
Deprecated.Use StructureDS.builder()Set the Structure to wrap.- Specified by:
setOriginalVariablein interfaceVariableEnhanced- Parameters:
orgVar- original Variable, must be a Structure
-
getOriginalDataType
When this wraps another Variable, get the original Variable's DataType.- Returns:
- original Variable's DataType
-
getOriginalName
When this wraps another Variable, get the original Variable's DataType.- Specified by:
getOriginalNamein interfaceVariableEnhanced- Returns:
- original Variable's DataType
-
setName
Deprecated.Description copied from class:VariableSet the short name, converting to valid CDM object name if needed. -
reallyRead
Description copied from class:Variablepublic by accident, do not call directly.- Specified by:
reallyReadin interfaceProxyReader- Overrides:
reallyReadin classVariable- Parameters:
client- the client VariablecancelTask- user may cancel- Returns:
- Array
- Throws:
IOException- on error
-
reallyRead
public Array reallyRead(Variable client, Section section, CancelTask cancelTask) throws IOException, InvalidRangeException Description copied from class:Variablepublic by accident, do not call directly.- Specified by:
reallyReadin interfaceProxyReader- Overrides:
reallyReadin classVariable- Parameters:
client- 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.
-
enhance
Deprecated.do not useDO NOT USE DIRECTLY. public by accident. recalc any enhancement info- Specified by:
enhancein interfaceVariableEnhanced
-
clearCoordinateSystems
Deprecated.Use StructureDS.builder()Description copied from interface:VariableEnhancedclear previous coordinate systems. if any- Specified by:
clearCoordinateSystemsin interfaceVariableEnhanced
-
addCoordinateSystem
Deprecated.Use StructureDS.builder()Description copied from interface:EnhancementsAdd a CoordinateSystem to the dataset.- Specified by:
addCoordinateSystemin interfaceEnhancements- Parameters:
p0- add this Coordinate System
-
removeCoordinateSystem
Deprecated.Use StructureDS.builder()Description copied from interface:EnhancementsRemove a CoordinateSystem from the dataset.- Specified by:
removeCoordinateSystemin interfaceEnhancements- Parameters:
p0- remove this coordinate system
-
getCoordinateSystems
Description copied from interface:EnhancementsGet the list of Coordinate Systems for this Variable.- Specified by:
getCoordinateSystemsin interfaceEnhancements- Returns:
- list of type CoordinateSystem; may be empty but not null.
-
getDescription
Description copied from class:VariableGet the description of the Variable. Default is to use CDM.LONG_NAME attribute value. If not exist, look for "description", "title", or "standard_name" attribute value (in that order).- Specified by:
getDescriptionin interfaceEnhancements- Specified by:
getDescriptionin interfaceVariableSimpleIF- Overrides:
getDescriptionin classVariable- Returns:
- description, or null if not found.
-
getUnitsString
Description copied from class:VariableGet the Unit String for the Variable. Looks for the CDM.UNITS attribute value- Specified by:
getUnitsStringin interfaceEnhancements- Specified by:
getUnitsStringin interfaceVariableSimpleIF- Overrides:
getUnitsStringin classVariable- Returns:
- unit string, or null if not found.
-
setUnitsString
Deprecated.Use StructureDS.builder()Description copied from interface:VariableEnhancedSet the Unit String for this Variable. Default is to use the CDM.UNITS attribute.- Specified by:
setUnitsStringin interfaceVariableEnhanced- Parameters:
units- unit string
-
toBuilder
Description copied from class:StructureTurn into a mutable Builder. Can use toBuilder().build() to copy. -
builder
-