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
import org.eclipse.birt.data.engine.olap.data.api.cube.IHierarchy;
import org.eclipse.birt.data.engine.olap.data.api.cube.ILevelDefn;
import org.eclipse.birt.data.engine.olap.data.document.DocumentObjectUtil;
import org.eclipse.birt.data.engine.olap.data.document.IDocumentManager;
import org.eclipse.birt.data.engine.olap.data.document.IDocumentObject;
import org.eclipse.birt.data.engine.olap.data.impl.Constants;
import org.eclipse.birt.data.engine.olap.data.impl.NamingUtil;
import org.eclipse.birt.data.engine.olap.data.util.BufferedStructureArray;
import org.eclipse.birt.data.engine.olap.data.util.DiskIndex;
import org.eclipse.birt.data.engine.olap.data.util.DiskSortedStack;
import org.eclipse.birt.data.engine.olap.data.util.IDiskArray;
import org.eclipse.birt.data.engine.olap.data.util.IndexKey;
/**
 * Describes a hierarchy. A hierarchy is composed of multi-levels.
 */
public class Hierarchy implements IHierarchy
{
	private IDocumentManager documentManager = null;
	private IDocumentObject documentObj = null;
	private IDocumentObject offsetDocObj = null;
	private Level[] levels = null;
	private String name = null;
	private Map levelMap = new HashMap( );
	private String dimensionName;
	
	public Hierarchy( IDocumentManager documentManager, String dimensionName, String hierarchyName )
	{
		this.documentManager = documentManager;
		this.dimensionName = dimensionName;
		this.name = hierarchyName;