Ejemplo n.º 1
0
 /**
  * @param datasourceType
  * @param datasource
  * @param cube
  * @return
  * @throws AccessDeniedException
  */
 public Collection<String> discoverMeasures(String datasourceType, String datasource, String cube)
     throws AccessDeniedException {
   DatasourceType dsType = null;
   if (datasourceType.equals(DatasourceType.XMLA.toString())) dsType = DatasourceType.XMLA;
   else dsType = DatasourceType.MONDRIAN;
   CubeDataExplorer cubeDataExplorer =
       new CubeDataExplorer(dsType, this.dsService.getDatasource(datasource, dsType), cube, "");
   List measuresList = cubeDataExplorer.getMeasuresList();
   if (measuresList == null) measuresList = new ArrayList();
   return measuresList;
 }
Ejemplo n.º 2
0
 /**
  * @param dsType
  * @param dsName
  * @return
  * @throws UnsupportedEncodingException
  * @throws OlapException
  * @throws AccessDeniedException
  * @throws ServiceException
  */
 @SuppressWarnings("unchecked")
 public List<String> discoverCubes(String dsType, String dsName)
     throws OlapException, UnsupportedEncodingException, AccessDeniedException {
   List<String> cubes = null;
   if (dsType.equals(DatasourceType.XMLA.toString())) {
     cubes =
         XMLAUtils.getCubesList(
             (XMLADatasource) this.dsService.getDatasource(dsName, DatasourceType.XMLA));
   } else if (dsType.equals(DatasourceType.MONDRIAN.toString())) {
     cubes =
         MondrianHelper.getCubesList(
             (MondrianDatasource) this.dsService.getDatasource(dsName, DatasourceType.MONDRIAN));
   }
   return cubes;
 }