Skip to content

Commit

Permalink
First pass at olap4j 1.0.
Browse files Browse the repository at this point in the history
Introduces a new element at the top of the metadata hierarchy: database. 

Removes everything which was deprecated for removal in 1.0.

Modifies the OlapConnection class by standardizing the Database, Catalog and Schema bindings.

Cleanup of some warnings about generic types.

git-svn-id: https://olap4j.svn.sourceforge.net/svnroot/olap4j/trunk@404 c6a108a4-781c-0410-a6c6-c2d559e19af0
  • Loading branch information
lucboudreau committed Mar 18, 2011
1 parent 6987348 commit a0119c9
Show file tree
Hide file tree
Showing 21 changed files with 1,090 additions and 465 deletions.
2 changes: 1 addition & 1 deletion build.properties
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

project.revision=0.9.9-SNAPSHOT
project.revision.major=0
project.revision.minor=9090393
project.revision.minor=9090404
ivy.artifact.id=olap4j
ivy.artifact.group=org.olap4j
impl.title=olap4j
Expand Down
2 changes: 1 addition & 1 deletion ivy.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
<dependency org="hsqldb" name="hsqldb" rev="1.8.0.7"
transitive="false" conf="test->default" />

<dependency org="pentaho" name="mondrian" rev="3.2.1.14022"
<dependency org="pentaho" name="mondrian" rev="3.3-SNAPSHOT"
transitive="false" changing="true" conf="test->default" />

<dependency org="eigenbase" name="eigenbase-xom" rev="1.3.0.11999"
Expand Down
317 changes: 289 additions & 28 deletions src/org/olap4j/OlapConnection.java

Large diffs are not rendered by default.

68 changes: 0 additions & 68 deletions src/org/olap4j/OlapDatabaseMetaData.java
Original file line number Diff line number Diff line change
Expand Up @@ -102,56 +102,6 @@ ResultSet getActions(
String cubeNamePattern,
String actionNamePattern) throws OlapException;

/**
* Retrieves a list of olap4j data sources that are available on the server.
*
* <p>Specification as for XML/A DISCOVER_DATASOURCES schema rowset. The
* rows are ordered by <code>DATA_SOURCE_NAME</code>.
*
* <ol>
* <li><b>DATA_SOURCE_NAME</b> String => The name of the data source, such
* as FoodMart 2000.</li>
* <li><b>DATA_SOURCE_DESCRIPTION</b> String => A description of the data
* source, as entered by the publisher. (may be
* <code>null</code>)</li>
* <li><b>URL</b> String => The unique path that shows where to invoke the
* XML for Analysis methods for that data source. (may be
* <code>null</code>)</li>
* <li><b>DATA_SOURCE_INFO</b> String => A string containing any additional
* information required to connect to the data source. This can
* include the Initial Catalog property or other information for
* the provider.<br/>Example: "Provider=MSOLAP;Data
* Source=Local;" (may be <code>null</code>)</li>
* <li><b>PROVIDER_NAME</b> String => The name of the provider behind the
* data source. <br/>Example: "MSDASQL" (may be
* <code>null</code>)</li>
* <li><b>PROVIDER_TYPE</b> EnumerationArray => The types of data supported
* by the provider. May include one or more of the following
* types. Example follows this table.<br/>TDP: tabular data
* provider.<br/>MDP: multidimensional data provider.<br/>DMP:
* data mining provider. A DMP provider implements the OLE DB for
* Data Mining specification.</li>
* <li><b>AUTHENTICATION_MODE</b> EnumString => Specification of what type
* of security mode the data source uses. Values can be one of
* the following:<br/>Unauthenticated: no user ID or password
* needs to be sent.<br/>Authenticated: User ID and Password must
* be included in the information required for the
* connection.<br/>Integrated: the data source uses the
* underlying security to determine authorization, such as
* Integrated Security provided by Microsoft Internet Information
* Services (IIS).</li>
* </ol>
*
* @return a <code>ResultSet</code> object in which each row is a
* datasource description
* @exception OlapException if a database access error occurs
* @deprecated Deprecated in favor of
* {@link OlapDatabaseMetaData#getDatabases()}. Will be removed
* in version 1.0.
*/
@Deprecated
ResultSet getDatasources() throws OlapException;

/**
* Retrieves a row set describing the databases that are available on the
* server.
Expand Down Expand Up @@ -198,24 +148,6 @@ ResultSet getActions(
*/
ResultSet getDatabases() throws OlapException;

/**
* Returns a list of {@link org.olap4j.metadata.Catalog} objects which
* belong to this connection's OLAP server.
*
* <p>
* The list of returned catalogs is dependent on the underlying connection
* Database parameter. To discover catalogs in another database, use
* {@link OlapDatabaseMetaData#getDatabases()} and
* {@link OlapConnection#setDatabase(String)}
*
* <p>The caller should assume that the list is immutable;
* if the caller modifies the list, behavior is undefined.</p>
*
* @return List of Catalogs in this connection's OLAP server
* @throws OlapException if a database access error occurs
*/
NamedList<Catalog> getOlapCatalogs() throws OlapException;

/**
* Retrieves a list of information on supported literals, including data
* types and values.
Expand Down
7 changes: 7 additions & 0 deletions src/org/olap4j/driver/xmla/XmlaOlap4jCatalog.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,14 @@ class XmlaOlap4jCatalog implements Catalog, Named {
final XmlaOlap4jDatabaseMetaData olap4jDatabaseMetaData;
private final String name;
final DeferredNamedListImpl<XmlaOlap4jSchema> schemas;
private final XmlaOlap4jDatabase database;

XmlaOlap4jCatalog(
XmlaOlap4jDatabaseMetaData olap4jDatabaseMetaData,
XmlaOlap4jDatabase database,
String name)
{
this.database = database;
assert olap4jDatabaseMetaData != null;
assert name != null;
this.olap4jDatabaseMetaData = olap4jDatabaseMetaData;
Expand Down Expand Up @@ -79,6 +82,10 @@ public String getName() {
public OlapDatabaseMetaData getMetaData() {
return olap4jDatabaseMetaData;
}

public XmlaOlap4jDatabase getDatabase() {
return database;
}
}

// End XmlaOlap4jCatalog.java
1 change: 0 additions & 1 deletion src/org/olap4j/driver/xmla/XmlaOlap4jCell.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
package org.olap4j.driver.xmla;

import org.olap4j.*;
import org.olap4j.impl.ArrayMap;
import org.olap4j.impl.UnmodifiableArrayMap;
import org.olap4j.metadata.Property;

Expand Down
4 changes: 2 additions & 2 deletions src/org/olap4j/driver/xmla/XmlaOlap4jCellSet.java
Original file line number Diff line number Diff line change
Expand Up @@ -524,8 +524,8 @@ private XmlaOlap4jCube lookupCube(
XmlaOlap4jDatabaseMetaData databaseMetaData,
String cubeName) throws OlapException
{
for (XmlaOlap4jCatalog catalog
: databaseMetaData.getCatalogObjects())
for (Catalog catalog
: databaseMetaData.olap4jConnection.getOlapCatalogs())
{
for (Schema schema : catalog.getSchemas()) {
for (Cube cube : schema.getCubes()) {
Expand Down
Loading

0 comments on commit a0119c9

Please sign in to comment.