Package ucar.nc2
Class Variable.Builder<T extends Variable.Builder<T>>
java.lang.Object
ucar.nc2.Variable.Builder<T>
- Direct Known Subclasses:
Structure.Builder,VariableDS.Builder
- Enclosing class:
- Variable
A builder for Variables.
-
Field Summary
FieldsModifier and TypeFieldDescriptionucar.nc2.Variable.Cache -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddAttribute(Attribute att) addAttributes(Iterable<Attribute> atts) addDimension(Dimension dim) addDimensions(Collection<Dimension> dims) Normally this is called by Group.build()copy()TODO Copy metadata from orgVar.copyFrom(Variable.Builder<?> builder) getDimensionName(int index) com.google.common.collect.ImmutableList<Dimension>com.google.common.collect.ImmutableSet<String>intintgetRank()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.booleanFind the dimension with the same name as dim, and replace it with dimsetAutoGen(double start, double incr) setCachedData(Array cacheData, boolean isMetadata) setCaching(boolean caching) setDataType(DataType dataType) setDimensions(List<Dimension> dims) setDimensionsAnonymous(int[] shape) Set the dimensions using all anonymous (unshared) dimensionssetDimensionsByName(String dimString) Set dimensions by name.setElementSize(int elementSize) setEnumTypeName(String enumTypeName) setNcfile(NetcdfFile ncfile) setParentGroupBuilder(Group.Builder parent) setProxyReader(ProxyReader proxy) setSPobject(Object spiObject) toString()
-
Field Details
-
shortName
-
dataType
-
ncfile
-
spiObject
-
proxyReader
-
cache
public ucar.nc2.Variable.Cache cache
-
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
addAttribute
-
addAttributes
-
getAttributeContainer
-
addDimension
-
addDimensions
-
setDimensions
-
replaceDimensionByName
Find the dimension with the same name as dim, and replace it with dim -
setDimensionsByName
Set dimensions by name. The parent group builder must be set. -
getFirstDimensionName
-
getDimensionName
-
getDimensionNames
-
makeDimensionsString
-
setDimensionsAnonymous
Set the dimensions using all anonymous (unshared) dimensions- Parameters:
shape- defines the dimension lengths. must be > 0, or -1 for VLEN- Throws:
RuntimeException- if any shape < 1 and not -1.
-
getDimensions
-
getDimensionsAll
-
setIsScalar
-
getRank
public int getRank() -
setDataType
-
getEnumTypeName
-
getElementSize
public int getElementSize() -
setElementSize
-
setEnumTypeName
-
setNcfile
-
setSPobject
-
setName
-
getFullName
-
setParentGroupBuilder
-
getParentGroupBuilder
-
getParentStructureBuilder
-
setProxyReader
-
setCachedData
-
setAutoGen
-
resetCache
-
setCaching
-
makeSliceBuilder
Create a new Variable.Builder that is a logical slice of this one, by fixing the specified dimension at the specified index value.- Parameters:
dim- which dimension to fixindex- at what index value
-
copy
-
copyFrom
TODO Copy metadata from orgVar. -
copyFrom
-
toString
-
build
Normally this is called by Group.build()
-