Package mondrian.olap.Util

Examples of mondrian.olap.Util.PropertyList


     */
    private void checkSchemaFile(File file) {
        try {
            // this connection parses the catalog file which if invalid will
            // throw exception
            PropertyList list = new PropertyList();
            list.put("Provider", "mondrian");
            list.put("Jdbc", jdbcConnectionUrl);
            list.put("Catalog", file.toURL().toString());
            list.put("JdbcDrivers", jdbcDriverClassName);
            if (jdbcUsername != null && jdbcUsername.length() > 0) {
                list.put("JdbcUser", jdbcUsername);
            }
            if (jdbcPassword != null && jdbcPassword.length() > 0) {
                list.put("JdbcPassword", jdbcPassword);
            }

            // clear cache before connecting
            AggregationManager.instance().getCacheControl(null)
                .flushSchemaCache();
View Full Code Here


                    JOptionPane.WARNING_MESSAGE);
                sf.setSelected(true);
                return;
            }
            sfile = se.getSchemaFile();
            PropertyList list = new PropertyList();
            list.put("Provider", "mondrian");
            list.put("Jdbc", se.getJdbcConnectionUrl());
            list.put("Catalog", se.getSchemaFile().toURL().toString());
            final String jdbcUsername = se.getJdbcUsername();
            if (!ValidationUtils.isEmpty(jdbcUsername)) {
                list.put("JdbcUser", jdbcUsername);
            }
            final String jdbcPassword = se.getJdbcPassword();
            if (!ValidationUtils.isEmpty(jdbcPassword)) {
                list.put("JdbcPassword", jdbcPassword);
            }
            Connection con = DriverManager.getConnection(list, null);

            // clear cache before connecting
            AggregationManager.instance().getCacheControl(null)
View Full Code Here

                    JOptionPane.WARNING_MESSAGE);
                sf.setSelected(true);
                return;
            }
            sfile = se.getSchemaFile();
            PropertyList list = new PropertyList();
            list.put("Provider", "mondrian");
            list.put("Jdbc", se.getJdbcConnectionUrl());
            list.put("Catalog", se.getSchemaFile().toURL().toString());
            final String jdbcUsername = se.getJdbcUsername();
            if (!ValidationUtils.isEmpty(jdbcUsername)) {
                list.put("JdbcUser", jdbcUsername);
            }
            final String jdbcPassword = se.getJdbcPassword();
            if (!ValidationUtils.isEmpty(jdbcPassword)) {
                list.put("JdbcPassword", jdbcPassword);
            }
            Connection con = DriverManager.getConnection(list, null);

            // clear cache before connecting
            AggregationManager.instance().getCacheControl(null)
