Package opendap.dap

Class DConstructor

    • Constructor Detail

      • DConstructor

        public DConstructor()
        Constructs a new DConstructor.
      • DConstructor

        public DConstructor​(String n)
        Constructs a new DConstructor with the given name.
        Parameters:
        n - The name of the variable.
    • Method Detail

      • addVariable

        public abstract void addVariable​(BaseType v,
                                         int part)
        Adds a variable to the container.
        Parameters:
        v - the variable to add.
        part - The part of the constructor data to be modified.
      • addVariable

        public final void addVariable​(BaseType v)
        Adds a variable to the container. Same as addVariable(v, 0).
        Parameters:
        v - the variable to add.
      • getVar

        public abstract BaseType getVar​(int index)
                                 throws NoSuchVariableException
        Gets the indexed variable. For a DGrid the index 0 returns the DArray and indexes 1 and higher return the associated map Vectors.
        Parameters:
        index - the index of the variable in the Vector Vars.
        Returns:
        the named variable.
        Throws:
        NoSuchVariableException - if the named variable does not exist in this container.
      • getVarCount

        public abstract int getVarCount()
        Get the number of contained variables (for use with getVar()
        Returns:
        the number of contained variables
      • getVariables

        public abstract com.google.common.collect.ImmutableList<BaseType> getVariables()
        Return a List of member Variables.
      • someChildHasAttributes

        protected boolean someChildHasAttributes​(BaseType bt)
        Parameters:
        bt - The BaseType object to search.
        Returns:
        true if some child of the passed BaseType has attributes
      • printXML

        public void printXML​(PrintWriter pw,
                             String pad,
                             boolean constrained)
        Overrides:
        printXML in class BaseType
        Parameters:
        pw - Where to print
        pad - Padding for iondentation (makes the output easier for humans to read).
        constrained - If true then only projected variables (and their Attributes) will be printed.