/*  OpenOlap viewer
 *  パッケージ名：openolap.viewer
 *  ファイル：TimeDimensionInfo.java
 *  説明：
 *
 *  更新日: 2004/01/06
 */
package openolap.viewer.common;

/**
 *  クラス：TimeDimension
 *  説明：
 */
public class TimeDimensionInfo {

	// ========== クラス変数 ==========
	// 時間軸の表示名
	private static String yearLevelString    = "年";
	private static String halfLevelString    = "半期";
	private static String quarterLevelString = "四半期";
	private static String monthLevelString   = "月";
	private static String weekLevelString    = "週";
	private static String dayLevelString     = "日";


	// ========== メソッド ==========
	public String getTimeLevelDisplayString( String timeLevel ) {
		if(timeLevel == null){ throw new IllegalArgumentException(); }

		if ( timeLevel.equals("year") ) {
			return yearLevelString;
		} else if ( timeLevel.equals("half") ) {
			return halfLevelString;
		} else if ( timeLevel.equals("quarter") ) {
			return quarterLevelString;
		} else if ( timeLevel.equals("month") ) {
			return monthLevelString;
		} else if ( timeLevel.equals("week") ) {
			return weekLevelString;
		} else if ( timeLevel.equals("day") ) {
			return dayLevelString;
		} else {
			throw new IllegalArgumentException();
		}
	}


}
