Examples of MdxValidator


Examples of org.olap4j.mdx.parser.MdxValidator

  public Cube getCube() {
    final MdxParserFactory parserFactory =
        connection.getParserFactory();
    MdxParser mdxParser =
        parserFactory.createMdxParser(connection);
    MdxValidator mdxValidator =
        parserFactory.createMdxValidator(connection);

    String mdx = getMdx();
    try {

      if (mdx != null && mdx.length() > 0 && mdx.toUpperCase().contains("FROM")) {
        SelectNode select =
            mdxParser.parseSelect(getMdx());
        select = mdxValidator.validateSelect(select);
        CubeType cubeType = (CubeType) select.getFrom().getType();
        return cubeType.getCube();
      }
    } catch (Exception e) {
      LOG.debug("Parsing MDX to get the Cube failed. Using fallback scenario.", e);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.