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
,ucar.nc2.dataset.Enhancements
,VariableEnhanced
,ProxyReader
,VariableSimpleIF
- Direct Known Subclasses:
StructurePseudoDS
public class StructureDS extends Structure implements VariableEnhanced
An "enhanced" Structure.- See Also:
NetcdfDataset
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
StructureDS.Builder<T extends StructureDS.Builder<T>>
-
Field Summary
-
Fields inherited from class ucar.nc2.Variable
defaultCoordsSizeToCache, defaultSizeToCache, permitCaching
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static StructureDS.Builder<?>
builder()
com.google.common.collect.ImmutableList<CoordinateSystem>
getCoordinateSystems()
Get the list of Coordinate Systems for this Variable.String
getDescription()
Get the description of the Variable.DataType
getOriginalDataType()
When this wraps another Variable, get the original Variable's DataType.String
getOriginalName()
When this wraps another Variable, get the original Variable's DataType.Variable
getOriginalVariable()
A StructureDS may wrap another Structure.String
getUnitsString()
Get the Unit String for the Variable.Array
reallyRead(Variable client, Section section, CancelTask cancelTask)
public by accident, do not call directly.Array
reallyRead(Variable client, CancelTask cancelTask)
public by accident, do not call directly.Structure
select(List<String> memberNames)
Create a subset of the Structure consisting only of the given member variablesStructureDS.Builder<?>
toBuilder()
Turn into a mutable Builder.-
Methods inherited from class ucar.nc2.Structure
findVariable, getElementSize, getNameAndAttributes, getNumberOfMemberVariables, getStructureIterator, getStructureIterator, getVariableNames, getVariables, isCaching, isSubset, makeStructureMembers, readStructure, readStructure, select, setCaching
-
Methods inherited from class ucar.nc2.Variable
attributes, compareTo, createNewCache, equals, findAttribute, findAttributeString, findDimensionIndex, getDatasetLocation, getDataType, getDimension, getDimensions, getDimensionsString, getEnumTypedef, getFileTypeId, getFullName, getNameAndDimensions, getNameAndDimensions, getNameAndDimensions, getNetcdfFile, getParentGroup, getParentStructure, getRanges, getRank, getShape, getShape, getShapeAsSection, getSize, getSizeToCache, getSPobject, hasCachedData, hashCode, isCoordinateVariable, isMemberOfStructure, isMetadata, isScalar, isUnlimited, isVariableLength, lookupEnumString, read, read, read, read, read, readScalarByte, readScalarDouble, readScalarFloat, readScalarInt, readScalarLong, readScalarShort, readScalarString, readToStream, reduce, section, section, slice, toString, toStringDebug
-
Methods inherited from interface ucar.nc2.AttributeContainer
findAttributeDouble, findAttributeIgnoreCase, findAttributeInteger, getName, hasAttribute, hasAttributeIgnoreCase, isEmpty, iterator
-
Methods inherited from interface ucar.nc2.dataset.Enhancements
addCoordinateSystem, removeCoordinateSystem
-
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
getShortName
-
-
-
-
Method Detail
-
select
public Structure select(List<String> memberNames)
Description copied from class:Structure
Create a subset of the Structure consisting only of the given member variables
-
getOriginalVariable
public Variable getOriginalVariable()
A StructureDS may wrap another Structure.- Specified by:
getOriginalVariable
in interfaceVariableEnhanced
- Returns:
- original Structure or null
-
getOriginalDataType
public DataType getOriginalDataType()
When this wraps another Variable, get the original Variable's DataType.- Returns:
- original Variable's DataType
-
getOriginalName
public String getOriginalName()
When this wraps another Variable, get the original Variable's DataType.- Specified by:
getOriginalName
in interfaceVariableEnhanced
- Returns:
- original Variable's DataType
-
reallyRead
public Array reallyRead(Variable client, CancelTask cancelTask) throws IOException
Description copied from class:Variable
public by accident, do not call directly.- Specified by:
reallyRead
in interfaceProxyReader
- Overrides:
reallyRead
in 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:Variable
public by accident, do not call directly.- Specified by:
reallyRead
in interfaceProxyReader
- Overrides:
reallyRead
in 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.
-
getCoordinateSystems
public com.google.common.collect.ImmutableList<CoordinateSystem> getCoordinateSystems()
Description copied from interface:Enhancements
Get the list of Coordinate Systems for this Variable.- Specified by:
getCoordinateSystems
in interfaceucar.nc2.dataset.Enhancements
- Returns:
- list of type CoordinateSystem; may be empty but not null.
-
getDescription
public String getDescription()
Description copied from class:Variable
Get 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:
getDescription
in interfaceucar.nc2.dataset.Enhancements
- Specified by:
getDescription
in interfaceVariableSimpleIF
- Overrides:
getDescription
in classVariable
- Returns:
- description, or null if not found.
-
getUnitsString
public String getUnitsString()
Description copied from class:Variable
Get the Unit String for the Variable. Looks for the CDM.UNITS attribute value- Specified by:
getUnitsString
in interfaceucar.nc2.dataset.Enhancements
- Specified by:
getUnitsString
in interfaceVariableSimpleIF
- Overrides:
getUnitsString
in classVariable
- Returns:
- unit string, or null if not found.
-
toBuilder
public StructureDS.Builder<?> toBuilder()
Description copied from class:Structure
Turn into a mutable Builder. Can use toBuilder().build() to copy.
-
builder
public static StructureDS.Builder<?> builder()
-
-