opendap/src/main/java/opendap/servers/parsers/AST.java
SubClause translate()
        throws DAP2ServerSideException, DAP2Exception,
        NoSuchFunctionException, NoSuchVariableException
    {
        SubClause subclause = null;
        if(constant != null) {
            subclause = constant.translate();
        } else if(var != null) {
            Stack components = new Stack();
            components = var.collect(components);
            subclause = getClauseFactory().newValueClause((BaseType) components.pop(), false);
        } else if(fcn != null) {
            subclause = fcn.translate();
        } else
            assert (false);
        return subclause;
    }
SubClause translate()
        throws DAP2ServerSideException, DAP2Exception,
        NoSuchFunctionException, NoSuchVariableException
    {
        SubClause subclause = null;
        if(constant != null) {
            subclause = constant.translate();
        } else if(var != null) {
            Stack components = new Stack();
            components = var.collect(components);
            subclause = getClauseFactory().newValueClause((BaseType) components.pop(), false);
        } else if(fcn != null) {
            subclause = fcn.translate();
        } else
            assert (false);
        return subclause;
    }
SubClause translate ( ) throws DAP2ServerSideException , DAP2Exception , NoSuchFunctionException , NoSuchVariableException { SubClause subclause = null ; if ( constant != null ) { subclause = constant . translate ( ) ; } else if ( var != null ) { Stack components = new Stack ( ) ; components = var . collect ( components ) ; subclause = getClauseFactory ( ) . newValueClause ( ( BaseType ) components . pop ( ) , false ) ; } else if ( fcn != null ) { subclause = fcn . translate ( ) ; } else assert ( false ) ; return subclause ; }
/*
public String toString()
{
StringBuilder buf = new StringBuilder();
if(constant != null)
buf.append(constant.toString());
else if(var != null)
buf.append(var.toString());
else if(fcn != null)
buf.append(fcn.toString());
else
assert (false);
return buf.toString();
}
/ * public String toString () { StringBuilder buf = new StringBuilder () ; if ( constant ! = null ) buf . append ( constant . toString () ) ; else if ( var ! = null ) buf . append ( var . toString () ) ; else if ( fcn ! = null ) buf . append ( fcn . toString () ) ; else assert ( false ) ; return buf . toString () ; }