Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MONDRIAN: Implement RANK with 3 arguments.
Add documentation to MemberFormatter. [git-p4: depot-paths = "//open/mondrian/": change = 3754]
- Loading branch information
1 parent
97fde98
commit 4577dab
Showing
6 changed files
with
574 additions
and
317 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,51 @@ | ||
/* | ||
//$Id$ | ||
//This software is subject to the terms of the Common Public License | ||
//Agreement, available at the following URL: | ||
//http://www.opensource.org/licenses/cpl.html. | ||
//Copyright (C) 2004-2005 TONBELLER AG | ||
//All Rights Reserved. | ||
//You must accept the terms of that agreement to use this software. | ||
// $Id$ | ||
// This software is subject to the terms of the Common Public License | ||
// Agreement, available at the following URL: | ||
// http://www.opensource.org/licenses/cpl.html. | ||
// Copyright (C) 2004-2005 TONBELLER AG | ||
// All Rights Reserved. | ||
// You must accept the terms of that agreement to use this software. | ||
*/ | ||
package mondrian.olap; | ||
|
||
/** | ||
* this interface provides a user exit to redefine | ||
* the member caption beeing displayed. | ||
* This interface provides an SPI to redefine the caption displayed | ||
* for members. | ||
* | ||
* <p>For example, the following class displays members of the time | ||
* dimension as "01-JAN-2005". | ||
* | ||
* <blockquote> | ||
* <code> | ||
* public class TimeMemberFormatter implements MemberFormatter {<br/> | ||
* public String formatMember(Member member) {<br/> | ||
* SimpleDateFormat inFormat =<br/> | ||
* new SimpleDateFormat("yyyy-MM-dd hh:mm:ss.S");<br/> | ||
* SimpleDateFormat outFormat =<br/> | ||
* new SimpleDateFormat("dd-MMM-yyyy");<br/> | ||
* try {<br/> | ||
* Date date = inFormat.parse(in.getName());<br/> | ||
* return outFormat.format(data);<br/> | ||
* } catch (ParseException e) {<br/> | ||
* e.printStackTrace();<br/> | ||
* return "error";<br/> | ||
* }<br/> | ||
* }<br/> | ||
* }<br/> | ||
* </code> | ||
* </blockquote> | ||
* | ||
* @author hhaas | ||
* @since 6 October, 2004 | ||
* @version $Id$ | ||
*/ | ||
public interface MemberFormatter { | ||
/** | ||
* Returns the string to be displayed as a caption for a given member. | ||
*/ | ||
String formatMember(Member m); | ||
} // MemberFormatter | ||
} | ||
|
||
// End MemberFormatter.java | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.