Package org.olap4j.mdx.parser.impl

Examples of org.olap4j.mdx.parser.impl.DefaultMdxParserImpl


    }

    public MdxParserFactory getParserFactory() {
        return new MdxParserFactory() {
            public MdxParser createMdxParser(OlapConnection connection) {
                return new DefaultMdxParserImpl();
            }

            public MdxValidator createMdxValidator(OlapConnection connection) {
                return new XmlaOlap4jMdxValidator(connection);
            }
View Full Code Here


            + " [CustomerDim].[CustomerName].&[XYZ]})'\n"
            + "SELECT\n"
            + "{[Measures].[Sales]} ON COLUMNS\n"
            + "FROM [cube]\n"
            + "WHERE ([CustomerDim].[CustomerName].[XL_QZX])";
        final MdxParser parser = new DefaultMdxParserImpl();
        SelectNode rootNode = parser.parseSelect(query);
        TestContext.assertEqualsVerbose(
            "WITH\n"
            + "MEMBER [CustomerDim].[CustomerName].[XL_QZX] AS\n"
            + "    Aggregate({[CustomerDim].[CustomerName].&[ABC INT'L], [CustomerDim].[CustomerName].&[XYZ]})\n"
            + "SELECT\n"
            + "{[Measures].[Sales]} ON COLUMNS\n"
            + "FROM [cube]\n"
            + "WHERE ([CustomerDim].[CustomerName].[XL_QZX])",
            rootNode.toString());

        // Now named set
        query =
            "WITH SET Foo as Filter(Bar.Members, Instr(Name, \"'\") > 0)\n"
            + "SELECT FROM [Cube]";
        rootNode = parser.parseSelect(query);
        TestContext.assertEqualsVerbose(
            "WITH\n"
            + "SET Foo AS\n"
            + "    Filter(Bar.Members, (Instr(Name, \"'\") > 0))\n"
            + "SELECT\n"
View Full Code Here

    }

    public MdxParserFactory getParserFactory() {
        return new MdxParserFactory() {
            public MdxParser createMdxParser(OlapConnection connection) {
                return new DefaultMdxParserImpl();
            }

            public MdxValidator createMdxValidator(OlapConnection connection) {
                return new MondrianOlap4jMdxValidator(connection);
            }
View Full Code Here

              }
            }
          }
          if (where) {
            mdx += ") ON COLUMNS from " + cube;
            SelectNode sn = new DefaultMdxParserImpl().parseSelect(q.getMdx());
            final Writer writer = new StringWriter();
            sn.getFilterAxis().unparse(new ParseTreeWriter(new PrintWriter(writer)));
            if (StringUtils.isNotBlank(writer.toString())) {
              mdx += "\r\nWHERE " + writer.toString();
            }
View Full Code Here

      CellSet cs = query.getCellset();
      SaikuCube cube = getQuery(queryName).getCube();
      final OlapConnection con = olapDiscoverService.getNativeConnection(cube.getConnection());
      stmt = con.createStatement();

      SelectNode sn = new DefaultMdxParserImpl().parseSelect(getMDXQuery(queryName));
      String select = null;
      StringBuilder buf = new StringBuilder();
      if (sn.getWithList() != null && sn.getWithList().size() > 0) {
        buf.append("WITH \n");
        StringWriter sw = new StringWriter();
View Full Code Here

      CellSet cs = queryContext.getOlapResult();
      SaikuCube cube = query.getCube();
      final OlapConnection con = olapDiscoverService.getNativeConnection(cube.getConnection());
      stmt = con.createStatement();

      SelectNode sn = new DefaultMdxParserImpl().parseSelect(query.getMdx());
      String select = null;
      StringBuilder buf = new StringBuilder();
      if (sn.getWithList() != null && sn.getWithList().size() > 0) {
        buf.append("WITH \n");
        StringWriter sw = new StringWriter();
View Full Code Here

    }

    public MdxParserFactory getParserFactory() {
        return new MdxParserFactory() {
            public MdxParser createMdxParser(OlapConnection connection) {
                return new DefaultMdxParserImpl();
            }

            public MdxValidator createMdxValidator(OlapConnection connection) {
                return new MondrianOlap4jMdxValidator(connection);
            }
View Full Code Here

TOP

Related Classes of org.olap4j.mdx.parser.impl.DefaultMdxParserImpl

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.