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 Enumeration getVariables()
        Return an Enumeration that can be used to iterate over all of the members of the class. Each implementation must define what this means. The intent of this method is to support operations on all members of a Structure, Seqeunce or Grid that can be performed equally. So it is not necessary that this methods be usable, for example, when the caller needs to know that it s dealing with the Array part of a grid.
        Returns:
        An Enumeration object.
      • someChildHasAttributes

        protected boolean someChildHasAttributes​(BaseType bt)
        Parameters:
        bt - The BasType 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.