Skip to content

Commit

Permalink
FARRAGO/FENNEL/MONDRIAN: Comply with latest checkFile.
Browse files Browse the repository at this point in the history
[git-p4: depot-paths = "//open/mondrian/": change = 12780]
  • Loading branch information
julianhyde committed May 23, 2009
1 parent cce5823 commit 11bd923
Show file tree
Hide file tree
Showing 44 changed files with 3,692 additions and 1,774 deletions.
10 changes: 7 additions & 3 deletions src/main/mondrian/olap/DelegatingSchemaReader.java
Expand Up @@ -143,7 +143,9 @@ public OlapElement getElementChild(
return schemaReader.getElementChild(parent, name, matchType);
}

public List<Member> getLevelMembers(Level level, boolean includeCalculated) {
public List<Member> getLevelMembers(
Level level, boolean includeCalculated)
{
return schemaReader.getLevelMembers(level, includeCalculated);
}

Expand Down Expand Up @@ -191,14 +193,16 @@ public int getLevelCardinality(
}

public List<Member> getLevelMembers(Level level, Evaluator context) {
return schemaReader.getLevelMembers(level, context);
return schemaReader.getLevelMembers(level, context);
}

public List<Member> getMemberChildren(Member member, Evaluator context) {
return schemaReader.getMemberChildren(member, context);
}

public List<Member> getMemberChildren(List<Member> members, Evaluator context) {
public List<Member> getMemberChildren(
List<Member> members, Evaluator context)
{
return schemaReader.getMemberChildren(members, context);
}

Expand Down
27 changes: 18 additions & 9 deletions src/main/mondrian/olap/MemberFormatter.java
Expand Up @@ -20,16 +20,25 @@
* <code>
* public class TimeMemberFormatter implements MemberFormatter {<br/>
* &nbsp;&nbsp;&nbsp;&nbsp;public String formatMember(Member member) {<br/>
* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SimpleDateFormat inFormat =<br/>
* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;new SimpleDateFormat("yyyy-MM-dd hh:mm:ss.S");<br/>
* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SimpleDateFormat outFormat =<br/>
* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;new SimpleDateFormat("dd-MMM-yyyy");<br/>
* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SimpleDateFormat
* inFormat =<br/>
* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;new
* SimpleDateFormat("yyyy-MM-dd hh:mm:ss.S");<br/>
* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SimpleDateFormat
* outFormat =<br/>
* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;new
* SimpleDateFormat("dd-MMM-yyyy");<br/>
* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;try {<br/>
* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Date date = inFormat.parse(in.getName());<br/>
* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return outFormat.format(data);<br/>
* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} catch (ParseException e) {<br/>
* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;e.printStackTrace();<br/>
* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return "error";<br/>
* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Date
* date = inFormat.parse(in.getName());<br/>
* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
* return outFormat.format(data);<br/>
* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} catch
* (ParseException e) {<br/>
* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
* e.printStackTrace();<br/>
* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
* return "error";<br/>
* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br/>
* &nbsp;&nbsp;&nbsp;&nbsp;}<br/>
* }<br/>
Expand Down
38 changes: 22 additions & 16 deletions src/main/mondrian/olap/MondrianProperties.java
Expand Up @@ -81,7 +81,8 @@ public static synchronized MondrianProperties instance() {
}

public MondrianProperties() {
this.propertySource = new FilePropertySource(new File(mondrianDotProperties));
this.propertySource =
new FilePropertySource(new File(mondrianDotProperties));
}

public boolean triggersAreEnabled() {
Expand Down Expand Up @@ -361,7 +362,9 @@ private void load(final PropertySource source) {
* {@code public [static] junit.framework.Test suite()}.</p>
*
* <p>Example:
* <blockquote><code>mondrian.test.Class=mondrian.test.FoodMartTestCase</code></blockquote>
* <blockquote><code>
* mondrian.test.Class=mondrian.test.FoodMartTestCase
* </code></blockquote>
*
* @see #TestName
*/
Expand Down Expand Up @@ -465,8 +468,9 @@ private void load(final PropertySource source) {
* <code>query<i>whatever</i>.xml</code> in the directory.
*
* <p>Example:
* <blockquote><code>mondrian.test.QueryFilePattern=queryTest_fec[A-Za-z0-9_]*.xml</code></blockquote>
*
* <blockquote><code>
* mondrian.test.QueryFilePattern=queryTest_fec[A-Za-z0-9_]*.xml
* </code></blockquote>
*/
public transient final StringProperty QueryFilePattern =
new StringProperty(
Expand Down Expand Up @@ -1011,14 +1015,14 @@ private void load(final PropertySource source) {
* <p>With mondrian.olap.agg.IgnoreMeasureForNonJoiningDimension=true
* Warehouse Sales gets eliminated and is ignored in the aggregate value.
* <blockquote>
* <p> [Store Sales] + [Warehouse Sales]
* <p> [Store Sales] + [Warehouse Sales]
* SUM({Product.members * Gender.members}) 7,913,333.82
* </blockquote>
* <p>With mondrian.olap.agg.IgnoreMeasureForNonJoiningDimension=false
* Warehouse Sales with Gender All level member contributes to the aggregate
* value.
* <blockquote>
* <p> [Store Sales] + [Warehouse Sales]
* <p> [Store Sales] + [Warehouse Sales]
* SUM({Product.members * Gender.members}) 9,290,730.03
* </blockquote>
* <p>On a report where Gender M, F and All members exist a user will see a
Expand All @@ -1034,9 +1038,10 @@ private void load(final PropertySource source) {
false);

/**
* Property determines if elements of dimension (levels, hierarchies, members)
* need to be prefixed with dimension name in MDX query.
* For example when the property is true, the following queries
* Property determines if elements of dimension (levels, hierarchies,
* members) need to be prefixed with dimension name in MDX query.
*
* <p>For example when the property is true, the following queries
* will error out. The same queries will work when this property
* is set to false.
* <blockquote>
Expand Down Expand Up @@ -1068,13 +1073,14 @@ private void load(final PropertySource source) {
* <p>
* [Gender].[All Gender].[M]
* </blockquote>
* <p>
* In a scenario where the schema is very large and dimensions have large
* number of members a MDX query that has a invalid member in it will cause
* mondrian to to go through all the dimensions, levels, hierarchies, members
* and properties trying to resolve the element name. This behaviour consumes
* considerable time and resources on the server. Setting this property to
* true will make it fail fast in a scenario where it is desirable
*
* <p> In a scenario where the schema is very large and dimensions have
* large number of members a MDX query that has a invalid member in it will
* cause mondrian to to go through all the dimensions, levels, hierarchies,
* members and properties trying to resolve the element name. This behavior
* consumes considerable time and resources on the server. Setting this
* property to true will make it fail fast in a scenario where it is
* desirable.
*/
public transient final BooleanProperty NeedDimensionPrefix =
new BooleanProperty(
Expand Down

0 comments on commit 11bd923

Please sign in to comment.