public class Variable extends CDMNode implements VariableSimpleIF, ProxyReader, AttributeContainer
Immutable if setImmutable() was called. TODO Variable will be immutable in 6. TODO Variable will not implement AttributeContainer in 6, use Variable.attributes(). TODO Variable will not extend CDMNode in 6.
Modifier and Type | Class and Description |
---|---|
static class |
Variable.Builder<T extends Variable.Builder<T>>
A builder for Variables.
|
protected static class |
Variable.Cache |
Modifier and Type | Field and Description |
---|---|
protected AttributeContainerMutable |
attributes |
protected Variable.Cache |
cache |
protected DataType |
dataType |
protected static boolean |
debugCaching |
static int |
defaultCoordsSizeToCache |
static int |
defaultSizeToCache |
protected java.util.List<Dimension> |
dimensions |
protected int |
elementSize |
protected int |
hashCode |
protected boolean |
isVariableLength |
protected NetcdfFile |
ncfile |
static boolean |
permitCaching
Globally permit or prohibit caching.
|
protected ProxyReader |
proxyReader |
protected int[] |
shape |
protected int |
sizeToCache |
protected java.lang.Object |
spiObject |
annotations, dodsname, group, immutable, parentstruct, shortName, sort
Modifier | Constructor and Description |
---|---|
protected |
Variable()
Deprecated.
Use Variable.builder()
|
|
Variable(NetcdfFile ncfile,
Group group,
Structure parent,
java.lang.String shortName)
Deprecated.
Use Variable.builder()
|
|
Variable(NetcdfFile ncfile,
Group group,
Structure parent,
java.lang.String shortName,
DataType dtype,
java.util.List<Dimension> dims)
Deprecated.
Use Variable.builder()
|
|
Variable(NetcdfFile ncfile,
Group group,
Structure parent,
java.lang.String shortName,
DataType dtype,
java.lang.String dims)
Deprecated.
Use Variable.builder()
|
protected |
Variable(Variable.Builder<?> builder,
Group parentGroup) |
|
Variable(Variable from)
Deprecated.
Use Variable.builder()
|
Modifier and Type | Method and Description |
---|---|
protected Array |
_read() |
protected Array |
_read(Section section) |
protected Array |
_readScalarData() |
void |
addAll(java.lang.Iterable<Attribute> atts)
Deprecated.
Use Variable.builder()
|
Attribute |
addAttribute(Attribute att)
Deprecated.
Use Variable.builder()
|
protected Variable.Builder<?> |
addLocalFieldsToBuilder(Variable.Builder<? extends Variable.Builder<?>> builder) |
AttributeContainer |
attributes()
The attributes contained by this Variable.
|
static Variable.Builder<?> |
builder()
Get Builder for this class that allows subclassing.
|
int |
compareTo(VariableSimpleIF o)
Sort by name
|
protected Variable |
copy()
Deprecated.
Use
toBuilder() |
void |
createNewCache()
Create a new data cache, use this when you dont want to share the cache.
|
boolean |
equals(java.lang.Object oo)
Instances which have same content are equal.
|
protected java.lang.String |
extraInfo() |
Attribute |
findAttribute(java.lang.String name)
Find the attribute by name, return null if not exist
|
double |
findAttributeDouble(java.lang.String attName,
double defaultValue)
Deprecated.
Use attributes()
|
Attribute |
findAttributeIgnoreCase(java.lang.String name)
Deprecated.
Use attributes()
|
int |
findAttributeInteger(java.lang.String attName,
int defaultValue)
Deprecated.
Use attributes()
|
java.lang.String |
findAttributeString(java.lang.String attName,
java.lang.String defaultValue)
Find a String-valued Attribute by name (ignore case), return the String value of the Attribute.
|
int |
findDimensionIndex(java.lang.String name)
Find the index of the named Dimension in this Variable.
|
java.util.List<Attribute> |
getAttributes()
Deprecated.
Use attributes()
|
static java.lang.String |
getDAPName(java.lang.String name,
Variable context)
Deprecated.
Will be moved to opendap package in 6.
|
static java.lang.String |
getDAPName(Variable v)
Deprecated.
Will be moved to opendap package in 6.
|
java.lang.String |
getDatasetLocation()
The location of the dataset this belongs to.
|
DataType |
getDataType()
Get the data type of the Variable.
|
java.lang.String |
getDescription()
Get the description of the Variable.
|
Dimension |
getDimension(int i)
Get the ith dimension.
|
com.google.common.collect.ImmutableList<Dimension> |
getDimensions()
Get the list of dimensions used by this variable.
|
java.util.List<Dimension> |
getDimensionsAll()
Deprecated.
use Dimensions.makeDimensionsAll(Variable);
|
java.lang.String |
getDimensionsString()
Get the list of Dimension names, space delineated.
|
int |
getElementSize()
Get the number of bytes for one element of this Variable.
|
EnumTypedef |
getEnumTypedef()
Get the EnumTypedef, only use if getDataType.isEnum()
|
java.lang.String |
getFileTypeId() |
java.lang.String |
getFullName()
Get the full name of this Variable.
|
java.lang.String |
getNameAndDimensions()
Get the display name plus the dimensions, eg 'float name(dim1, dim2)'
|
java.lang.String |
getNameAndDimensions(boolean strict)
Get the display name plus the dimensions, eg 'float name(dim1, dim2)'
|
void |
getNameAndDimensions(java.util.Formatter buf,
boolean useFullName,
boolean strict)
Add display name plus the dimensions to the Formatter
|
void |
getNameAndDimensions(java.lang.StringBuffer buf)
Deprecated.
use getNameAndDimensions(StringBuilder buf)
|
void |
getNameAndDimensions(java.lang.StringBuilder buf)
Deprecated.
use CDLWriter
|
void |
getNameAndDimensions(java.lang.StringBuilder buf,
boolean useFullName,
boolean strict)
Deprecated.
use CDLWriter
|
NetcdfFile |
getNetcdfFile()
Get the NetcdfFile that this variable is contained in.
|
Group |
getParentGroup()
Get its containing Group.
|
Group |
getParentGroupOrRoot()
Deprecated.
Will go away in ver6, shouldn't be needed when builders are used.
|
Structure |
getParentStructure()
Get its parent structure, or null if not in structure
Not deprecated.
|
ProxyReader |
getProxyReader()
Deprecated.
Use Variable.builder()
|
com.google.common.collect.ImmutableList<Range> |
getRanges()
Get shape as a List of Range objects.
|
int |
getRank()
Get the number of dimensions of the Variable, aka the rank.
|
protected Array |
getScalarData()
Deprecated.
use readScalarXXXX
|
int[] |
getShape()
Get the shape: length of Variable in each dimension.
|
int |
getShape(int index)
Get the size of the ith dimension
|
int[] |
getShapeAll()
Deprecated.
use Dimensions.makeDimensionsAll(Variable);
|
Section |
getShapeAsSection()
Get shape as a Section object.
|
long |
getSize()
Get the total number of elements in the Variable.
|
int |
getSizeToCache()
If total data size is less than SizeToCache in bytes, then cache.
|
java.lang.Object |
getSPobject()
Get immutable service provider opaque object.
|
java.lang.String |
getUnitsString()
Get the Unit String for the Variable.
|
boolean |
hasCachedData()
Has data been read and cached.
|
int |
hashCode()
Override Object.hashCode() to implement equals.
|
void |
invalidateCache()
Deprecated.
Use Variable.builder()
|
boolean |
isCaching()
Will this Variable be cached when read.
|
boolean |
isCoordinateVariable()
Calculate if this is a classic coordinate variable: has same name as its first dimension.
|
boolean |
isEmpty()
Deprecated.
Use attributes()
|
boolean |
isImmutable()
Deprecated.
Use Variable.builder()
|
boolean |
isMemberOfStructure()
Test for presence of parent Structure.
|
boolean |
isMetadata()
Is this variable metadata?.
|
boolean |
isScalar()
Whether this is a scalar Variable (rank == 0).
|
boolean |
isUnknownLength()
Deprecated.
use isVariableLength()
|
boolean |
isUnlimited()
Can this variable's size grow?.
|
boolean |
isVariableLength()
Does this variable have a variable length dimension?
If so, it has as one of its dimensions Dimension.VLEN.
|
java.lang.String |
lookupEnumString(int val)
Lookup the enum string for this value.
|
Array |
read()
Read all the data for this Variable and return a memory resident Array.
|
Array |
read(int[] origin,
int[] shape)
Read a section of the data for this Variable and return a memory resident Array.
|
Array |
read(java.util.List<Range> ranges)
Read a section of the data for this Variable from the netcdf file and return a memory resident Array.
|
Array |
read(Section section)
Read a section of the data for this Variable from the netcdf file and return a memory resident Array.
|
Array |
read(java.lang.String sectionSpec)
Read data section specified by a "section selector", and return a memory resident Array.
|
byte |
readScalarByte()
Get the value as a byte for a scalar Variable.
|
double |
readScalarDouble()
Get the value as a double for a scalar Variable.
|
float |
readScalarFloat()
Get the value as a float for a scalar Variable.
|
int |
readScalarInt()
Get the value as a int for a scalar Variable.
|
long |
readScalarLong()
Get the value as a long for a scalar Variable.
|
short |
readScalarShort()
Get the value as a short for a scalar Variable.
|
java.lang.String |
readScalarString()
Get the value as a String for a scalar Variable.
|
long |
readToByteChannel(Section section,
java.nio.channels.WritableByteChannel wbc)
Deprecated.
do not use
|
long |
readToStream(Section section,
java.io.OutputStream out)
Read variable data to a stream.
|
Array |
reallyRead(Variable client,
CancelTask cancelTask)
public by accident, do not call directly.
|
Array |
reallyRead(Variable client,
Section section,
CancelTask cancelTask)
public by accident, do not call directly.
|
Variable |
reduce(java.util.List<Dimension> dims)
Create a new Variable that is a logical view of this Variable, by
eliminating the specified dimension(s) of length 1.
|
boolean |
remove(Attribute a)
Deprecated.
Use Variable.builder()
|
boolean |
removeAttribute(java.lang.String attName)
Deprecated.
Use Variable.builder()
|
boolean |
removeAttributeIgnoreCase(java.lang.String attName)
Deprecated.
Use Variable.builder()
|
void |
resetDimensions()
Deprecated.
Use Variable.builder()
|
void |
resetShape()
Deprecated.
Use Variable.builder()
|
Variable |
section(java.util.List<Range> ranges)
Create a new Variable that is a logical subsection of this Variable.
|
Variable |
section(Section subsection)
Create a new Variable that is a logical subsection of this Variable.
|
void |
setCachedData(Array cacheData)
Deprecated.
Use Variable.builder()
|
void |
setCachedData(Array cacheData,
boolean isMetadata)
Deprecated.
Use Variable.builder()
|
void |
setCaching(boolean caching)
Deprecated.
Use Variable.builder()
|
void |
setDataType(DataType dataType)
Deprecated.
Use Variable.builder()
|
void |
setDimension(int idx,
Dimension dim)
Deprecated.
Use Variable.builder()
|
void |
setDimensions(java.util.List<Dimension> dims)
Deprecated.
Use Variable.builder()
|
void |
setDimensions(java.lang.String dimString)
Deprecated.
Use Variable.builder()
|
void |
setDimensionsAnonymous(int[] shape)
Deprecated.
Use Variable.builder()
|
void |
setElementSize(int elementSize)
Deprecated.
Use Variable.builder()
|
void |
setEnumTypedef(EnumTypedef enumTypedef)
Deprecated.
Use Variable.builder()
|
Variable |
setImmutable()
Deprecated.
Use Variable.builder()
|
void |
setIsScalar()
Deprecated.
Use Variable.builder()
|
java.lang.String |
setName(java.lang.String shortName)
Deprecated.
Use Variable.builder()
|
void |
setParentGroup(Group group)
Deprecated.
Use Variable.builder()
|
void |
setProxyReader(ProxyReader proxyReader)
Deprecated.
Use Variable.builder()
|
void |
setSizeToCache(int sizeToCache)
Deprecated.
Use Variable.builder()
|
void |
setSPobject(java.lang.Object spiObject)
Deprecated.
Do not use.
|
void |
setValues(int npts,
double start,
double incr)
Deprecated.
Use Variable.builder()
|
void |
setValues(java.util.List<java.lang.String> values)
Deprecated.
Use Variable.builder()
|
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.
|
Variable.Builder<?> |
toBuilder()
Turn into a mutable Builder.
|
java.lang.String |
toString() |
java.lang.String |
toStringDebug()
String representation of Variable and its attributes.
|
java.lang.String |
writeCDL(boolean useFullName,
boolean strict)
Deprecated.
use CDLWriter
|
protected void |
writeCDL(java.util.Formatter buf,
Indent indent,
boolean useFullName,
boolean strict)
Deprecated.
use CDLWriter
|
annotate, annotation, getDODSName, getFullNameEscaped, getGroup, getImmutable, getName, getShortName, getSort, localhash, setDODSName, setParentStructure, setShortName, setSort, unwrap
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getName, getShortName
filter, findAttValueIgnoreCase, getName, hasAttribute, hasAttributeIgnoreCase, iterator
public static boolean permitCaching
A true
value for this field does not indicate whether a Variable
is caching
, only that it's permitted to cache.
public static int defaultSizeToCache
public static int defaultCoordsSizeToCache
protected static boolean debugCaching
protected int hashCode
protected NetcdfFile ncfile
protected DataType dataType
protected java.util.List<Dimension> dimensions
protected AttributeContainerMutable attributes
protected ProxyReader proxyReader
protected java.lang.Object spiObject
protected int[] shape
protected boolean isVariableLength
protected int elementSize
protected Variable.Cache cache
protected int sizeToCache
@Deprecated protected Variable()
@Deprecated public Variable(NetcdfFile ncfile, Group group, Structure parent, java.lang.String shortName)
ncfile
- the containing NetcdfFile.group
- the containing group; if null, use rootGroupparent
- parent Structure, may be nullshortName
- variable shortName, must be unique within the Group@Deprecated public Variable(NetcdfFile ncfile, Group group, Structure parent, java.lang.String shortName, DataType dtype, java.lang.String dims)
ncfile
- the containing NetcdfFile.group
- the containing group; if null, use rootGroupparent
- parent Structure, may be nullshortName
- variable shortName, must be unique within the Groupdtype
- the Variable's DataTypedims
- space delimited list of dimension names. may be null or "" for scalars.@Deprecated public Variable(NetcdfFile ncfile, Group group, Structure parent, java.lang.String shortName, DataType dtype, java.util.List<Dimension> dims)
ncfile
- the containing NetcdfFile.group
- the containing group; if null, use rootGroupparent
- parent Structure, may be nullshortName
- variable shortName, must be unique within the Groupdtype
- the Variable's DataTypedims
- dimension names.@Deprecated public Variable(Variable from)
from
- copy from this Variable.protected Variable(Variable.Builder<?> builder, Group parentGroup)
@Deprecated public static java.lang.String getDAPName(java.lang.String name, Variable context)
@Deprecated public static java.lang.String getDAPName(Variable v)
public DataType getDataType()
getDataType
in interface VariableSimpleIF
public int[] getShape()
getShape
in interface VariableSimpleIF
public int getShape(int index)
index
- which dimensionpublic long getSize()
public int getElementSize()
public int getRank()
getRank
in interface VariableSimpleIF
@Deprecated public Group getParentGroupOrRoot()
public boolean isMetadata()
public boolean isScalar()
public boolean isVariableLength()
public boolean isUnlimited()
public com.google.common.collect.ImmutableList<Dimension> getDimensions()
getDimensions
in interface VariableSimpleIF
public Dimension getDimension(int i)
i
- index of the dimension.public java.lang.String getDimensionsString()
public int findDimensionIndex(java.lang.String name)
name
- the name of the dimensionpublic java.lang.String getDescription()
getDescription
in interface VariableSimpleIF
public java.lang.String getUnitsString()
getUnitsString
in interface VariableSimpleIF
public com.google.common.collect.ImmutableList<Range> getRanges()
public Section getShapeAsSection()
@Deprecated public ProxyReader getProxyReader()
@Deprecated public void setProxyReader(ProxyReader proxyReader)
public Variable section(java.util.List<Range> ranges) throws InvalidRangeException
ranges
- List of type ucar.ma2.Range, with size equal to getRank().
Each Range 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.InvalidRangeException
- if shape and range list don't matchpublic Variable section(Section subsection) throws InvalidRangeException
subsection
- 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.InvalidRangeException
- if section not compatible with shapepublic Variable slice(int dim, int value) throws InvalidRangeException
dim
- which dimension to fixvalue
- at what index valueInvalidRangeException
- if dimension or value is illegalpublic Variable reduce(java.util.List<Dimension> dims)
dims
- list of dimensions of length 1 to reduce@Deprecated protected Variable copy()
toBuilder()
@Nullable public NetcdfFile getNetcdfFile()
@Nullable public java.lang.String getFileTypeId()
@Nullable public java.lang.String lookupEnumString(int val)
val
- the integer value of this enum@Deprecated public void setEnumTypedef(EnumTypedef enumTypedef)
enumTypedef
- set the EnumTypedef, only use if getDataType.isEnum()public EnumTypedef getEnumTypedef()
public Array read(int[] origin, int[] shape) throws java.io.IOException, InvalidRangeException
assert(origin[ii] + shape[ii]*stride[ii] <= Variable.shape[ii]);
origin
- 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.java.io.IOException
InvalidRangeException
public Array read(java.lang.String sectionSpec) throws java.io.IOException, InvalidRangeException
sectionSpec
- specification string, eg "1:2,10,:,1:100:10". May optionally have ().java.io.IOException
InvalidRangeException
for sectionSpec syntax
public Array read(java.util.List<Range> ranges) throws java.io.IOException, InvalidRangeException
ranges
- list of Range specifying the section of data to read.java.io.IOException
- if errorInvalidRangeException
- if ranges is invalidread(Section)
public Array read(Section section) throws java.io.IOException, InvalidRangeException
section
- 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.java.io.IOException
- if errorInvalidRangeException
- if section is invalidpublic Array read() throws java.io.IOException
java.io.IOException
public byte readScalarByte() throws java.io.IOException
java.io.IOException
- if theres an IO Errorjava.lang.UnsupportedOperationException
- if not a scalar Variable or one-dimensional of length 1.ForbiddenConversionException
- if data type not convertible to bytepublic short readScalarShort() throws java.io.IOException
java.io.IOException
- if theres an IO Errorjava.lang.UnsupportedOperationException
- if not a scalar Variable or one-dimensional of length 1.ForbiddenConversionException
- if data type not convertible to shortpublic int readScalarInt() throws java.io.IOException
java.io.IOException
- if theres an IO Errorjava.lang.UnsupportedOperationException
- if not a scalar Variable or one-dimensional of length 1.ForbiddenConversionException
- if data type not convertible to intpublic long readScalarLong() throws java.io.IOException
java.io.IOException
- if theres an IO Errorjava.lang.UnsupportedOperationException
- if not a scalar VariableForbiddenConversionException
- if data type not convertible to longpublic float readScalarFloat() throws java.io.IOException
java.io.IOException
- if theres an IO Errorjava.lang.UnsupportedOperationException
- if not a scalar Variable or one-dimensional of length 1.ForbiddenConversionException
- if data type not convertible to floatpublic double readScalarDouble() throws java.io.IOException
java.io.IOException
- if theres an IO Errorjava.lang.UnsupportedOperationException
- if not a scalar Variable or one-dimensional of length 1.ForbiddenConversionException
- if data type not convertible to doublepublic java.lang.String readScalarString() throws java.io.IOException
java.io.IOException
- if theres an IO Errorjava.lang.UnsupportedOperationException
- if not a scalar or one-dimensional.java.lang.ClassCastException
- if data type not DataType.STRING or DataType.CHAR.@Deprecated protected Array getScalarData() throws java.io.IOException
java.io.IOException
protected Array _read() throws java.io.IOException
java.io.IOException
protected Array _read(Section section) throws java.io.IOException, InvalidRangeException
java.io.IOException
InvalidRangeException
protected Array _readScalarData() throws java.io.IOException
java.io.IOException
public Array reallyRead(Variable client, CancelTask cancelTask) throws java.io.IOException
reallyRead
in interface ProxyReader
client
- the client VariablecancelTask
- user may canceljava.io.IOException
- on errorpublic Array reallyRead(Variable client, Section section, CancelTask cancelTask) throws java.io.IOException, InvalidRangeException
reallyRead
in interface ProxyReader
client
- the client Variablesection
- the section of data to read.cancelTask
- user may canceljava.io.IOException
- on errorInvalidRangeException
- if section has incorrect rank or illegal shape.@Deprecated public long readToByteChannel(Section section, java.nio.channels.WritableByteChannel wbc) throws java.io.IOException, InvalidRangeException
java.io.IOException
InvalidRangeException
public long readToStream(Section section, java.io.OutputStream out) throws java.io.IOException, InvalidRangeException
java.io.IOException
InvalidRangeException
public Group getParentGroup()
getParentGroup
in class CDMNode
@Nullable public Structure getParentStructure()
getParentStructure
in class CDMNode
public boolean isMemberOfStructure()
isMemberOfStructure
in class CDMNode
public java.lang.String getFullName()
getFullName
in interface VariableSimpleIF
getFullName
in class CDMNode
public java.lang.String getNameAndDimensions()
public java.lang.String getNameAndDimensions(boolean strict)
strict
- strictly comply with ncgen syntax, with name escaping. otherwise, get extra info, no escaping@Deprecated public void getNameAndDimensions(java.lang.StringBuilder buf)
buf
- add info to this StringBuilder@Deprecated public void getNameAndDimensions(java.lang.StringBuffer buf)
buf
- add info to this StringBuffer@Deprecated public void getNameAndDimensions(java.lang.StringBuilder buf, boolean useFullName, boolean strict)
buf
- add info to thisuseFullName
- use full name else short name. strict = true implies short namestrict
- strictly comply with ncgen syntax, with name escaping. otherwise, get extra info, no escapingpublic void getNameAndDimensions(java.util.Formatter buf, boolean useFullName, boolean strict)
buf
- add info to thisuseFullName
- use full name else short name. strict = true implies short namestrict
- strictly comply with ncgen syntax, with name escaping. otherwise, get extra info, no escapingpublic java.lang.String toString()
toString
in class java.lang.Object
@Deprecated public java.lang.String writeCDL(boolean useFullName, boolean strict)
useFullName
- use full name, else use short namestrict
- strictly comply with ncgen syntax@Deprecated protected void writeCDL(java.util.Formatter buf, Indent indent, boolean useFullName, boolean strict)
public java.lang.String toStringDebug()
protected java.lang.String extraInfo()
public java.lang.String getDatasetLocation()
public boolean equals(java.lang.Object oo)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public int compareTo(VariableSimpleIF o)
compareTo
in interface java.lang.Comparable<VariableSimpleIF>
@Deprecated public void setDataType(DataType dataType)
dataType
- set to this value@Deprecated public java.lang.String setName(java.lang.String shortName)
shortName
- set to this value@Deprecated public void setParentGroup(Group group)
setParentGroup
in class CDMNode
group
- set to this value@Deprecated public void setElementSize(int elementSize)
elementSize
- set to this valuepublic AttributeContainer attributes()
attributes
in interface VariableSimpleIF
@Nullable public Attribute findAttribute(java.lang.String name)
findAttribute
in interface AttributeContainer
public java.lang.String findAttributeString(java.lang.String attName, java.lang.String defaultValue)
findAttributeString
in interface AttributeContainer
public boolean isEmpty()
AttributeContainer
isEmpty
in interface AttributeContainer
@Deprecated public java.util.List<Attribute> getAttributes()
VariableSimpleIF
getAttributes
in interface AttributeContainer
getAttributes
in interface VariableSimpleIF
@Deprecated public Attribute findAttributeIgnoreCase(java.lang.String name)
VariableSimpleIF
findAttributeIgnoreCase
in interface AttributeContainer
findAttributeIgnoreCase
in interface VariableSimpleIF
name
- attribute name@Deprecated public double findAttributeDouble(java.lang.String attName, double defaultValue)
AttributeContainer
findAttributeDouble
in interface AttributeContainer
@Deprecated public int findAttributeInteger(java.lang.String attName, int defaultValue)
AttributeContainer
findAttributeInteger
in interface AttributeContainer
@Deprecated public Attribute addAttribute(Attribute att)
AttributeContainer
addAttribute
in interface AttributeContainer
att
- add this Attribute@Deprecated public void addAll(java.lang.Iterable<Attribute> atts)
AttributeContainer
addAll
in interface AttributeContainer
@Deprecated public boolean remove(Attribute a)
AttributeContainer
remove
in interface AttributeContainer
a
- remove this attribute@Deprecated public boolean removeAttribute(java.lang.String attName)
AttributeContainer
removeAttribute
in interface AttributeContainer
attName
- if exists, remove this attribute@Deprecated public boolean removeAttributeIgnoreCase(java.lang.String attName)
AttributeContainer
removeAttributeIgnoreCase
in interface AttributeContainer
attName
- if exists, remove this attribute@Deprecated public void setDimensions(java.util.List<Dimension> dims)
dims
- list of type ucar.nc2.Dimension@Deprecated public void resetShape()
@Deprecated public void setDimensions(java.lang.String dimString)
dimString
- : whitespace separated list of dimension names, or '*' for Dimension.UNKNOWN, or number for anon
dimension. null or empty String is a scalar.@Deprecated public void resetDimensions()
@Deprecated public void setDimensionsAnonymous(int[] shape) throws InvalidRangeException
shape
- defines the dimension lengths. must be > 0, or -1 for VLENInvalidRangeException
- if any shape < 1@Deprecated public void setIsScalar()
@Deprecated public void setDimension(int idx, Dimension dim)
idx
- index into dimension arraydim
- to set@Deprecated public Variable setImmutable()
setImmutable
in class CDMNode
@Deprecated public boolean isImmutable()
public java.lang.Object getSPobject()
@Deprecated public void setSPobject(java.lang.Object spiObject)
public int getSizeToCache()
@Deprecated public void setSizeToCache(int sizeToCache)
sizeToCache
- size at which caching happens. < 0 means use defaults@Deprecated public void setCaching(boolean caching)
caching
- set if caching.public boolean isCaching()
This will always return false
if caching isn't permitted
.
@Deprecated public void invalidateCache()
@Deprecated public void setCachedData(Array cacheData)
@Deprecated public void setCachedData(Array cacheData, boolean isMetadata)
cacheData
- cache this ArrayisMetadata
- : synthesized data, set true if must be saved in NcML output (ie data not actually in the file).public void createNewCache()
public boolean hasCachedData()
@Deprecated public void setValues(int npts, double start, double incr)
npts
- number of values, must = v.getSize()start
- starting valueincr
- increment@Deprecated public void setValues(java.util.List<java.lang.String> values) throws java.lang.IllegalArgumentException
values
- list of Stringsjava.lang.IllegalArgumentException
- if values array not correct size, or values wont parse to the correct type@Deprecated public java.util.List<Dimension> getDimensionsAll()
@Deprecated public int[] getShapeAll()
public boolean isCoordinateVariable()
public Variable.Builder<?> toBuilder()
protected Variable.Builder<?> addLocalFieldsToBuilder(Variable.Builder<? extends Variable.Builder<?>> builder)
public static Variable.Builder<?> builder()
public boolean isUnknownLength()