Package org.olap4j.mdx

Examples of org.olap4j.mdx.ParseTreeNode


        for (AxisNode an : newSelectNode.getAxisList()) {
            if (an.getAxis() == axis) {
                // this is the axis we're drilling

                ParseTreeNode initialAxisExp = an.getExpression();

                // apply the drill operation
                ParseTreeNode newAxisExp =
                    processAxisExp(initialAxisExp);

                // replace the expression in the axis by the new generated one
                an.setExpression(newAxisExp);
            }
View Full Code Here


                cnodes);
    }

    protected static CallNode generateCrossJoin(List<ParseTreeNode> selections)
    {
        ParseTreeNode sel1 = selections.remove(0);
        if (sel1 instanceof MemberNode) {
            sel1 = generateSetCall(sel1);
        }
        if (selections.size() == 1) {
            ParseTreeNode sel2 = selections.get(0);
            if (sel2 instanceof MemberNode) {
                sel2 = generateSetCall(sel2);
            }
            return new CallNode(
                null, "CrossJoin", Syntax.Function, sel1, sel2);
View Full Code Here

        List<ParseTreeNode> curr,
        List<List<ParseTreeNode>> unions,
        List<Selection> selsWithContext,
        List<List<ParseTreeNode>> contextUnions)
    {
        ParseTreeNode exceptSet = null;
        QueryDimension qDim = axis.getDimensions().get(dim);

        List<Selection> exclusionSelections = qDim.getExclusions();
        List<ParseTreeNode> exclusionNodes = new ArrayList<ParseTreeNode>();

        // Check if any exclusions are selected for this dimension
        // and convert them to a list of nodes and then later a set
        for (Selection exclusion : exclusionSelections) {
            exclusionNodes.add(toOlap4j(exclusion));
        }
        if (exclusionNodes.size() > 0) {
            exceptSet = generateListSetCall(exclusionNodes);
        }

        for (Selection sel : qDim.getInclusions()) {
            ParseTreeNode selectionNode = toOlap4j(sel);
            // If a sort Order was specified for this dimension
            // apply it for this inclusion
            if (qDim.getSortOrder() != null) {
                CallNode currentMemberNode = new CallNode(
                        null,
View Full Code Here

                callNode = generateCrossJoin(unions.get(0));
            }
        }

        // We might need to sort the whole axis.
        ParseTreeNode sortedNode = null;
        if (axis.getSortOrder() != null) {
            LiteralNode evaluatorNode =
                 LiteralNode.createSymbol(
                     null,
                     axis.getSortIdentifierNodeName());
View Full Code Here

    static ParseTreeNode toOlap4j(
        Member member,
        Selection.Operator oper)
    {
        ParseTreeNode node = null;
        try {
            switch (oper) {
            case MEMBER:
                node = new MemberNode(null, member);
                break;
View Full Code Here

    static ParseTreeNode toOlap4j(
            Level level,
            Selection.Operator oper)
        {
            ParseTreeNode node = null;
            try {
                switch (oper) {
                case MEMBERS:
                    node =
                        new CallNode(
View Full Code Here

TOP

Related Classes of org.olap4j.mdx.ParseTreeNode

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.