opendap/src/main/java/opendap/dap/parsers/DDSXMLParser.java
private BaseType newBaseTypeFactory(String typeString, String name) throws NoSuchTypeException {

        BaseType bt;

        if (typeString.equals("Array") || typeString.equals("Map")) {

            bt = factory.newDArray();
            bt.setClearName(name);

        } else if (typeString.equals("Grid")) {

            bt = factory.newDGrid();
            bt.setClearName(name);

        } else if (typeString.equals("Structure")) {

            bt = factory.newDStructure();
            bt.setClearName(name);

        } else if (typeString.equals("Sequence")) {

            bt = factory.newDSequence();
            bt.setClearName(name);

        } else if (typeString.equals("Int16")) {

            bt = factory.newDInt16();
            bt.setClearName(name);

        } else if (typeString.equals("UInt16")) {

            bt = factory.newDUInt16();
            bt.setClearName(name);

        } else if (typeString.equals("Int32")) {

            bt = factory.newDInt32();
            bt.setClearName(name);

        } else if (typeString.equals("UInt32")) {

            bt = factory.newDUInt32();
            bt.setClearName(name);

        } else if (typeString.equals("Float32")) {

            bt = factory.newDFloat32();
            bt.setClearName(name);

        } else if (typeString.equals("Float64")) {

            bt = factory.newDFloat64();
            bt.setClearName(name);

        } else if (typeString.equals("Byte")) {

            bt = factory.newDByte();
            bt.setClearName(name);

        } else if (typeString.equals("String")) {

            bt = factory.newDString();
            bt.setClearName(name);

        } else if (typeString.equals("Url")) {

            bt = factory.newDURL();
            bt.setClearName(name);

        } else
            throw new NoSuchTypeException("Unknown Type: " + typeString);

        return bt;

    }
private BaseType newBaseTypeFactory(String typeString, String name) throws NoSuchTypeException {

        BaseType bt;

        if (typeString.equals("Array") || typeString.equals("Map")) {

            bt = factory.newDArray();
            bt.setClearName(name);

        } else if (typeString.equals("Grid")) {

            bt = factory.newDGrid();
            bt.setClearName(name);

        } else if (typeString.equals("Structure")) {

            bt = factory.newDStructure();
            bt.setClearName(name);

        } else if (typeString.equals("Sequence")) {

            bt = factory.newDSequence();
            bt.setClearName(name);

        } else if (typeString.equals("Int16")) {

            bt = factory.newDInt16();
            bt.setClearName(name);

        } else if (typeString.equals("UInt16")) {

            bt = factory.newDUInt16();
            bt.setClearName(name);

        } else if (typeString.equals("Int32")) {

            bt = factory.newDInt32();
            bt.setClearName(name);

        } else if (typeString.equals("UInt32")) {

            bt = factory.newDUInt32();
            bt.setClearName(name);

        } else if (typeString.equals("Float32")) {

            bt = factory.newDFloat32();
            bt.setClearName(name);

        } else if (typeString.equals("Float64")) {

            bt = factory.newDFloat64();
            bt.setClearName(name);

        } else if (typeString.equals("Byte")) {

            bt = factory.newDByte();
            bt.setClearName(name);

        } else if (typeString.equals("String")) {

            bt = factory.newDString();
            bt.setClearName(name);

        } else if (typeString.equals("Url")) {

            bt = factory.newDURL();
            bt.setClearName(name);

        } else
            throw new NoSuchTypeException("Unknown Type: " + typeString);

        return bt;

    }
private BaseType newBaseTypeFactory ( String typeString , String name ) throws NoSuchTypeException { BaseType bt ; if ( typeString . equals ( "Array" ) || typeString . equals ( "Map" ) ) { bt = factory . newDArray ( ) ; bt . setClearName ( name ) ; } else if ( typeString . equals ( "Grid" ) ) { bt = factory . newDGrid ( ) ; bt . setClearName ( name ) ; } else if ( typeString . equals ( "Structure" ) ) { bt = factory . newDStructure ( ) ; bt . setClearName ( name ) ; } else if ( typeString . equals ( "Sequence" ) ) { bt = factory . newDSequence ( ) ; bt . setClearName ( name ) ; } else if ( typeString . equals ( "Int16" ) ) { bt = factory . newDInt16 ( ) ; bt . setClearName ( name ) ; } else if ( typeString . equals ( "UInt16" ) ) { bt = factory . newDUInt16 ( ) ; bt . setClearName ( name ) ; } else if ( typeString . equals ( "Int32" ) ) { bt = factory . newDInt32 ( ) ; bt . setClearName ( name ) ; } else if ( typeString . equals ( "UInt32" ) ) { bt = factory . newDUInt32 ( ) ; bt . setClearName ( name ) ; } else if ( typeString . equals ( "Float32" ) ) { bt = factory . newDFloat32 ( ) ; bt . setClearName ( name ) ; } else if ( typeString . equals ( "Float64" ) ) { bt = factory . newDFloat64 ( ) ; bt . setClearName ( name ) ; } else if ( typeString . equals ( "Byte" ) ) { bt = factory . newDByte ( ) ; bt . setClearName ( name ) ; } else if ( typeString . equals ( "String" ) ) { bt = factory . newDString ( ) ; bt . setClearName ( name ) ; } else if ( typeString . equals ( "Url" ) ) { bt = factory . newDURL ( ) ; bt . setClearName ( name ) ; } else throw new NoSuchTypeException ( "Unknown Type: " + typeString ) ; return bt ; }
The name of this method might be a bit misleading. This method is basically
a wrapper for the BaseTypeFactory associated with the DDS that we are building.
<p/>
I think it should really be a method of BaseTypeFactory.
<p/>
Something like:
<p/>
BaseTypeFactory.getNewVariable(String typeString, String name)
<p/>
But, well BaseTypeFactory is an interface, so that's a crappy idea. *sigh*
The name of this method might be a bit misleading . This method is basically a wrapper for the BaseTypeFactory associated with the DDS that we are building . <p / > I think it should really be a method of BaseTypeFactory . <p / > Something like : <p / > BaseTypeFactory . getNewVariable ( String typeString String name ) <p / > But well BaseTypeFactory is an interface so that s a crappy idea . * sigh *