public abstract static class Variable.Builder<T extends Variable.Builder<T>> extends Object
| Modifier and Type | Field and Description |
|---|---|
Variable.Cache |
cache |
ArrayType |
dataType |
protected int |
elementSize |
NetcdfFile |
ncfile |
protected Group.Builder |
parentBuilder |
protected Structure.Builder<?> |
parentStructureBuilder |
ProxyReader |
proxyReader |
String |
shortName |
Object |
spiObject |
| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
T |
addAttribute(Attribute att) |
T |
addAttributes(Iterable<Attribute> atts) |
T |
addDimension(Dimension dim) |
T |
addDimensions(Collection<Dimension> dims) |
Variable |
build(Group parentGroup)
Normally this is called by Group.build()
|
Variable.Builder<?> |
copy() |
T |
copyFrom(Variable.Builder<?> builder) |
T |
copyFrom(Variable orgVar)
TODO Copy metadata from orgVar.
|
AttributeContainerMutable |
getAttributeContainer() |
Dimension |
getDimension(int idx) |
String |
getDimensionName(int index) |
Iterable<String> |
getDimensionNames() |
com.google.common.collect.ImmutableSet<String> |
getDimensionNamesAll() |
com.google.common.collect.ImmutableList<Dimension> |
getDimensions() |
int |
getElementSize() |
String |
getEnumTypeName() |
String |
getFirstDimensionName() |
String |
getFullName() |
Group.Builder |
getParentGroupBuilder() |
Structure.Builder<?> |
getParentStructureBuilder() |
int |
getRank() |
int[] |
getShape() |
long |
getSize() |
boolean |
isUnlimited() |
String |
makeDimensionsString() |
Variable.Builder<?> |
makeSliceBuilder(int dim,
int index)
Create a new Variable.Builder that is a logical slice of this one, by
fixing the specified dimension at the specified index value.
|
void |
replaceDimension(int idx,
Dimension dim)
Replace the ith dimension.
|
boolean |
replaceDimensionByName(Dimension dim)
Find the dimension with the same name as dim, and replace it with dim
|
T |
resetAutoGen() |
T |
resetCache() |
protected abstract T |
self() |
T |
setArrayType(ArrayType dataType) |
T |
setAutoGen(double start,
double incr) |
T |
setCachedData(Array cacheData,
boolean isMetadata)
Deprecated.
Use setSourceData(ucar.array.Array> srcData)
|
T |
setDataType(DataType dataType)
Deprecated.
use setArrayType()
|
T |
setDimensions(List<Dimension> dims) |
T |
setDimensionsAnonymous(int[] shape)
Set the dimensions using all anonymous (unshared) dimensions
|
T |
setDimensionsByName(String dimString)
Set dimensions by name.
|
T |
setElementSize(int elementSize) |
T |
setEnumTypeName(String enumTypeName) |
T |
setIsCaching(boolean caching) |
T |
setIsScalar() |
T |
setName(String shortName) |
T |
setNcfile(NetcdfFile ncfile) |
T |
setParentGroupBuilder(Group.Builder parent) |
T |
setProxyReader(ProxyReader proxy) |
T |
setSizeToCacheInBytes(int sizeToCacheBytes) |
T |
setSourceData(Array srcData)
Deprecated.
Use setSourceData(ucar.array.Array> srcData)
|
T |
setSourceData(Array<?> srcData) |
T |
setSPobject(Object spiObject) |
String |
toString() |
public String shortName
public ArrayType dataType
protected int elementSize
public NetcdfFile ncfile
protected Group.Builder parentBuilder
protected Structure.Builder<?> parentStructureBuilder
public Object spiObject
public ProxyReader proxyReader
public Variable.Cache cache
protected abstract T self()
public AttributeContainerMutable getAttributeContainer()
public T addDimensions(Collection<Dimension> dims)
public boolean replaceDimensionByName(Dimension dim)
public void replaceDimension(int idx,
Dimension dim)
public T setDimensionsByName(String dimString)
public String makeDimensionsString()
public T setDimensionsAnonymous(int[] shape)
shape - defines the dimension lengths. must be > 0, or -1 for VLENRuntimeException - if any shape < 1 and not -1.public com.google.common.collect.ImmutableList<Dimension> getDimensions()
public Dimension getDimension(int idx)
public com.google.common.collect.ImmutableSet<String> getDimensionNamesAll()
public boolean isUnlimited()
public T setIsScalar()
public int getRank()
public int[] getShape()
public long getSize()
@Deprecated public T setDataType(DataType dataType)
public String getEnumTypeName()
public int getElementSize()
public T setElementSize(int elementSize)
public T setNcfile(NetcdfFile ncfile)
public String getFullName()
public T setParentGroupBuilder(Group.Builder parent)
public Group.Builder getParentGroupBuilder()
public Structure.Builder<?> getParentStructureBuilder()
public T setProxyReader(ProxyReader proxy)
@Deprecated public T setCachedData(Array cacheData, boolean isMetadata)
cacheData - isMetadata - @Deprecated public T setSourceData(Array srcData)
srcData - public T setAutoGen(double start, double incr)
public T resetAutoGen()
public T resetCache()
public T setIsCaching(boolean caching)
public T setSizeToCacheInBytes(int sizeToCacheBytes)
public Variable.Builder<?> makeSliceBuilder(int dim, int index)
dim - which dimension to fixindex - at what index valuepublic Variable.Builder<?> copy()
public T copyFrom(Variable.Builder<?> builder)