Package org.olap4j.mdx

Examples of org.olap4j.mdx.CallNode


        ParseTreeNode node,
        String funcName)
    {
        List<ParseTreeNode> callArgs = new ArrayList<ParseTreeNode>();
        callArgs.add(node);
        return new CallNode(null, funcName, Syntax.Property, callArgs);
    }
View Full Code Here


    public static CallNode makeLevelCallNode(ParseTreeNode node) {
        return _makePropCallNode(node, "Level");
    }

    public static CallNode makeSetCallNode(List<ParseTreeNode> nodes) {
        return new CallNode(null, "{}", Syntax.Braces, nodes);
    }
View Full Code Here

    }

    public static CallNode makeHierarchizeCallNode(ParseTreeNode node) {
        List<ParseTreeNode> callArgs = new ArrayList<ParseTreeNode>();
        callArgs.add(node);
        return new CallNode(null, "Hierarchize", Syntax.Function, callArgs);
    }
View Full Code Here

            list);
    }

    private static CallNode generateSetCall(ParseTreeNode... args) {
        return
            new CallNode(
                null,
                "{}",
                Syntax.Braces,
                args);
    }
View Full Code Here

                args);
    }

    private static CallNode generateListSetCall(List<ParseTreeNode> cnodes) {
        return
            new CallNode(
                null,
                "{}",
                Syntax.Braces,
                cnodes);
    }
View Full Code Here

                cnodes);
    }

    private static CallNode generateListTupleCall(List<ParseTreeNode> cnodes) {
        return
            new CallNode(
                null,
                "()",
                Syntax.Parentheses,
                cnodes);
    }
View Full Code Here

        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);
        } else {
            return new CallNode(
               null, "CrossJoin", Syntax.Function, sel1,
               generateCrossJoin(selections));
        }
    }
View Full Code Here

    }

    protected static CallNode generateUnion(List<List<ParseTreeNode>> unions) {
        if (unions.size() > 2) {
            List<ParseTreeNode> first = unions.remove(0);
            return new CallNode(
                null, "Union", Syntax.Function,
                generateCrossJoin(first),
                generateUnion(unions));
        } else {
            return new CallNode(
               null, "Union", Syntax.Function,
               generateCrossJoin(unions.get(0)),
               generateCrossJoin(unions.get(1)));
        }
    }
View Full Code Here

    }

    protected static CallNode generateHierarchizeUnion(
        List<List<ParseTreeNode>> unions)
    {
        return new CallNode(
            null, "Hierarchize", Syntax.Function,
            generateUnion(unions));
    }
View Full Code Here

        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,
                        "CurrentMember",
                        Syntax.Property,
                        new DimensionNode(null, sel.getDimension()));
                    CallNode currentMemberNameNode = new CallNode(
                        null,
                        "Name",
                        Syntax.Property,
                        currentMemberNode);
                    selectionNode =
                        new CallNode(
                            null,
                            "Order",
                            Syntax.Function,
                            generateSetCall(selectionNode),
                            currentMemberNameNode,
                            LiteralNode.createSymbol(
                                null,
                                qDim.getSortOrder().name()));
            }
            // If there are exlclusions wrap the ordered selection
            // in an Except() function
            if (exceptSet != null) {
                selectionNode = new CallNode(
                                    null,
                                    "Except",
                                    Syntax.Function,
                                    generateSetCall(selectionNode),
                                    exceptSet);
View Full Code Here

TOP

Related Classes of org.olap4j.mdx.CallNode

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.