Package ucar.nc2

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

    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • addAttribute

        public T addAttribute​(Attribute att)
      • removeAttribute

        public T removeAttribute​(String attName)
      • 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
      • replaceDimension

        public void replaceDimension​(int idx,
                                     Dimension dim)
        Replace the ith dimension.
      • setDimensionsByName

        public T setDimensionsByName​(String dimString)
        Set dimensions by name. If not empty, 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.
      • getDimension

        public Dimension getDimension​(int idx)
      • getDimensionNamesAll

        public Set<String> getDimensionNamesAll()
      • isUnlimited

        public boolean isUnlimited()
      • isVariableLength

        public boolean isVariableLength()
      • setIsScalar

        public T setIsScalar()
      • getRank

        public int getRank()
      • getShape

        public int[] getShape()
      • getSize

        public long getSize()
      • setArrayType

        public T setArrayType​(ArrayType dataType)
      • getEnumTypeName

        public String getEnumTypeName()
      • getElementSize

        public int getElementSize()
      • 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)
      • setSourceData

        public T setSourceData​(Array<?> srcData)
      • setAutoGen

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

        public T resetAutoGen()
      • resetCache

        public T resetCache()
      • setIsCaching

        public T setIsCaching​(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)
        Copy metadata from orgVar.
      • build

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