dap4/d4cdm/src/main/java/dap4/cdm/nc2/CDMArrayStructure.java
public StructureData
    getScalarStructure(int index, StructureMembers.Member m)
    {
        if(m.getDataType() != DataType.STRUCTURE)
            throw new ForbiddenConversionException("Atomic field cannot be converted to Structure");
        Array ca = memberArray(index, memberIndex(m));
        if(ca.getDataType() != DataType.STRUCTURE && ca.getDataType() != DataType.SEQUENCE)
            throw new ForbiddenConversionException("Attempt to access non-structure member");
        CDMArrayStructure as = (CDMArrayStructure) ca;
        return as.getStructureData(0);
    }
public StructureData
    getScalarStructure(int index, StructureMembers.Member m)
    {
        if(m.getDataType() != DataType.STRUCTURE)
            throw new ForbiddenConversionException("Atomic field cannot be converted to Structure");
        Array ca = memberArray(index, memberIndex(m));
        if(ca.getDataType() != DataType.STRUCTURE && ca.getDataType() != DataType.SEQUENCE)
            throw new ForbiddenConversionException("Attempt to access non-structure member");
        CDMArrayStructure as = (CDMArrayStructure) ca;
        return as.getStructureData(0);
    }
public StructureData getScalarStructure ( int index , StructureMembers . Member m ) { if ( m . getDataType ( ) != DataType . STRUCTURE ) throw new ForbiddenConversionException ( "Atomic field cannot be converted to Structure" ) ; Array ca = memberArray ( index , memberIndex ( m ) ) ; if ( ca . getDataType ( ) != DataType . STRUCTURE && ca . getDataType ( ) != DataType . SEQUENCE ) throw new ForbiddenConversionException ( "Attempt to access non-structure member" ) ; CDMArrayStructure as = ( CDMArrayStructure ) ca ; return as . getStructureData ( 0 ) ; }
Non-atomic cases
Non - atomic cases