Skip to content

Commit

Permalink
MONDRIAN: keep schema syntax compatible with previous versions, added…
Browse files Browse the repository at this point in the history
… test for defaultMember attribute in FoodMart.xml

[git-p4: depot-paths = "//open/mondrian/": change = 4968]
  • Loading branch information
Andreas Voss committed Jan 6, 2006
1 parent 2e4aa2a commit ceaac00
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions demo/FoodMart.xml
Expand Up @@ -155,13 +155,13 @@ WHERE "product"."product_class_id" = "product_class"."product_class_id"
<DimensionUsage name="Time" source="Time" foreignKey="time_id"/>
<DimensionUsage name="Product" source="Product" foreignKey="product_id"/>
<Dimension name="Promotion Media" foreignKey="promotion_id">
<Hierarchy hasAll="true" allMemberName="All Media" primaryKey="promotion_id">
<Hierarchy hasAll="true" allMemberName="All Media" primaryKey="promotion_id" defaultMember="All Media">
<Table name="promotion"/>
<Level name="Media Type" column="media_type" uniqueMembers="true"/>
</Hierarchy>
</Dimension>
<Dimension name="Promotions" foreignKey="promotion_id">
<Hierarchy hasAll="true" allMemberName="All Promotions" primaryKey="promotion_id">
<Hierarchy hasAll="true" allMemberName="All Promotions" primaryKey="promotion_id" defaultMember="[All Promotions]">
<Table name="promotion"/>
<Level name="Promotion Name" column="promotion_name" uniqueMembers="true"/>
</Hierarchy>
Expand Down
3 changes: 3 additions & 0 deletions src/main/mondrian/olap/Util.java
Expand Up @@ -329,6 +329,9 @@ public static StringBuffer replace(
}

public static String[] explode(String s) {
if (!s.startsWith("[")) {
return new String[]{s};
}
List list = new ArrayList();
int i = 0;
while (i < s.length()) {
Expand Down

0 comments on commit ceaac00

Please sign in to comment.