Skip to content

Commit

Permalink
Fix bug 3142240, "Additional columns in cube discovery". (Patch contr…
Browse files Browse the repository at this point in the history
…ibuted by sjoynt.)

Also fix some checkFile exceptions.


git-svn-id: https://olap4j.svn.sourceforge.net/svnroot/olap4j/trunk@398 c6a108a4-781c-0410-a6c6-c2d559e19af0
  • Loading branch information
julianhyde committed Jan 10, 2011
1 parent 8ceb0e5 commit 9a3b7d8
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 13 deletions.
9 changes: 7 additions & 2 deletions src/org/olap4j/OlapDatabaseMetaData.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// This software is subject to the terms of the Eclipse Public License v1.0
// Agreement, available at the following URL:
// http://www.eclipse.org/legal/epl-v10.html.
// Copyright (C) 2006-2010 Julian Hyde
// Copyright (C) 2006-2011 Julian Hyde
// All Rights Reserved.
// You must accept the terms of that agreement to use this software.
*/
Expand Down Expand Up @@ -425,7 +425,12 @@ ResultSet getProperties(
* <li><b>IS_SQL_ENABLED</b> boolean => Describes whether or not SQL can be
* used on the cube</li>
* <li><b>DESCRIPTION</b> String (may be <code>null</code>) => A
* user-friendly description of the dimension.</li>
* user-friendly description of the cube.</li>
* <li><b>CUBE_CAPTION</b> String (may be <code>null</code>) =>
* The caption of the cube.</li>
* <li><b>BASE_CUBE_NAME</b> String (may be <code>null</code>) =>
* The name of the source cube if this cube is a perspective
* cube.</li>
* </ol>
*
* @param catalog a catalog name; must match the catalog name as it
Expand Down
8 changes: 5 additions & 3 deletions src/org/olap4j/driver/xmla/XmlaOlap4jConnection.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// This software is subject to the terms of the Eclipse Public License v1.0
// Agreement, available at the following URL:
// http://www.eclipse.org/legal/epl-v10.html.
// Copyright (C) 2007-2010 Julian Hyde
// Copyright (C) 2007-2011 Julian Hyde
// All Rights Reserved.
// You must accept the terms of that agreement to use this software.
*/
Expand Down Expand Up @@ -249,7 +249,7 @@ private void initSoapCache(Map<String, String> map) throws OlapException {
// Check if the current entry relates to cache config.
if (entry.getKey().startsWith(
XmlaOlap4jDriver.Property.Cache.name().toUpperCase()
+ ".")) //$NON-NLS-1$
+ "."))
{
props.put(entry.getKey().substring(
XmlaOlap4jDriver.Property.Cache.name()
Expand Down Expand Up @@ -1953,7 +1953,9 @@ enum MetadataRequest {
new MetadataColumn("IS_WRITE_ENABLED"),
new MetadataColumn("IS_LINKABLE"),
new MetadataColumn("IS_SQL_ENABLED"),
new MetadataColumn("DESCRIPTION")),
new MetadataColumn("DESCRIPTION"),
new MetadataColumn("CUBE_CAPTION"),
new MetadataColumn("BASE_CUBE_NAME")),
MDSCHEMA_DIMENSIONS(
new MetadataColumn("CATALOG_NAME"),
new MetadataColumn("SCHEMA_NAME"),
Expand Down
11 changes: 6 additions & 5 deletions src/org/olap4j/driver/xmla/XmlaOlap4jCube.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// This software is subject to the terms of the Eclipse Public License v1.0
// Agreement, available at the following URL:
// http://www.eclipse.org/legal/epl-v10.html.
// Copyright (C) 2007-2010 Julian Hyde
// Copyright (C) 2007-2011 Julian Hyde
// All Rights Reserved.
// You must accept the terms of that agreement to use this software.
*/
Expand Down Expand Up @@ -40,8 +40,6 @@ class XmlaOlap4jCube implements Cube, Named
new HashMap<String, XmlaOlap4jLevel>();
final List<XmlaOlap4jMeasure> measures =
new ArrayList<XmlaOlap4jMeasure>();
private final HashMap<String, XmlaOlap4jMeasure> measuresMap =
new HashMap<String, XmlaOlap4jMeasure>();
private final NamedList<XmlaOlap4jNamedSet> namedSets;
private final MetadataReader metadataReader;

Expand All @@ -51,6 +49,7 @@ class XmlaOlap4jCube implements Cube, Named
* @param olap4jSchema Schema
* @param name Name
* @param description Description
* @throws org.olap4j.OlapException on error
*/
XmlaOlap4jCube(
XmlaOlap4jSchema olap4jSchema,
Expand All @@ -63,6 +62,8 @@ class XmlaOlap4jCube implements Cube, Named
this.olap4jSchema = olap4jSchema;
this.name = name;
this.description = description;
final Map<String, XmlaOlap4jMeasure> measuresMap =
new HashMap<String, XmlaOlap4jMeasure>();
this.metadataReader =
new CachingMetadataReader(
new RawMetadataReader(),
Expand Down Expand Up @@ -431,8 +432,8 @@ public void lookupMembersByUniqueName(
Map<String, XmlaOlap4jMember> memberMap) throws OlapException
{
if (olap4jSchema.olap4jCatalog.olap4jDatabaseMetaData
.olap4jConnection.getDatabase()
.indexOf("Provider=Mondrian") != -1) //$NON-NLS-1$
.olap4jConnection.getDatabase()
.indexOf("Provider=Mondrian") != -1)
{
mondrianMembersLookup(memberUniqueNames, memberMap);
} else {
Expand Down
5 changes: 2 additions & 3 deletions testsrc/org/olap4j/OlapTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// This software is subject to the terms of the Eclipse Public License v1.0
// Agreement, available at the following URL:
// http://www.eclipse.org/legal/epl-v10.html.
// Copyright (C) 2007-2010 Julian Hyde
// Copyright (C) 2007-2011 Julian Hyde
// All Rights Reserved.
// You must accept the terms of that agreement to use this software.
*/
Expand Down Expand Up @@ -143,8 +143,7 @@ public void testModel() {
QueryDimension productQuery = query.getDimension("Product");

QueryDimension storeQuery = query.getDimension("Store");
QueryDimension timeQuery =
query.getDimension("Time"); //$NON-NLS-1$
QueryDimension timeQuery = query.getDimension("Time");

Member productMember =
cube.lookupMember(nameList("Product", "Drink"));
Expand Down

0 comments on commit 9a3b7d8

Please sign in to comment.