private void cubeMetaInfoAction() throws DocumentException,
            XmlTypeErrorException {
        Document document = DocumentHelper.createDocument();
        Element root = document.addElement("properties");
        CubeMetaInfoXmlDriver cubeMetaInfoXmlDriver = new CubeMetaInfoXmlDriver(
                xmlRequest);
        String cubeIdentifier = cubeMetaInfoXmlDriver.getCubeIdentifier();
        root.addElement("cube").addText(cubeIdentifier);
        try {
            SchemaClientInterface schemaClient = SchemaClient.getSchemaClient();
            Schema schema = schemaClient.getSchema(cubeIdentifier);
            // schema
            Element schemaNode = root.addElement("schema");
            schemaNode.addElement("name").addText(schema.getName());
            Element dimensionsNode = schemaNode.addElement("dimensions");
            SortedSet<Dimension> dimensions = schema.getDimensions();
            for (Dimension dimension : dimensions) {
                Element dimensionNode = dimensionsNode.addElement("dimension");
                dimensionNode.addElement("name").addText(dimension.getName());
                Element levelsNode = dimensionNode.addElement("levels");
                SortedSet<Level> levels = dimension.getLevels();
                for (Level level : levels) {
                    Element levelNode = levelsNode.addElement("level");
                    levelNode.addElement("name").addText(level.getName());
                    levelNode.addElement("length").addText(
                            String.valueOf(level.getLength()));
                    levelNode.addElement("begin").addText(
                            String.valueOf(level.getBegin()));
                    levelNode.addElement("orderNumber").addText(
                            String.valueOf(level.getOrderNumber()));
                }
                dimensionNode.addElement("orderNumber").addText(
                        String.valueOf(dimension.getOrderNumber()));
                Element dimensionRangeNode = dimensionNode.addElement("range");
                DimensionRange dimensionRange = dimension.getRange();
                dimensionRangeNode.addElement("start").addText(
                        String.valueOf(dimensionRange.getStart()));
                dimensionRangeNode.addElement("end").addText(
                        String.valueOf(dimensionRange.getEnd()));
            }
            // pages
            Element pagesNode = root.addElement("pages");
            long numberOfPages = PageHelper.getNumberOfPages(schema);
            for (long pageNo = 0; pageNo < numberOfPages; pageNo += 1) {
                Element pageNode = pagesNode.addElement("page");
                pageNode.addElement("id").addText(String.valueOf(pageNo));
                String address = PathConf.getCubeElementPath() + cubeIdentifier
                        + "/" + pageNo;
                pageNode.addElement("address").addText(address);
            }
            // pageSegment
            Element pageSegmentNode = root.addElement("pageSegment");
            long numberOfPageSegmentsInDimension[] = PageHelper
                    .getNumberOfPageSegmentsInDimensions(schema);
            int i = 0;
            for (Dimension dimension : dimensions) {
                Element infoNode = pageSegmentNode.addElement("info");
                infoNode.addElement("dimensionName").addText(
                        dimension.getName());
                infoNode.addElement("amount").addText(
                        String.valueOf(numberOfPageSegmentsInDimension[i]));
                i += 1;
            }
            root.addElement("success").addText("true");
        } catch (CubeNotExistsException e) {
            root.addElement("success").addText("false");
            Element errorsNode = root.addElement("errors");
            errorsNode.addElement("error").addText(
                    "invalid key: range or format");
        } catch (SchemaNotExistsException e) {
            root.addElement("success").addText("false");
            Element errorsNode = root.addElement("errors");
            errorsNode.addElement("error").addText(
                    "invalid key: range or format");
        }
        this.returnXmlStr = document.asXML();
    }