View Full Code Here

     */
    private void checkSchemaFile(File file) {
        try {
            // this connection parses the catalog file which if invalid will
            // throw exception
            PropertyList list = new PropertyList();
            list.put("Provider", "mondrian");
            list.put("Jdbc", jdbcConnectionUrl);
            list.put("Catalog", file.toURL().toString());
            list.put("JdbcDrivers", jdbcDriverClassName);
            if (jdbcUsername != null && jdbcUsername.length() > 0) {
                list.put("JdbcUser", jdbcUsername);
            }
            if (jdbcPassword != null && jdbcPassword.length() > 0) {
                list.put("JdbcPassword", jdbcPassword);
            }

            // clear cache before connecting
            AggregationManager.instance().getCacheControl(null)
                .flushSchemaCache();
View Full Code Here

    if ( olapService != null ) {
      MondrianCatalogRepositoryHelper helper =
          new MondrianCatalogRepositoryHelper( PentahoSystem.get( IUnifiedRepository.class ) );
      String serverName = null;
      for ( String name : helper.getOlap4jServers() ) {
        PropertyList props = Util.parseConnectString( helper.getOlap4jServerInfo( name ).URL );
        if ( props.get( RolapConnectionProperties.Catalog.name(), "" ).equals( context ) ) {
          serverName = name;
        }
      }
      if ( serverName != null ) {
        OlapConnection conn = null;
View Full Code Here

  protected String cleanseDataSourceInfo( String dataSourceInfo ) {
    if ( dataSourceInfo == null ) {
      return null;
    }
    // remove EnableXmla if necessary before building the key
    PropertyList propertyList = Util.parseConnectString( dataSourceInfo );
    if ( propertyList.get( "EnableXmla" ) != null ) { //$NON-NLS-1$
      propertyList.remove( "EnableXmla" ); //$NON-NLS-1$
    }
    if ( propertyList.get( "overwrite" ) != null ) { //$NON-NLS-1$
      propertyList.remove( "overwrite" ); //$NON-NLS-1$
    }
    return propertyList.toString();
  }
View Full Code Here

    }
  }

  protected String applyDSP( IPentahoSession ps, String catalogDsInfo, String catalogDefinition ) throws Exception {

    PropertyList pl = Util.parseConnectString( catalogDsInfo );
    String dsp = pl.get( RolapConnectionProperties.DynamicSchemaProcessor.name() );
    if ( dsp != null ) {
      if ( MondrianCatalogHelper.logger.isDebugEnabled() ) {
        MondrianCatalogHelper.logger.debug( "applyDSP: " + dsp ); //$NON-NLS-1$
      }
      DynamicSchemaProcessor dynProc = ClassResolver.INSTANCE.instantiateSafe( dsp );
      pl.put( "Locale", getLocale().toString() );
      return dynProc.processSchema( catalogDefinition, pl );
    } else {
      return docAtUrlToString( catalogDefinition, ps );
    }
  }
View Full Code Here

    String res = null;
    InputStream in = null;
    try {
      LocalizingDynamicSchemaProcessor schemaProcessor = new LocalizingDynamicSchemaProcessor();
      PropertyList localeInfo = new PropertyList();
      localeInfo.put( "Locale", getLocale().toString() ); //$NON-NLS-1$

      FileSystemManager fsManager = VFS.getManager();


      SolutionRepositoryVfsFileObject mondrianDS =
View Full Code Here

        }

        Node ds = node.selectSingleNode("DataSourceInfo");
        Node cat = node.selectSingleNode("Definition");
        String connectStr = ds.getStringValue();
        PropertyList pl = Util.parseConnectString(connectStr);
        String dynProcName = pl.get(
                    RolapConnectionProperties.DynamicSchemaProcessor.name());
        if (StringUtils.isNotBlank(dynamicSchemaProcessor) && StringUtils.isBlank(dynProcName)) {
          pl.put(RolapConnectionProperties.DynamicSchemaProcessor.name(), dynamicSchemaProcessor);
         
        }
        LOG.debug("NAME: " + name + " DSINFO: " + pl.toString() + "  ###CATALOG: " (cat != null ? cat.getStringValue() : "NULL"));
        Properties props = new Properties();
        props.put("driver", "mondrian.olap4j.MondrianOlap4jDriver");
        props.put("location","jdbc:mondrian:" + pl.toString() + ";Catalog=" + cat.getStringValue());
        if (saikuDatasourceProcessor != null) {
          props.put(ISaikuConnection.DATASOURCE_PROCESSORS, saikuDatasourceProcessor);
        }
        if (saikuConnectionProcessor != null) {
          props.put(ISaikuConnection.CONNECTION_PROCESSORS, saikuConnectionProcessor);
View Full Code Here

      throw new NullPointerException("DrillThroughSQL returned null");
    }
    ScriptableMondrianDrillThroughTableModel dtm = new ScriptableMondrianDrillThroughTableModel();
    dtm.setSql(sql);
    String connectString = getConnection().getConnectString();
    PropertyList connectInfo = mondrian.olap.Util.parseConnectString(connectString);
    String jdbcUrl = connectInfo.get(RolapConnectionProperties.Jdbc.name());
    dtm.setJdbcUrl(jdbcUrl);
    String jdbcUser = connectInfo.get(RolapConnectionProperties.JdbcUser.name());
    dtm.setJdbcUser(jdbcUser);
    String jdbcPassword = connectInfo.get(RolapConnectionProperties.JdbcPassword.name());
    dtm.setJdbcPassword(jdbcPassword);
    String dataSourceName = connectInfo.get(RolapConnectionProperties.DataSource.name());
    dtm.setDataSourceName(dataSourceName);
    String catalog = connectInfo.get(RolapConnectionProperties.Catalog.name());
    String catalogExtension = catalog.replaceFirst(".*/", "").replaceFirst("\\.xml$", ".ext.xml");
    dtm.setCatalogExtension(catalogExtension);
    return dtm;
  }
View Full Code Here

TOP

Related Classes of mondrian.olap.Util.PropertyList

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.