opendap/src/main/java/opendap/dap/DDS.java
public Stack search(String name, Stack compStack)
            throws NoSuchVariableException
    {
        DDSSearch ddsSearch = new DDSSearch(compStack);

        if (ddsSearch.deepSearch(name))
            return ddsSearch.components;
        else
            throw new NoSuchVariableException("The variable `" + name
                    + "' was not found in the dataset.");
    }
public Stack search(String name, Stack compStack)
            throws NoSuchVariableException
    {
        DDSSearch ddsSearch = new DDSSearch(compStack);

        if (ddsSearch.deepSearch(name))
            return ddsSearch.components;
        else
            throw new NoSuchVariableException("The variable `" + name
                    + "' was not found in the dataset.");
    }
public Stack search ( String name , Stack compStack ) throws NoSuchVariableException { DDSSearch ddsSearch = new DDSSearch ( compStack ) ; if ( ddsSearch . deepSearch ( name ) ) return ddsSearch . components ; else throw new NoSuchVariableException ( "The variable `" + name + "' was not found in the dataset." ) ; }
Look for <code>name</code> in the DDS. Start the search using the
ctor variable (or array/list of ctors) found on the top of the Stack
<code>compStack</code> (for component stack). When the named variable
is found, return the stack compStack modified so that it now contains
each ctor-type variable that on the path to the named variable. If the
variable is not found after exhausting all possibilities, throw
NoSuchVariable.<p>
<p/>
Note: This method takes the stack as a parameter so that it can be
used by a parser that is working through a list of identifiers that
represents the path to a variable <em>as well as</em> a shorthand
notation for the identifier that is the equivalent to the leaf node
name alone. In the form case the caller helps build the stack by
repeatedly calling <code>search</code>, in the latter case this method
must build the stack itself. This method is over kill for the first
case.

@param name      Search for the named variable.
@param compStack The component stack. This holds the BaseType variables
that match the each component of a specific variable's name. This
method starts its search using the element at the top of the stack and
adds to the stack. The order of BaseType variables on the stack is the
reverse of the tree-traverse order. That is, the top most element on
the stack is the BaseType for the named variable, <em>under</em> that
is the named variable's parent and so on.
@return A stack of BaseType variables which hold the path from the top
of the DDS to the named variable.
@throws NoSuchVariableException
Look for <code > name< / code > in the DDS . Start the search using the ctor variable ( or array / list of ctors ) found on the top of the Stack <code > compStack< / code > ( for component stack ) . When the named variable is found return the stack compStack modified so that it now contains each ctor - type variable that on the path to the named variable . If the variable is not found after exhausting all possibilities throw NoSuchVariable . <p > <p / > Note : This method takes the stack as a parameter so that it can be used by a parser that is working through a list of identifiers that represents the path to a variable <em > as well as< / em > a shorthand notation for the identifier that is the equivalent to the leaf node name alone . In the form case the caller helps build the stack by repeatedly calling <code > search< / code > in the latter case this method must build the stack itself . This method is over kill for the first case .