Package org.saiku.olap.query

Examples of org.saiku.olap.query.QueryDeserializer


  }

  @NotNull
  public SaikuQuery createNewOlapQuery(@Nullable String name, @NotNull String xml) {
    try {
      QueryDeserializer qd = new QueryDeserializer();
      SaikuCube scube = qd.getFakeCube(xml);
      OlapConnection con = olapDiscoverService.getNativeConnection(scube.getConnection());
      IQuery query = qd.unparse(xml, con);
      // TODO - this is not good! could lead to duplicate queries
      if (name == null) {
        name = UUID.randomUUID().toString();
        putIQuery(name, query);
      } else {
View Full Code Here


  }

  @NotNull
  private IQuery applyTag(@NotNull IQuery query, OlapConnection con, @NotNull SaikuTag t) throws Exception {
    String xml = query.toXml();
    QueryDeserializer qd = new QueryDeserializer();
    query = qd.unparse(xml, con);

    List<SimpleCubeElement> doneDimension = new ArrayList<SimpleCubeElement>();
    Map<String, QueryDimension> dimensionMap = new HashMap<String, QueryDimension>();
    if (t.getSaikuTupleDimensions() != null) {
      for (SimpleCubeElement st : t.getSaikuTupleDimensions()) {
View Full Code Here

  }

  @Nullable
  public ThinQuery convertQuery(@NotNull String xml) throws Exception {
    if (StringUtils.isNotBlank(xml) && xml.trim().startsWith("<?xml")) {
      QueryDeserializer qd = new QueryDeserializer();
      SaikuCube scube = qd.getFakeCube(xml);
      OlapConnection con = olapDiscoverService.getNativeConnection(scube.getConnection());
      IQuery query = qd.unparse(xml, con);

      if (QueryType.QM.equals(query.getType())) {
        OlapQuery qr = (OlapQuery) query;
        Query sQ = QueryConverter.convertQuery(qr.getQuery());
        SaikuCube converted = ObjectUtil.convert(scube.getConnection(), sQ.getCube());
View Full Code Here

TOP

Related Classes of org.saiku.olap.query.QueryDeserializer

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.