Package ucar.nc2

Class Variable.Builder<T extends Variable.Builder<T>>

    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • self

        protected abstract T self()
      • addAttribute

        public T addAttribute​(Attribute att)
      • addDimension

        public T addDimension​(Dimension dim)
      • replaceDimensionByName

        public boolean replaceDimensionByName​(Dimension dim)
        Find the dimension with the same name as dim, and replace it with dim
      • setDimensionsByName

        public T setDimensionsByName​(String dimString)
        Set dimensions by name. The parent group builder must be set.
      • getFirstDimensionName

        @Nullable
        public String getFirstDimensionName()
      • getDimensionName

        @Nullable
        public String getDimensionName​(int index)
      • makeDimensionsString

        public String makeDimensionsString()
      • setDimensionsAnonymous

        public T setDimensionsAnonymous​(int[] shape)
        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

        public com.google.common.collect.ImmutableList<Dimension> getDimensions()
      • getDimensionsAll

        public com.google.common.collect.ImmutableSet<String> getDimensionsAll()
      • setIsScalar

        public T setIsScalar()
      • getRank

        public int getRank()
      • setDataType

        public T setDataType​(DataType dataType)
      • getEnumTypeName

        public String getEnumTypeName()
      • getElementSize

        public int getElementSize()
      • setElementSize

        public T setElementSize​(int elementSize)
      • setEnumTypeName

        public T setEnumTypeName​(String enumTypeName)
      • setNcfile

        public T setNcfile​(NetcdfFile ncfile)
      • setSPobject

        public T setSPobject​(Object spiObject)
      • setName

        public T setName​(String shortName)
      • getFullName

        public String getFullName()
      • setParentGroupBuilder

        public T setParentGroupBuilder​(Group.Builder parent)
      • getParentGroupBuilder

        public Group.Builder getParentGroupBuilder()
      • getParentStructureBuilder

        public Structure.Builder<?> getParentStructureBuilder()
      • setProxyReader

        public T setProxyReader​(ProxyReader proxy)
      • setCachedData

        public T setCachedData​(Array cacheData,
                               boolean isMetadata)
      • setAutoGen

        public T setAutoGen​(double start,
                            double incr)
      • resetCache

        public T resetCache()
      • setCaching

        public T setCaching​(boolean caching)
      • makeSliceBuilder

        public 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.
        Parameters:
        dim - which dimension to fix
        index - at what index value
      • copyFrom

        public T copyFrom​(Variable orgVar)
        TODO Copy metadata from orgVar.
      • build

        public Variable build​(Group parentGroup)
        Normally this is called by Group.build()