Examples of Cube


Examples of ch.epfl.lbd.database.olap.Cube

                                  Measure.AGGR_SUM,
                                  sql);
     
      //define cube
     
      Cube presenceCube = new MondrianCube("Presences",episodeFacts);
      presenceCube.addDimension(spaceDim);
      presenceCube.addMeasure(episodePresence);
     
      //define data warehouse
     
      DataWarehouse dw = new MondrianDataWarehouse("simone","test");
      dw.addCube(presenceCube);
View Full Code Here

Examples of ch.epfl.lbd.database.olap.Cube

                                  Measure.AGGR_SUM,
                                  sql);
     
      //define cube
     
      Cube presenceCube = new MondrianCube("Presences",episodeFacts);
      presenceCube.addDimension(spaceDim);
      presenceCube.addMeasure(episodePresence);
     
      //define data warehouse
     
      DataWarehouse dw = new MondrianDataWarehouse("simone","test");
      dw.addCube(presenceCube);
View Full Code Here

Examples of com.inadco.hbl.api.Cube

    }

    public Cube getCube(String cubeName) throws HblException {
        Map<String, Cube> map, update;
        map = cubeCache.get();
        Cube cube = map == null ? null : map.get(cubeName);

        // TTL check
        if (cube != null && (cube instanceof SimpleCube)) {
            SimpleCube scube = (SimpleCube) cube;
            if (System.currentTimeMillis() - scube.getTimestamp() >= cubeCacheTTL) {
View Full Code Here

Examples of de.IF_EF.BermudaThings.Cube

    cubes.add(null);
  }

  public static void addCube(int x, int y, int z, String filepath)
  {
    cubes.add(new Cube(filepath));
    int id = cubes.size() -1;
    if(Raster.setCubeId(x, y, z, id))
    {
     
    }
View Full Code Here

Examples of fr.tchocolate.qbe.world.Cube

    calculateColisions();
    move();
  }
 
  private void calculateColisions(){
    Cube under = world.getCube(position.x, position.y-1, position.z);
    if(under.getType() == Material.AIR && !jumping){
      falling = true;
    }else{
      falling = false;
    }
  }
View Full Code Here

Examples of graphics.common.Cube

    private class Get3D implements BoundingGet {
        @Override
        public Box get( double x, double y, double z,
                        double width, double height, double depth ) {
            return new Cube( x, y, z, width, height, depth );
        }
View Full Code Here

Examples of graphics.common.Cube

                        double width, double height, double depth ) {
            return new Cube( x, y, z, width, height, depth );
        }
        @Override
        public Box get( Point p, Size s ) {
            return new Cube( p, s );
        }
View Full Code Here

Examples of mondrian.olap.Cube

            .getErrorString( "MondrianModel.ERROR_0004_CUBE_NOT_SPECIFIED",
              connection.getConnectString() ) ); //$NON-NLS-1$ //$NON-NLS-2$
        return null;
      }

      Cube cube = null;
      if ( cubes.length == 1 ) {
        cube = cubes[ 0 ];
      } else {
        for ( Cube element : cubes ) {
          if ( element.getName().equals( cubeName ) ) {
            cube = element;
            break;
          }
        }
      }

      if ( cube == null ) {
        Logger
          .error(
            "MondrianModelComponent", Messages.getInstance()
            .getErrorString( "MondrianModel.ERROR_0005_CUBE_NOT_FOUND", cubeName,
              connection.getConnectString() ) ); //$NON-NLS-1$ //$NON-NLS-2$
        return null;
      }

      // If we have any whereConditions block, we need to find which hierarchies they are in
      // and not include them in the rows
      HashSet<Hierarchy> whereHierarchies = new HashSet<Hierarchy>();
      if ( catalogComplementInfo != null && catalogComplementInfo.getWhereCondition( cube.getName() ) != null
        && !catalogComplementInfo.getWhereCondition( cube.getName() ).equals( "" ) ) { //$NON-NLS-1$

        final String rawString = catalogComplementInfo.getWhereCondition( cube.getName() );

        // Caveat - It's possible that we have in the where condition a hierarchy that we don't have access
        // permissions; In this case, we'll ditch the where condition at all. Same for any error that
        // we find here

        try {

          // According to Julian, the better way to resolve the names is to build a query
          final String queryStr =
            "select " + rawString + " on columns, {} on rows from " + cube.getName(); //$NON-NLS-1$ //$NON-NLS-2$
          final Query query = connection.parseQuery( queryStr );

          final Hierarchy[] hierarchies = query.getMdxHierarchiesOnAxis( AxisOrdinal.StandardAxisOrdinal.COLUMNS );
          boolean isWhereValid = true;

          for ( int i = 0; i < hierarchies.length && isWhereValid; i++ ) {
            final Hierarchy hierarchy = hierarchies[ i ];
            if ( connection.getRole().canAccess( hierarchy ) ) {
              whereHierarchies.add( hierarchy );
            } else {
              isWhereValid = false;
              whereHierarchies.clear();
            }
          }

          if ( isWhereValid ) {
            whereMdx = " WHERE " + rawString; //$NON-NLS-1$
          }
        } catch ( Exception e ) {
          // We found an error in the where slicer, so we'll just act like it wasn't here
          whereHierarchies.clear();
        }
      }

      Dimension[] dimensions = cube.getDimensions();
      if ( ( dimensions == null ) || ( dimensions.length == 0 ) ) {
        Logger
          .error(
            "MondrianModelComponent", Messages.getInstance()
            .getErrorString( "MondrianModel.ERROR_0006_NO_DIMENSIONS", cubeName,
              connection.getConnectString() ) ); //$NON-NLS-1$ //$NON-NLS-2$
        return null;
      }

      for ( Dimension element : dimensions ) {

        final Hierarchy hierarchy = element.getHierarchy();
        if ( hierarchy == null ) {
          Logger
            .error(
              "MondrianModelComponent", Messages.getInstance()
              .getErrorString( "MondrianModel.ERROR_0007_NO_HIERARCHIES", element.getName(), cubeName,
                connection.getConnectString() ) ); //$NON-NLS-1$ //$NON-NLS-2$
          return null;
        }

        if ( !connection.getRole().canAccess( hierarchy ) ) {
          // We can't access this element
          continue;
        }

        if ( whereHierarchies.contains( hierarchy ) ) {
          // We have it on the where condition - skip it
          continue;
        }

        Member member =
          Locus.execute( (RolapConnection) connection, "Retrieving default members in plugin",
            new Locus.Action<Member>() {
              public Member execute() {
                return connection.getSchemaReader().getHierarchyDefaultMember( hierarchy );
              }
            } );

        if ( member == null ) {
          Logger
            .error(
              "MondrianModelComponent", Messages.getInstance()
              .getErrorString( "MondrianModel.ERROR_0008_NO_DEFAULT_MEMBER", element.getName(), cubeName,
                connection.getConnectString() ) ); //$NON-NLS-1$ //$NON-NLS-2$
          return null;
        }
        if ( element.isMeasures() ) {
          // measuresMdx = "with member "+ member.getUniqueName();
          // //$NON-NLS-1$
          measuresMdx = ""; //$NON-NLS-1$
          columnsMdx = " select NON EMPTY {" + member.getUniqueName() + "} ON columns, "; //$NON-NLS-1$ //$NON-NLS-2$
        } else {
          if ( rowsMdx.length() > 0 ) {
            rowsMdx.append( ", " ); //$NON-NLS-1$
          }
          rowsMdx.append( member.getUniqueName() );
        }
      }
      if ( ( measuresMdx != null ) && ( columnsMdx != null ) && ( rowsMdx.length() > 0 ) ) {
        StringBuffer result = new StringBuffer( measuresMdx.length() + columnsMdx.length() + rowsMdx.length() + 50 );
        result.append( measuresMdx ).append( columnsMdx ).append( "NON EMPTY {(" ) //$NON-NLS-1$
          .append( rowsMdx ).append( ")} ON rows " ) //$NON-NLS-1$
          .append( "from [" + cube.getName() + "]" ) //$NON-NLS-1$ //$NON-NLS-2$
          .append( whereMdx );

        return result.toString();

      }
