Bug 191637 Empty cube causes error
Comment removed as requested by the submitter - 2007-06-08 droy
data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/olap/data/impl/dimension/Hierarchy.java
{
			saveLevelMetadata( iterator, levelDefs[i] );
		}
	}
	
	/**
	 * 
	 * @param iterator
	 * @param levelDef
	 * @throws IOException
	 * @throws BirtException
	 */
	private void saveLevelMetadata( IDatasetIterator iterator, ILevelDefn levelDef ) throws IOException, BirtException
	{
		documentObj.writeString( levelDef.getLevelName( ) );
		documentObj.writeInt( levelDef.getKeyColumns( ).length );
		for ( int i = 0; i < levelDef.getKeyColumns( ).length; i++ )
		{
			documentObj.writeString( levelDef.getKeyColumns( )[i] );
			documentObj.writeInt( iterator.getFieldType( levelDef.getKeyColumns( )[i] ) );
		}
		String[] attributes = levelDef.getAttributeColumns( );
		if ( attributes != null )
		{
			documentObj.writeInt( attributes.length );
			for ( int j = 0; j < attributes.length; j++ )
			{
				documentObj.writeString( attributes[j] );
				documentObj.writeInt( iterator.getFieldType( attributes[j] ) );
			}