summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpshi2012-01-11 03:58:58 (EST)
committer mwu2012-01-11 03:58:58 (EST)
commitbef8a59ba6d62af7d479693854992724051b6d93 (patch)
tree0a6d11f6486c2344a7e222e7a35bc8713eb42376
parentcaa1560989c4ead93e94664ea2199fdd21104c93 (diff)
downloadorg.eclipse.birt-bef8a59ba6d62af7d479693854992724051b6d93.zip
org.eclipse.birt-bef8a59ba6d62af7d479693854992724051b6d93.tar.gz
org.eclipse.birt-bef8a59ba6d62af7d479693854992724051b6d93.tar.bz2
drop some trailing function, change some relative method name,update the
corresponding unit test
-rw-r--r--data/org.eclipse.birt.report.data.adapter/src/org/eclipse/birt/report/data/adapter/api/timeFunction/BaseTimeFunction.java40
-rw-r--r--data/org.eclipse.birt.report.data.adapter/src/org/eclipse/birt/report/data/adapter/api/timeFunction/TimeFunctionHandle.java60
-rw-r--r--data/org.eclipse.birt.report.data.adapter/src/org/eclipse/birt/report/data/adapter/api/timeFunction/TimeFunctionManager.java12
-rw-r--r--data/org.eclipse.birt.report.data.adapter/src/org/eclipse/birt/report/data/adapter/i18n/Messages.properties32
-rw-r--r--data/org.eclipse.birt.report.data.adapter/src/org/eclipse/birt/report/data/adapter/i18n/ResourceConstants.java18
-rw-r--r--data/org.eclipse.birt.report.data.adapter/test/org/eclipse/birt/report/data/adapter/internal/script/TimeFunctionManagerTest.java8
6 files changed, 104 insertions, 66 deletions
diff --git a/data/org.eclipse.birt.report.data.adapter/src/org/eclipse/birt/report/data/adapter/api/timeFunction/BaseTimeFunction.java b/data/org.eclipse.birt.report.data.adapter/src/org/eclipse/birt/report/data/adapter/api/timeFunction/BaseTimeFunction.java
index a422217..9a11f42 100644
--- a/data/org.eclipse.birt.report.data.adapter/src/org/eclipse/birt/report/data/adapter/api/timeFunction/BaseTimeFunction.java
+++ b/data/org.eclipse.birt.report.data.adapter/src/org/eclipse/birt/report/data/adapter/api/timeFunction/BaseTimeFunction.java
@@ -86,77 +86,77 @@ public class BaseTimeFunction implements ITimeFunction
if ( this.name.equals( IBuildInBaseTimeFunction.PREVIOUS_MONTH ) )
{
arguments.add( new ArgumentInfo( IArgumentInfo.N_PERIOD1,
- Message.getMessage( ResourceConstants.TIMEFUNCITON_N1_DISPLAYNAME ),
- Message.getMessage( ResourceConstants.TIMEFUNCITON_N1 ),
+ Message.getMessage( ResourceConstants.TIMEFUNCITON_N1_MONTH_DISPLAYNAME ),
+ Message.getMessage( ResourceConstants.TIMEFUNCITON_N1_MONTH ),
true ) );
}
else
if( this.name.equals( IBuildInBaseTimeFunction.PREVIOUS_QUARTER ) )
{
arguments.add( new ArgumentInfo( IArgumentInfo.N_PERIOD1,
- Message.getMessage( ResourceConstants.TIMEFUNCITON_N1_DISPLAYNAME ),
- Message.getMessage( ResourceConstants.TIMEFUNCITON_N1 ),
+ Message.getMessage( ResourceConstants.TIMEFUNCITON_N1_QUARTER_DISPLAYNAME ),
+ Message.getMessage( ResourceConstants.TIMEFUNCITON_N1_QUARTER ),
true ) );
}
else
if( this.name.equals( IBuildInBaseTimeFunction.PREVIOUS_YEAR ) )
{
arguments.add( new ArgumentInfo( IArgumentInfo.N_PERIOD1,
- Message.getMessage( ResourceConstants.TIMEFUNCITON_N1_DISPLAYNAME ),
- Message.getMessage( ResourceConstants.TIMEFUNCITON_N1 ),
+ Message.getMessage( ResourceConstants.TIMEFUNCITON_N1_YEAR_DISPLAYNAME ),
+ Message.getMessage( ResourceConstants.TIMEFUNCITON_N1_YEAR ),
true ) );
}
else if ( this.name.equals( IBuildInBaseTimeFunction.WEEK_TO_DATE_LAST_YEAR ) )
{
arguments.add( new ArgumentInfo( IArgumentInfo.N_PERIOD1,
- Message.getMessage( ResourceConstants.TIMEFUNCITON_N1_DISPLAYNAME ),
- Message.getMessage( ResourceConstants.TIMEFUNCITON_N1 ),
+ Message.getMessage( ResourceConstants.TIMEFUNCITON_N1_YEAR_DISPLAYNAME ),
+ Message.getMessage( ResourceConstants.TIMEFUNCITON_N1_YEAR ),
true ) );
}
else
if( this.name.equals( IBuildInBaseTimeFunction.MONTH_TO_DATE_LAST_YEAR ) )
{
arguments.add( new ArgumentInfo( IArgumentInfo.N_PERIOD1,
- Message.getMessage( ResourceConstants.TIMEFUNCITON_N1_DISPLAYNAME ),
- Message.getMessage( ResourceConstants.TIMEFUNCITON_N1 ),
+ Message.getMessage( ResourceConstants.TIMEFUNCITON_N1_YEAR_DISPLAYNAME ),
+ Message.getMessage( ResourceConstants.TIMEFUNCITON_N1_YEAR ),
true ) );
}
else
if( this.name.equals( IBuildInBaseTimeFunction.QUARTER_TO_DATE_LAST_YEAR ) )
{
arguments.add( new ArgumentInfo( IArgumentInfo.N_PERIOD1,
- Message.getMessage( ResourceConstants.TIMEFUNCITON_N1_DISPLAYNAME ),
- Message.getMessage( ResourceConstants.TIMEFUNCITON_N1 ),
+ Message.getMessage( ResourceConstants.TIMEFUNCITON_N1_YEAR_DISPLAYNAME ),
+ Message.getMessage( ResourceConstants.TIMEFUNCITON_N1_YEAR ),
true ) );
}
else if ( this.name.equals( IBuildInBaseTimeFunction.PREVIOUS_WEEK_TO_DATE ) )
{
arguments.add( new ArgumentInfo( IArgumentInfo.N_PERIOD1,
- Message.getMessage( ResourceConstants.TIMEFUNCITON_N1_DISPLAYNAME ),
- Message.getMessage( ResourceConstants.TIMEFUNCITON_N1 ),
+ Message.getMessage( ResourceConstants.TIMEFUNCITON_N1_WEEK_DISPLAYNAME ),
+ Message.getMessage( ResourceConstants.TIMEFUNCITON_N1_WEEK ),
true ) );
}
else
if( this.name.equals( IBuildInBaseTimeFunction.PREVIOUS_MONTH_TO_DATE ) )
{
arguments.add( new ArgumentInfo( IArgumentInfo.N_PERIOD1,
- Message.getMessage( ResourceConstants.TIMEFUNCITON_N1_DISPLAYNAME ),
- Message.getMessage( ResourceConstants.TIMEFUNCITON_N1 ),
+ Message.getMessage( ResourceConstants.TIMEFUNCITON_N1_MONTH_DISPLAYNAME ),
+ Message.getMessage( ResourceConstants.TIMEFUNCITON_N1_MONTH ),
true ) );
}
else if( this.name.equals( IBuildInBaseTimeFunction.PREVIOUS_QUARTER_TO_DATE ) )
{
arguments.add( new ArgumentInfo( IArgumentInfo.N_PERIOD1,
- Message.getMessage( ResourceConstants.TIMEFUNCITON_N1_DISPLAYNAME ),
- Message.getMessage( ResourceConstants.TIMEFUNCITON_N1 ),
+ Message.getMessage( ResourceConstants.TIMEFUNCITON_N1_QUARTER_DISPLAYNAME ),
+ Message.getMessage( ResourceConstants.TIMEFUNCITON_N1_QUARTER ),
true ) );
}
else if( this.name.equals( IBuildInBaseTimeFunction.PREVIOUS_YEAR_TO_DATE ))
{
arguments.add( new ArgumentInfo( IArgumentInfo.N_PERIOD1,
- Message.getMessage( ResourceConstants.TIMEFUNCITON_N1_DISPLAYNAME ),
- Message.getMessage( ResourceConstants.TIMEFUNCITON_N1 ),
+ Message.getMessage( ResourceConstants.TIMEFUNCITON_N1_YEAR_DISPLAYNAME ),
+ Message.getMessage( ResourceConstants.TIMEFUNCITON_N1_YEAR ),
true ) );
}
else if ( this.name.equals( IBuildInBaseTimeFunction.CURRENT_PERIOD_FROM_N_PERIOD_AGO ) )
diff --git a/data/org.eclipse.birt.report.data.adapter/src/org/eclipse/birt/report/data/adapter/api/timeFunction/TimeFunctionHandle.java b/data/org.eclipse.birt.report.data.adapter/src/org/eclipse/birt/report/data/adapter/api/timeFunction/TimeFunctionHandle.java
index 3f52830..be87188 100644
--- a/data/org.eclipse.birt.report.data.adapter/src/org/eclipse/birt/report/data/adapter/api/timeFunction/TimeFunctionHandle.java
+++ b/data/org.eclipse.birt.report.data.adapter/src/org/eclipse/birt/report/data/adapter/api/timeFunction/TimeFunctionHandle.java
@@ -106,36 +106,36 @@ public class TimeFunctionHandle
local ),
Message.getMessage( ResourceConstants.TIMEFUNCITON_PREVIOUS_YEAR_DES,
local ) ) );
- baseTimeFunctionMap.put( IBuildInBaseTimeFunction.TRAILING_30_DAYS,
- new BaseTimeFunction( IBuildInBaseTimeFunction.TRAILING_30_DAYS,
- Message.getMessage( ResourceConstants.TIMEFUNCITON_TRAILING_30_DAYS,
- local ),
- Message.getMessage( ResourceConstants.TIMEFUNCITON_TRAILING_30_DAYS_DES,
- local ) ) );
- baseTimeFunctionMap.put( IBuildInBaseTimeFunction.TRAILING_60_DAYS,
- new BaseTimeFunction( IBuildInBaseTimeFunction.TRAILING_60_DAYS,
- Message.getMessage( ResourceConstants.TIMEFUNCITON_TRAILING_60_DAYS,
- local ),
- Message.getMessage( ResourceConstants.TIMEFUNCITON_TRAILING_60_DAYS_DES,
- local ) ) );
- baseTimeFunctionMap.put( IBuildInBaseTimeFunction.TRAILING_90_DAYS,
- new BaseTimeFunction( IBuildInBaseTimeFunction.TRAILING_90_DAYS,
- Message.getMessage( ResourceConstants.TIMEFUNCITON_TRAILING_90_DAYS,
- local ),
- Message.getMessage( ResourceConstants.TIMEFUNCITON_TRAILING_90_DAYS_DES,
- local ) ) );
- baseTimeFunctionMap.put( IBuildInBaseTimeFunction.TRAILING_120_DAYS,
- new BaseTimeFunction( IBuildInBaseTimeFunction.TRAILING_120_DAYS,
- Message.getMessage( ResourceConstants.TIMEFUNCITON_TRAILING_120_DAYS,
- local ),
- Message.getMessage( ResourceConstants.TIMEFUNCITON_TRAILING_120_DAYS_DES,
- local ) ) );
- baseTimeFunctionMap.put( IBuildInBaseTimeFunction.TRAILING_12_MONTHS,
- new BaseTimeFunction( IBuildInBaseTimeFunction.TRAILING_12_MONTHS,
- Message.getMessage( ResourceConstants.TIMEFUNCITON_TRAILING_12_MONTHS,
- local ),
- Message.getMessage( ResourceConstants.TIMEFUNCITON_TRAILING_12_MONTHS_DES,
- local ) ) );
+// baseTimeFunctionMap.put( IBuildInBaseTimeFunction.TRAILING_30_DAYS,
+// new BaseTimeFunction( IBuildInBaseTimeFunction.TRAILING_30_DAYS,
+// Message.getMessage( ResourceConstants.TIMEFUNCITON_TRAILING_30_DAYS,
+// local ),
+// Message.getMessage( ResourceConstants.TIMEFUNCITON_TRAILING_30_DAYS_DES,
+// local ) ) );
+// baseTimeFunctionMap.put( IBuildInBaseTimeFunction.TRAILING_60_DAYS,
+// new BaseTimeFunction( IBuildInBaseTimeFunction.TRAILING_60_DAYS,
+// Message.getMessage( ResourceConstants.TIMEFUNCITON_TRAILING_60_DAYS,
+// local ),
+// Message.getMessage( ResourceConstants.TIMEFUNCITON_TRAILING_60_DAYS_DES,
+// local ) ) );
+// baseTimeFunctionMap.put( IBuildInBaseTimeFunction.TRAILING_90_DAYS,
+// new BaseTimeFunction( IBuildInBaseTimeFunction.TRAILING_90_DAYS,
+// Message.getMessage( ResourceConstants.TIMEFUNCITON_TRAILING_90_DAYS,
+// local ),
+// Message.getMessage( ResourceConstants.TIMEFUNCITON_TRAILING_90_DAYS_DES,
+// local ) ) );
+// baseTimeFunctionMap.put( IBuildInBaseTimeFunction.TRAILING_120_DAYS,
+// new BaseTimeFunction( IBuildInBaseTimeFunction.TRAILING_120_DAYS,
+// Message.getMessage( ResourceConstants.TIMEFUNCITON_TRAILING_120_DAYS,
+// local ),
+// Message.getMessage( ResourceConstants.TIMEFUNCITON_TRAILING_120_DAYS_DES,
+// local ) ) );
+// baseTimeFunctionMap.put( IBuildInBaseTimeFunction.TRAILING_12_MONTHS,
+// new BaseTimeFunction( IBuildInBaseTimeFunction.TRAILING_12_MONTHS,
+// Message.getMessage( ResourceConstants.TIMEFUNCITON_TRAILING_12_MONTHS,
+// local ),
+// Message.getMessage( ResourceConstants.TIMEFUNCITON_TRAILING_12_MONTHS_DES,
+// local ) ) );
baseTimeFunctionMap.put( IBuildInBaseTimeFunction.YEAR_TO_DATE,
new BaseTimeFunction( IBuildInBaseTimeFunction.YEAR_TO_DATE,
Message.getMessage( ResourceConstants.TIMEFUNCITON_YEAR_TO_DATE,
diff --git a/data/org.eclipse.birt.report.data.adapter/src/org/eclipse/birt/report/data/adapter/api/timeFunction/TimeFunctionManager.java b/data/org.eclipse.birt.report.data.adapter/src/org/eclipse/birt/report/data/adapter/api/timeFunction/TimeFunctionManager.java
index 8e7f5fa..152b47a 100644
--- a/data/org.eclipse.birt.report.data.adapter/src/org/eclipse/birt/report/data/adapter/api/timeFunction/TimeFunctionManager.java
+++ b/data/org.eclipse.birt.report.data.adapter/src/org/eclipse/birt/report/data/adapter/api/timeFunction/TimeFunctionManager.java
@@ -148,7 +148,7 @@ public class TimeFunctionManager
availableFunctions.add( handle.getFunction( IBuildInBaseTimeFunction.PREVIOUS_MONTH ) );
availableFunctions.add( handle.getFunction( IBuildInBaseTimeFunction.PREVIOUS_MONTH_TO_DATE ) );
availableFunctions.add( handle.getFunction( IBuildInBaseTimeFunction.MONTH_TO_DATE ) );
- availableFunctions.add( handle.getFunction( IBuildInBaseTimeFunction.TRAILING_12_MONTHS ) );
+// availableFunctions.add( handle.getFunction( IBuildInBaseTimeFunction.TRAILING_12_MONTHS ) );
availableFunctions.add( handle.getFunction( IBuildInBaseTimeFunction.MONTH_TO_DATE_LAST_YEAR ) );
periodType.add( new Period_Type( IArgumentInfo.Period_Type.Period_Type_ENUM.MONTH, locale ) );
@@ -166,11 +166,11 @@ public class TimeFunctionManager
if ( timeType.contains( DesignChoiceConstants.DATE_TIME_LEVEL_TYPE_DAY_OF_YEAR ) )
{
- availableFunctions.add( handle.getFunction( IBuildInBaseTimeFunction.TRAILING_30_DAYS ) );
- availableFunctions.add( handle.getFunction( IBuildInBaseTimeFunction.TRAILING_60_DAYS ) );
- availableFunctions.add( handle.getFunction( IBuildInBaseTimeFunction.TRAILING_90_DAYS ) );
- availableFunctions.add( handle.getFunction( IBuildInBaseTimeFunction.TRAILING_120_DAYS ) );
- periodType.add( new Period_Type( IArgumentInfo.Period_Type.Period_Type_ENUM.DAY, locale ) );
+// availableFunctions.add( handle.getFunction( IBuildInBaseTimeFunction.TRAILING_30_DAYS ) );
+// availableFunctions.add( handle.getFunction( IBuildInBaseTimeFunction.TRAILING_60_DAYS ) );
+// availableFunctions.add( handle.getFunction( IBuildInBaseTimeFunction.TRAILING_90_DAYS ) );
+// availableFunctions.add( handle.getFunction( IBuildInBaseTimeFunction.TRAILING_120_DAYS ) );
+// periodType.add( new Period_Type( IArgumentInfo.Period_Type.Period_Type_ENUM.DAY, locale ) );
}
availableFunctions.add( new BaseTimeFunction( handle.getFunction( IBuildInBaseTimeFunction.CURRENT_PERIOD_FROM_N_PERIOD_AGO ),
periodType ) );
diff --git a/data/org.eclipse.birt.report.data.adapter/src/org/eclipse/birt/report/data/adapter/i18n/Messages.properties b/data/org.eclipse.birt.report.data.adapter/src/org/eclipse/birt/report/data/adapter/i18n/Messages.properties
index 0cc026a..582cf28 100644
--- a/data/org.eclipse.birt.report.data.adapter/src/org/eclipse/birt/report/data/adapter/i18n/Messages.properties
+++ b/data/org.eclipse.birt.report.data.adapter/src/org/eclipse/birt/report/data/adapter/i18n/Messages.properties
@@ -68,11 +68,11 @@ timeFunction.TRAILING_90_DAYS.description = Calculate the specified metric for l
timeFunction.TRAILING_120_DAYS.description = Calculate the specified metric for last 120 days
timeFunction.TRAILING_12_MONTHS.name = Trailing 12 Months
timeFunction.TRAILING_12_MONTHS.description = Calculate the specified metric for last 12 months
-timeFunction.YEAR_TO_DATE.name = Year to Date
+timeFunction.YEAR_TO_DATE.name = Year to Date(YTD)
timeFunction.YEAR_TO_DATE.description = Calculate the specified metric for same year
-timeFunction.QUARTER_TO_DATE.name = Quarter to Date
+timeFunction.QUARTER_TO_DATE.name = Quarter to Date(QTD)
timeFunction.QUARTER_TO_DATE.description = Calculate the specified metric for same quarter
-timeFunction.MONTH_TO_DATE.name = Month to Date
+timeFunction.MONTH_TO_DATE.name = Month to Date(MTD)
timeFunction.MONTH_TO_DATE.description = Calculate the specified metric for same month
timeFunction.PREVIOUS_YEAR_TO_DATE.name = Previous Year to Date
timeFunction.PREVIOUS_YEAR_TO_DATE.description = Calculate the specified metric for same year in previous N year
@@ -84,7 +84,7 @@ timeFunction.QUARTER_TO_DATE_LAST_YEAR.name = Quarter to Date Last Year
timeFunction.QUARTER_TO_DATE_LAST_YEAR.description = Calculate the specified metric for same quarter in previous N year
timeFunction.CURRENT_YEAR.name = Current Year
timeFunction.CURRENT_YEAR.description = Calculate the specified metric for current year
-timeFunction.WEEK_TO_DATE.name = Week to Date
+timeFunction.WEEK_TO_DATE.name = Week to Date(WTD)
timeFunction.WEEK_TO_DATE.description = Calculate the specified metric for same week
timeFunction.CURRENT_PERIOD_FROM_N_PERIOD_AGO.name = Current Period from N Periods Ago
timeFunction.CURRENT_PERIOD_FROM_N_PERIOD_AGO.description = Calculate the specified metric for current period from N period ago
@@ -102,8 +102,28 @@ timeFunction.N2 = N value for second period
timeFunction.PERIOD1.displayName = The &first period
timeFunction.PERIOD2.displayName = The second pe&riod
-timeFunction.N1.displayName = The f&irst N
-timeFunction.N2.displayName = The sec&ond N
+timeFunction.N1.displayName = Number of period Ago
+timeFunction.N2.displayName = Number of period Ago
+
+timeFunction.N1.Year.displayName = Number of Year(s) Ago
+timeFunction.N2.Year.displayName = Number of Year(s) Ago
+timeFunction.N1.Year = N value for number of Year(s) ago
+timeFunction.N2.Year = N value for number of Year(s) ago
+
+timeFunction.N1.Month.displayName = Number of Month(s) Ago
+timeFunction.N2.Month.displayName = Number of Month(s) Ago
+timeFunction.N1.Month = N value for number of Month(s) ago
+timeFunction.N2.Month = N value for number of Month(s) ago
+
+timeFunction.N1.Quarter.displayName = Number of Quarter(s) Ago
+timeFunction.N2.Quarter.displayName = Number of Quarter(s) Ago
+timeFunction.N1.Quarter = N value for number of Quarter(s) ago
+timeFunction.N2.Quarter = N value for number of Quarter(s) ago
+
+timeFunction.N1.Week.displayName = Number of Week(s) Ago
+timeFunction.N2.Week.displayName = Number of Week(s) Ago
+timeFunction.N1.Week = N value for number of Week(s) ago
+timeFunction.N2.Week = N value for number of Week(s) ago
timeFunction.PERIODCHOICE.YEAR_displayName =YEAR
timeFunction.PERIODCHOICE.QUARTER_displayName =QUARTER
diff --git a/data/org.eclipse.birt.report.data.adapter/src/org/eclipse/birt/report/data/adapter/i18n/ResourceConstants.java b/data/org.eclipse.birt.report.data.adapter/src/org/eclipse/birt/report/data/adapter/i18n/ResourceConstants.java
index ff8f41e..5a560ae 100644
--- a/data/org.eclipse.birt.report.data.adapter/src/org/eclipse/birt/report/data/adapter/i18n/ResourceConstants.java
+++ b/data/org.eclipse.birt.report.data.adapter/src/org/eclipse/birt/report/data/adapter/i18n/ResourceConstants.java
@@ -103,11 +103,29 @@ public class ResourceConstants
public final static String TIMEFUNCITON_N1 = "timeFunction.N1";
public final static String TIMEFUNCITON_N2 = "timeFunction.N2";
+ public final static String TIMEFUNCITON_N1_YEAR = "timeFunction.N1.Year";
+ public final static String TIMEFUNCITON_N2_YEAR = "timeFunction.N2.Year";
+ public final static String TIMEFUNCITON_N1_QUARTER = "timeFunction.N1.Quarter";
+ public final static String TIMEFUNCITON_N2_QUARTER = "timeFunction.N2.Quarter";
+ public final static String TIMEFUNCITON_N1_MONTH = "timeFunction.N1.Month";
+ public final static String TIMEFUNCITON_N2_MONTH = "timeFunction.N2.Month";
+ public final static String TIMEFUNCITON_N1_WEEK = "timeFunction.N1.Week";
+ public final static String TIMEFUNCITON_N2_WEEK = "timeFunction.N2.Week";
+
public final static String TIMEFUNCITON_PERIOD1_DISPLAYNAME = "timeFunction.PERIOD1.displayName";
public final static String TIMEFUNCITON_PERIOD2_DISPLAYNAME = "timeFunction.PERIOD2.displayName";
public final static String TIMEFUNCITON_N1_DISPLAYNAME = "timeFunction.N1.displayName";
public final static String TIMEFUNCITON_N2_DISPLAYNAME = "timeFunction.N2.displayName";
+ public final static String TIMEFUNCITON_N1_YEAR_DISPLAYNAME = "timeFunction.N1.Year.displayName";
+ public final static String TIMEFUNCITON_N2_YEAR_DISPLAYNAME = "timeFunction.N2.Year.displayName";
+ public final static String TIMEFUNCITON_N1_QUARTER_DISPLAYNAME = "timeFunction.N1.Quarter.displayName";
+ public final static String TIMEFUNCITON_N2_QUARTER_DISPLAYNAME = "timeFunction.N2.Quarter.displayName";
+ public final static String TIMEFUNCITON_N1_MONTH_DISPLAYNAME = "timeFunction.N1.Month.displayName";
+ public final static String TIMEFUNCITON_N2_MONTH_DISPLAYNAME = "timeFunction.N2.Month.displayName";
+ public final static String TIMEFUNCITON_N1_WEEK_DISPLAYNAME = "timeFunction.N1.Week.displayName";
+ public final static String TIMEFUNCITON_N2_WEEK_DISPLAYNAME = "timeFunction.N2.Week.displayName";
+
public final static String TIMEFUNCITON_PERIODCHOICE_YEAR_DISPLAYNAME = "timeFunction.PERIODCHOICE.YEAR_displayName";
public final static String TIMEFUNCITON_PERIODCHOICE_QUARTER_DISPLAYNAME = "timeFunction.PERIODCHOICE.QUARTER_displayName";
public final static String TIMEFUNCITON_PERIODCHOICE_MONTH_DISPLAYNAME = "timeFunction.PERIODCHOICE.MONTH_displayName";
diff --git a/data/org.eclipse.birt.report.data.adapter/test/org/eclipse/birt/report/data/adapter/internal/script/TimeFunctionManagerTest.java b/data/org.eclipse.birt.report.data.adapter/test/org/eclipse/birt/report/data/adapter/internal/script/TimeFunctionManagerTest.java
index a3b022b..ab7dede 100644
--- a/data/org.eclipse.birt.report.data.adapter/test/org/eclipse/birt/report/data/adapter/internal/script/TimeFunctionManagerTest.java
+++ b/data/org.eclipse.birt.report.data.adapter/test/org/eclipse/birt/report/data/adapter/internal/script/TimeFunctionManagerTest.java
@@ -92,7 +92,7 @@ public class TimeFunctionManagerTest extends TestCase
levelsInxTab.add( "year" );
levelsInxTab.add( "quarter" );
List<ITimeFunction> function1 = TimeFunctionManager.getCalculationTypes( cube1.getDimension( "TimeDimension" ),levelsInxTab, true );
- assertTrue( function1.size( ) == 19 );
+ assertTrue( function1.size( ) == 18 );
for( int i=0; i< function1.size( ); i++ )
{
@@ -140,9 +140,9 @@ public class TimeFunctionManagerTest extends TestCase
levelsInxTab.add( "year" );
levelsInxTab.add( "quarter" );
List<ITimeFunction> function1 = TimeFunctionManager.getCalculationTypes( cube1.getDimension( "TimeDimension" ),levelsInxTab, true );
- assertTrue( function1.size( ) ==23 );
+ assertTrue( function1.size( ) == 18 );
- ITimeFunction function = function1.get( 19 );
+ ITimeFunction function = function1.get( 14 );
assertTrue( function.getName( ).equals( "CURRENT PERIOD FROM N PERIODS AGO" ));
List<IArgumentInfo> arguments = function.getArguments( );
@@ -151,7 +151,7 @@ public class TimeFunctionManagerTest extends TestCase
assertTrue(arguments.get( 0 ).getPeriodChoices( ).size( ) == 3 );
assertTrue( arguments.get( 1 ).getName( ).equals( IArgumentInfo.N_PERIOD2 ) );
assertTrue( arguments.get( 2 ).getName( ).equals( IArgumentInfo.PERIOD_2 ) );
- assertTrue( arguments.get( 2 ).getPeriodChoices( ).size( ) == 4 );
+ assertTrue( arguments.get( 2 ).getPeriodChoices( ).size( ) == 3 );
}
public void testInvalidCalculationTypeInCube1() throws SemanticException, AdapterException