private void initNewSchema()
            throws CorrespondingDimensionNotExistsException {
        SortedSet<DimensionLevelPair> dimensionLevelPairs = targetCondition
                .getPairs();
        SortedSet<Dimension> fromDimensions = fromSchema.getDimensions();
        SortedSet<Dimension> newDimensions = new TreeSet<Dimension>();
        SortedSet<Level> fromLevels;
        SortedSet<Level> newLevels;
        List<Long> startPoint = setCondition.getStartPoint();
        List<Long> endPoint = setCondition.getEndPoint();
        System.err.println("startPoint:" + startPoint + " endPoint:" + endPoint);
        int newDimensionOrderNo = 0;
        Dimension correspondingDimension;
        for (DimensionLevelPair dimensionLevelPair : dimensionLevelPairs) {
            // dimensionRange
            DimensionRange newDimensionRange = new DimensionRange(
                    startPoint.get(newDimensionOrderNo),
                    endPoint.get(newDimensionOrderNo));
            // levels
            int dimensionNo = dimensionLevelPair.getDimensionOrderNo();
            int levelNo = dimensionLevelPair.getLevelOrderNo();
            correspondingDimension = findCorrespondingDimension(dimensionNo,
                    fromDimensions);
            long[] levelLengths = getLevelLengths(correspondingDimension);
            long dimensionStart[] = Serializer.deserialize(levelLengths,
                    new BigInteger(String.valueOf(newDimensionRange.getStart())));
            long dimensionEnd[] = Serializer.deserialize(levelLengths,
                    new BigInteger(String.valueOf(newDimensionRange.getEnd())));
            newLevels = new TreeSet<Level>();
            fromLevels = correspondingDimension.getLevels();
            Iterator<Level> iterator = fromLevels.iterator();
            long preLevelLength = 1;
            for (int newOrderNumber = 0; newOrderNumber <= levelNo
                    && iterator.hasNext(); newOrderNumber += 1) {
                Level tmpLevel = iterator.next();
                long length = (preLevelLength == 1 ? (dimensionEnd[newOrderNumber]
                        - dimensionStart[newOrderNumber] + 1)
                        : tmpLevel.getLength());
                preLevelLength = length;
                long begin = dimensionStart[newOrderNumber];
                newLevels.add(new Level(tmpLevel.getName(), length, begin,
                        newOrderNumber));
            }
            newDimensions.add(Dimension.getDimension(
                    correspondingDimension.getName(), newLevels,
                    newDimensionOrderNo, newDimensionRange));
            newDimensionOrderNo += 1;
            System.out.print("lengths: \t");
            for (Dimension dimension : newDimensions) {
                System.out.println(dimension.toString());
            }
            System.out.println();
        }
        newSchema = Schema.getSchema(newCubeIdentifier
                        + schemaNameAndDimensionNameDelimiter + fromSchema.getName(),
                newDimensions);
    }