Package org.pentaho.reporting.engine.classic.extensions.datasources.olap4j

Examples of org.pentaho.reporting.engine.classic.extensions.datasources.olap4j.DenormalizedMDXDataFactory


  {
  }

  protected AbstractMDXDataFactory createDataFactory(final OlapConnectionProvider connectionProvider)
  {
    return new DenormalizedMDXDataFactory(connectionProvider);
  }
View Full Code Here


    final AttributeList rootAttrs = new AttributeList();
    rootAttrs.addNamespaceDeclaration("data", Olap4JDataFactoryModule.NAMESPACE);

    xmlWriter.writeTag(Olap4JDataFactoryModule.NAMESPACE, "denormalized-mdx-datasource", rootAttrs, XmlWriter.OPEN);

    final DenormalizedMDXDataFactory pmdDataFactory = (DenormalizedMDXDataFactory) dataFactory;
    try
    {
      writeBody(pmdDataFactory, xmlWriter);
    }
    catch (BundleWriterException e)
View Full Code Here

    final AttributeList rootAttrs = new AttributeList();
    rootAttrs.addNamespaceDeclaration("data", Olap4JDataFactoryModule.NAMESPACE);

    xmlWriter.writeTag(Olap4JDataFactoryModule.NAMESPACE, "denormalized-mdx-datasource", rootAttrs, XmlWriter.OPEN);

    final DenormalizedMDXDataFactory pmdDataFactory = (DenormalizedMDXDataFactory) dataFactory;
    writeBody(pmdDataFactory, xmlWriter);

    xmlWriter.writeCloseTag();
    xmlWriter.close();
    return fileName;
View Full Code Here

  {
    DataSourcePlugin editor =
        DataFactoryRegistry.getInstance().getMetaData(DenormalizedMDXDataFactory.class.getName()).createEditor();
    assertNotNull(editor);

    assertTrue(editor.canHandle(new DenormalizedMDXDataFactory(new JndiConnectionProvider())));
  }
View Full Code Here

    final AttributeList rootAttrs = new AttributeList();
    rootAttrs.addNamespaceDeclaration("data", Olap4JDataFactoryModule.NAMESPACE);

    xmlWriter.writeTag(Olap4JDataFactoryModule.NAMESPACE, "denormalized-mdx-datasource", rootAttrs, XmlWriter.OPEN);

    final DenormalizedMDXDataFactory pmdDataFactory = (DenormalizedMDXDataFactory) dataFactory;
    try
    {
      writeBody(pmdDataFactory, xmlWriter);
    }
    catch (BundleWriterException e)
View Full Code Here

  {
  }

  protected AbstractMDXDataFactory createDataFactory(final OlapConnectionProvider connectionProvider)
  {
    return new DenormalizedMDXDataFactory(connectionProvider);
  }
View Full Code Here

    final AttributeList rootAttrs = new AttributeList();
    rootAttrs.addNamespaceDeclaration("data", Olap4JDataFactoryModule.NAMESPACE);

    xmlWriter.writeTag(Olap4JDataFactoryModule.NAMESPACE, "denormalized-mdx-datasource", rootAttrs, XmlWriter.OPEN);

    final DenormalizedMDXDataFactory pmdDataFactory = (DenormalizedMDXDataFactory) dataFactory;
    writeBody(pmdDataFactory, xmlWriter);

    xmlWriter.writeCloseTag();
    xmlWriter.close();
    return fileName;
View Full Code Here

    final OlapConnectionProvider connectionProvider = createConnectionProvider();
    if (connectionProvider == null)
    {
      return null;
    }
    final DenormalizedMDXDataFactory returnDataFactory = new DenormalizedMDXDataFactory(connectionProvider);
    configureQueries(returnDataFactory);
    return returnDataFactory;

  }
View Full Code Here

    setTitle(Messages.getString("DenormalizedMdxDataSourceEditor.Title"));
  }

  protected AbstractNamedMDXDataFactory createDataFactory()
  {
    final DenormalizedMDXDataFactory returnDataFactory;
    final JdbcConnectionDefinition connectionDefinition =
        (JdbcConnectionDefinition) getDialogModel().getConnections().getSelectedItem();

    if (connectionDefinition instanceof JndiConnectionDefinition)
    {
      final JndiConnectionDefinition jcd = (JndiConnectionDefinition) connectionDefinition;
      final JndiConnectionProvider provider = new JndiConnectionProvider();
      provider.setConnectionPath(jcd.getJndiName());
      provider.setUsername(jcd.getUsername());
      provider.setPassword(jcd.getPassword());
      returnDataFactory = new DenormalizedMDXDataFactory(provider);
    }
    else if (connectionDefinition instanceof DriverConnectionDefinition)
    {
      final DriverConnectionDefinition dcd = (DriverConnectionDefinition) connectionDefinition;
      final DriverConnectionProvider provider = new DriverConnectionProvider();
      provider.setDriver(dcd.getDriverClass());
      provider.setUrl(dcd.getConnectionString());

      final Properties properties = dcd.getProperties();
      final Enumeration keys = properties.keys();
      while (keys.hasMoreElements())
      {
        final String key = (String) keys.nextElement();
        provider.setProperty(key, properties.getProperty(key));
      }

      returnDataFactory = new DenormalizedMDXDataFactory(provider);
    }
    else
    {
      return null;
    }

    final KeyedComboBoxModel queries = getDialogModel().getQueries();
    for (int i = 0; i < queries.getSize(); i++)
    {
      returnDataFactory.setQuery((String) queries.getElementAt(i), (String) queries.getKeyAt(i));
    }
    return returnDataFactory;
  }
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.engine.classic.extensions.datasources.olap4j.DenormalizedMDXDataFactory

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.