Skip to content

Commit

Permalink
Fixes to the cube discovery for SAP BW <-> XML/A.
Browse files Browse the repository at this point in the history
git-svn-id: https://olap4j.svn.sourceforge.net/svnroot/olap4j/trunk@326 c6a108a4-781c-0410-a6c6-c2d559e19af0
  • Loading branch information
lucboudreau committed Jul 20, 2010
1 parent 8f72d8b commit c4079d7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
3 changes: 3 additions & 0 deletions src/org/olap4j/driver/xmla/XmlaOlap4jCellSet.java
Original file line number Diff line number Diff line change
Expand Up @@ -534,6 +534,9 @@ private XmlaOlap4jCube lookupCube(
if (cubeName.equals(cube.getName())) {
return (XmlaOlap4jCube) cube;
}
if (cubeName.equals("[" + cube.getName() + "]")) {
return (XmlaOlap4jCube) cube;
}
}
}
}
Expand Down
12 changes: 9 additions & 3 deletions src/org/olap4j/driver/xmla/XmlaOlap4jConnection.java
Original file line number Diff line number Diff line change
Expand Up @@ -1095,8 +1095,11 @@ public void handle(
// so try to use the unique name instead
final String hierarchyName =
stringElement(row, "HIERARCHY_NAME") == null
? hierarchyUniqueName
: stringElement(row, "HIERARCHY_NAME");
? (hierarchyUniqueName != null
? hierarchyUniqueName.replaceAll("^\\[", "")
.replaceAll("\\]$", "")
: null)
: stringElement(row, "HIERARCHY_NAME");
final String hierarchyCaption =
stringElement(row, "HIERARCHY_CAPTION");
final String description =
Expand Down Expand Up @@ -1163,7 +1166,10 @@ public void handle(
// so try to use the unique name instead
final String levelName =
stringElement(row, "LEVEL_NAME") == null
? levelUniqueName
? (levelUniqueName != null
? levelUniqueName.replaceAll("^\\[", "")
.replaceAll("\\]$", "")
: null)
: stringElement(row, "LEVEL_NAME");
final String levelCaption =
stringElement(row, "LEVEL_CAPTION");
Expand Down

0 comments on commit c4079d7

Please sign in to comment.