View Full Code Here

Examples of mondrian.olap.Cube

    CacheControl cacheControl = mondrianConnection.getCacheControl(null);
    // retrieves the MDX query
    MdxQuery mdxQuery = (MdxQuery) olapModel.getExtension("mdxQuery");
    Query mondrianQuery = mondrianConnection.parseQuery(mdxQuery.getMdxQuery());
    // finds the cube in the MDX query
      Cube cube = mondrianQuery.getCube();
      // flush cache on all measures for that cube
      CacheControl.CellRegion measuresRegion = cacheControl.createMeasuresRegion(cube);
      cacheControl.flush(measuresRegion);
     
//    Cube[] cubes = mondrianConnection.getSchema().getCubes();
View Full Code Here

Examples of mondrian.olap.Cube

    // get the connection role, cube and schema reader
    RoleImpl connRole = (RoleImpl) monConnection.getRole();
    //connRole.makeMutableClone();
      logger.debug("DataSecurityManager::setMondrianRole:connection role retrived: " + connRole);
      Query monQuery = monConnection.parseQuery(query);
      Cube cube = monQuery.getCube();
      logger.debug("DataSecurityManager::setMondrianRole: cube retrived: " + cube);
      SchemaReader schemaReader = cube.getSchemaReader(null);
      logger.debug("DataSecurityManager::setMondrianRole: schema reader retrived: " + schemaReader);
   
     
      // FOR EACH DIMENSION NAME SET THE RIGHT GRANT TO THE DIMENSION OR HIERARCHY
      logger.debug("DataSecurityManager::setMondrianRole: start setting grant for each dimension or hierachy");
      Iterator iterDimRules = dimensionRules.iterator();
      while(iterDimRules.hasNext()){
        DimensionRulesBean drb = (DimensionRulesBean)iterDimRules.next();
        String dimName = drb.getName();
        String dimAccess = drb.getAccess();
        String bottomLevel = drb.getBottomLevel();
        String topLevel = drb.getTopLevel();
        String rollupPolicy = drb.getRollupPolicy();
        logger.debug("DataSecurityManager::setMondrianRole: processing dimension named: " + dimName);
        //List dimMembs = drb.getMembers();
        logger.debug("DataSecurityManager::setMondrianRole: try to search the dimension into the cube");
      Dimension[] dimensions = cube.getDimensions();
       for (int i = 0; i < dimensions.length; i++) {
            Dimension dim = dimensions[i];
            String cubeDimKey = dim.getName();
            if(cubeDimKey.equalsIgnoreCase(dimName)) {
              logger.debug("DataSecurityManager::setMondrianRole: dimension found into the cube");
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.