opendap/src/main/java/opendap/dap/DDS.java
private String convertDDSAliasFieldsToDASAliasFields(String attribute) throws MalformedAliasException
    {

        String prefix = "";

        Vector aNames = tokenizeAliasField(attribute);

        // We know that the first token should be a dot, we look at the
        // second token to see if it references a variable in the DDS.

        String topName = (String) aNames.get(1);

        boolean foundIt = false;
        Enumeration e = getVariables();
        while (e.hasMoreElements()) {
            BaseType bt = (BaseType) e.nextElement();
            String normName = normalize(bt.getEncodedName());

            if (topName.equals(normName))
                foundIt = true;
        }

        if (!foundIt) {
// The Attribute referenced is at the top level of the DDS itself.
            // The Attributes at the top level of the DDS get repackaged into
            // a special AttributeTable, this makes the Aliases that point to
            // any of these Attribute resolve correctly.
            prefix = "." + getLooseEndsTableName();

        }

        return (prefix + attribute);

    }
private String convertDDSAliasFieldsToDASAliasFields(String attribute) throws MalformedAliasException
    {

        String prefix = "";

        Vector aNames = tokenizeAliasField(attribute);

        // We know that the first token should be a dot, we look at the
        // second token to see if it references a variable in the DDS.

        String topName = (String) aNames.get(1);

        boolean foundIt = false;
        Enumeration e = getVariables();
        while (e.hasMoreElements()) {
            BaseType bt = (BaseType) e.nextElement();
            String normName = normalize(bt.getEncodedName());

            if (topName.equals(normName))
                foundIt = true;
        }

        if (!foundIt) {
// The Attribute referenced is at the top level of the DDS itself.
            // The Attributes at the top level of the DDS get repackaged into
            // a special AttributeTable, this makes the Aliases that point to
            // any of these Attribute resolve correctly.
            prefix = "." + getLooseEndsTableName();

        }

        return (prefix + attribute);

    }
private String convertDDSAliasFieldsToDASAliasFields ( String attribute ) throws MalformedAliasException { String prefix = "" ; Vector aNames = tokenizeAliasField ( attribute ) ; // We know that the first token should be a dot, we look at the // second token to see if it references a variable in the DDS. String topName = ( String ) aNames . get ( 1 ) ; boolean foundIt = false ; Enumeration e = getVariables ( ) ; while ( e . hasMoreElements ( ) ) { BaseType bt = ( BaseType ) e . nextElement ( ) ; String normName = normalize ( bt . getEncodedName ( ) ) ; if ( topName . equals ( normName ) ) foundIt = true ; } if ( ! foundIt ) { // The Attribute referenced is at the top level of the DDS itself. // The Attributes at the top level of the DDS get repackaged into // a special AttributeTable, this makes the Aliases that point to // any of these Attribute resolve correctly. prefix = "." + getLooseEndsTableName ( ) ; } return ( prefix + attribute ) ; }
This method just makes sure that the attribute field in each Aliases resolves correctly
if there ends up being a "looseEnds" Attribute Table at the top level.

@param attribute
@return
@throws MalformedAliasException
This method just makes sure that the attribute field in each Aliases resolves correctly if there ends up being a looseEnds Attribute Table at the top level .