Added TimeDimensionType

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-column-widget@92588 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2014-03-04 09:46:45 +00:00
parent 11103a3ac5
commit 20405e5b02
6 changed files with 484 additions and 16 deletions

View File

@ -1254,3 +1254,163 @@ Compiling...
Compilation completed in 0.00 seconds
Removing invalidated units
Finding entry point classes
Public resources found in...
Translatable source found in...
Found 0 cached/archived units. Used 0 / 2719 units from cache.
Compiling...
40% complete (ETR: 7 seconds)
40% complete (ETR: 7 seconds)
40% complete (ETR: 7 seconds)
40% complete (ETR: 7 seconds)
40% complete (ETR: 7 seconds)
50% complete (ETR: 5 seconds)
60% complete (ETR: 4 seconds)
70% complete (ETR: 3 seconds)
80% complete (ETR: 2 seconds)
90% complete (ETR: 1 seconds)
100% complete (ETR: 0 seconds)
Compilation completed in 11.82 seconds
Removing invalidated units
Finding entry point classes
Public resources found in...
Translatable source found in...
Found 2719 cached/archived units. Used 2719 / 2719 units from cache.
Compiling...
Compilation completed in 0.00 seconds
Removing invalidated units
Finding entry point classes
Public resources found in...
Translatable source found in...
Found 2719 cached/archived units. Used 2719 / 2719 units from cache.
Compiling...
Compilation completed in 0.00 seconds
Removing invalidated units
Finding entry point classes
Public resources found in...
Translatable source found in...
Found 0 cached/archived units. Used 0 / 2719 units from cache.
Compiling...
30% complete (ETR: 10 seconds)
30% complete (ETR: 10 seconds)
30% complete (ETR: 10 seconds)
30% complete (ETR: 10 seconds)
40% complete (ETR: 8 seconds)
50% complete (ETR: 6 seconds)
60% complete (ETR: 4 seconds)
70% complete (ETR: 3 seconds)
80% complete (ETR: 2 seconds)
90% complete (ETR: 1 seconds)
100% complete (ETR: 0 seconds)
Compilation completed in 14.97 seconds
Removing invalidated units
Finding entry point classes
Public resources found in...
Translatable source found in...
Found 2719 cached/archived units. Used 2719 / 2719 units from cache.
Compiling...
Compilation completed in 0.00 seconds
Removing invalidated units
Finding entry point classes
Public resources found in...
Translatable source found in...
Found 2719 cached/archived units. Used 2719 / 2719 units from cache.
Compiling...
Compilation completed in 0.00 seconds
Removing invalidated units
Finding entry point classes
Public resources found in...
Translatable source found in...
Found 0 cached/archived units. Used 0 / 2719 units from cache.
Compiling...
30% complete (ETR: 9 seconds)
30% complete (ETR: 9 seconds)
30% complete (ETR: 9 seconds)
30% complete (ETR: 9 seconds)
40% complete (ETR: 8 seconds)
50% complete (ETR: 7 seconds)
60% complete (ETR: 5 seconds)
70% complete (ETR: 3 seconds)
80% complete (ETR: 2 seconds)
90% complete (ETR: 1 seconds)
100% complete (ETR: 0 seconds)
Compilation completed in 13.53 seconds
Removing invalidated units
Finding entry point classes
Public resources found in...
Translatable source found in...
Found 2719 cached/archived units. Used 2719 / 2719 units from cache.
Compiling...
Compilation completed in 0.00 seconds
Removing invalidated units
Finding entry point classes
Public resources found in...
Translatable source found in...
Found 2719 cached/archived units. Used 2719 / 2719 units from cache.
Compiling...
Compilation completed in 0.00 seconds
Removing invalidated units
Finding entry point classes
Public resources found in...
Translatable source found in...
Found 0 cached/archived units. Used 0 / 2719 units from cache.
Compiling...
50% complete (ETR: 4 seconds)
50% complete (ETR: 4 seconds)
50% complete (ETR: 4 seconds)
50% complete (ETR: 4 seconds)
50% complete (ETR: 4 seconds)
50% complete (ETR: 4 seconds)
60% complete (ETR: 3 seconds)
70% complete (ETR: 2 seconds)
80% complete (ETR: 1 seconds)
90% complete (ETR: 1 seconds)
100% complete (ETR: 0 seconds)
Compilation completed in 10.66 seconds
Removing invalidated units
Finding entry point classes
Public resources found in...
Translatable source found in...
Found 2719 cached/archived units. Used 2719 / 2719 units from cache.
Compiling...
Compilation completed in 0.00 seconds
Removing invalidated units
Finding entry point classes
Public resources found in...
Translatable source found in...
Found 2719 cached/archived units. Used 2719 / 2719 units from cache.
Compiling...
Compilation completed in 0.00 seconds
Removing invalidated units
Finding entry point classes
Public resources found in...
Translatable source found in...
Found 0 cached/archived units. Used 0 / 2719 units from cache.
Compiling...
30% complete (ETR: 10 seconds)
30% complete (ETR: 10 seconds)
30% complete (ETR: 10 seconds)
30% complete (ETR: 10 seconds)
40% complete (ETR: 8 seconds)
50% complete (ETR: 6 seconds)
60% complete (ETR: 5 seconds)
70% complete (ETR: 3 seconds)
80% complete (ETR: 2 seconds)
90% complete (ETR: 1 seconds)
100% complete (ETR: 0 seconds)
Compilation completed in 18.21 seconds
Removing invalidated units
Finding entry point classes
Public resources found in...
Translatable source found in...
Found 2719 cached/archived units. Used 2719 / 2719 units from cache.
Compiling...
Compilation completed in 0.00 seconds
Removing invalidated units
Finding entry point classes
Public resources found in...
Translatable source found in...
Found 2719 cached/archived units. Used 2719 / 2719 units from cache.
Compiling...
Compilation completed in 0.00 seconds
Removing invalidated units
Finding entry point classes

View File

@ -9,10 +9,13 @@ import org.gcube.portlets.user.td.columnwidget.client.properties.ColumnDataPrope
import org.gcube.portlets.user.td.columnwidget.client.properties.ColumnDataTypeProperties;
import org.gcube.portlets.user.td.columnwidget.client.properties.ColumnTypeCodeProperties;
import org.gcube.portlets.user.td.columnwidget.client.properties.TabResourceProperties;
import org.gcube.portlets.user.td.columnwidget.client.properties.TimeDimensionTypeProperties;
import org.gcube.portlets.user.td.columnwidget.client.store.ColumnDataTypeElement;
import org.gcube.portlets.user.td.columnwidget.client.store.ColumnDataTypeStore;
import org.gcube.portlets.user.td.columnwidget.client.store.ColumnTypeCodeElement;
import org.gcube.portlets.user.td.columnwidget.client.store.ColumnTypeCodeStore;
import org.gcube.portlets.user.td.columnwidget.client.store.TimeDimensionTypeElement;
import org.gcube.portlets.user.td.columnwidget.client.store.TimeDimensionTypeStore;
import org.gcube.portlets.user.td.gwtservice.client.rpc.TDGWTServiceAsync;
import org.gcube.portlets.user.td.gwtservice.shared.tr.ColumnData;
import org.gcube.portlets.user.td.gwtservice.shared.tr.TabResource;
@ -20,6 +23,7 @@ import org.gcube.portlets.user.td.gwtservice.shared.tr.column.type.ChangeColumnT
import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnDataType;
import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnTypeCode;
import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.TimeDimensionType;
import com.allen_sauer.gwt.log.client.Log;
import com.google.gwt.core.client.GWT;
@ -77,16 +81,23 @@ public class ChangeColumnTypePanel extends FramedPanel implements
protected ColumnData column;
protected ComboBox<ColumnData> comboColumn = null;
protected ComboBox<ColumnTypeCodeElement> comboColumnTypeCode = null;
protected ComboBox<ColumnDataTypeElement> comboMeasureType = null;
protected FieldLabel comboMeasureTypeLabel;
protected ComboBox<ColumnDataTypeElement> comboAttributeType = null;
protected FieldLabel comboAttributeTypeLabel;
protected ComboBox<TabResource> comboDimensionType = null;
protected FieldLabel comboDimensionTypeLabel;
protected ComboBox<ColumnData> comboColumnReferenceType = null;
protected FieldLabel comboColumnReferenceTypeLabel;
protected FieldLabel comboColumnReferenceTypeLabel;
protected ListStore<ColumnData> storeComboColumnReferenceType;
protected ComboBox<TimeDimensionTypeElement> comboTimeDimensionType = null;
protected FieldLabel comboTimeDimensionTypeLabel;
protected ListLoader<ListLoadConfig, ListLoadResult<ColumnData>> loader;
protected TextButton change;
@ -190,7 +201,7 @@ public class ChangeColumnTypePanel extends FramedPanel implements
addHandlersForComboMeasureType(propsMeasureType.label());
comboMeasureType.setEmptyText("Select a column type...");
comboMeasureType.setEmptyText("Select a measure type...");
comboMeasureType.setWidth(150);
comboMeasureType.setTypeAhead(true);
comboMeasureType.setTriggerAction(TriggerAction.ALL);
@ -263,6 +274,27 @@ public class ChangeColumnTypePanel extends FramedPanel implements
comboColumnReferenceType, "Column");
comboColumnReferenceTypeLabel.setVisible(false);
// comboTimeDimensionType
TimeDimensionTypeProperties propsTimeDimensionType = GWT
.create(TimeDimensionTypeProperties.class);
ListStore<TimeDimensionTypeElement> storeComboTimeDimensionType = new ListStore<TimeDimensionTypeElement>(
propsTimeDimensionType.id());
storeComboTimeDimensionType.addAll(TimeDimensionTypeStore.getTimeDimensionType());
comboTimeDimensionType = new ComboBox<TimeDimensionTypeElement>(
storeComboTimeDimensionType, propsTimeDimensionType.label());
Log.trace("ComboTimeDimensionType created");
addHandlersForComboTimeDimensionType(propsTimeDimensionType.label());
comboTimeDimensionType.setEmptyText("Select a time dimension type...");
comboTimeDimensionType.setWidth(150);
comboTimeDimensionType.setTypeAhead(true);
comboTimeDimensionType.setTriggerAction(TriggerAction.ALL);
comboTimeDimensionTypeLabel = new FieldLabel(comboTimeDimensionType, "Time Dimension Type");
comboTimeDimensionTypeLabel.setVisible(false);
// Change
change = new TextButton("Change");
SelectHandler changeHandler = new SelectHandler() {
@ -283,6 +315,7 @@ public class ChangeColumnTypePanel extends FramedPanel implements
v.add(comboAttributeTypeLabel, new VerticalLayoutData(1, -1));
v.add(comboDimensionTypeLabel, new VerticalLayoutData(1, -1));
v.add(comboColumnReferenceTypeLabel, new VerticalLayoutData(1, -1));
v.add(comboTimeDimensionTypeLabel, new VerticalLayoutData(1, -1));
v.add(change, new VerticalLayoutData(-1, -1, new Margins(10, 0, 10, 0)));
add(v, new VerticalLayoutData(-1, -1, new Margins()));
@ -414,6 +447,31 @@ public class ChangeColumnTypePanel extends FramedPanel implements
});
}
protected void addHandlersForComboTimeDimensionType(
final LabelProvider<TimeDimensionTypeElement> labelProvider) {
comboTimeDimensionType
.addSelectionHandler(new SelectionHandler<TimeDimensionTypeElement>() {
public void onSelection(
SelectionEvent<TimeDimensionTypeElement> event) {
Info.display(
"Time Dimension Type Selected",
"You selected "
+ (event.getSelectedItem() == null ? "nothing"
: labelProvider.getLabel(event
.getSelectedItem())
+ "!"));
Log.debug("ComboTimeDimensionType selected: "
+ event.getSelectedItem());
TimeDimensionTypeElement timeDimensionType = event
.getSelectedItem();
updateTimeDimensionType(timeDimensionType.getType());
}
});
}
protected void updateColumnType(ColumnTypeCode type) {
Log.debug("Update ColumnTypeCode " + type.toString());
@ -422,23 +480,35 @@ public class ChangeColumnTypePanel extends FramedPanel implements
comboAttributeTypeLabel.setVisible(false);
comboDimensionTypeLabel.setVisible(false);
comboColumnReferenceTypeLabel.setVisible(false);
comboTimeDimensionTypeLabel.setVisible(false);
} else {
if (type == ColumnTypeCode.ATTRIBUTE) {
comboMeasureTypeLabel.setVisible(false);
comboAttributeTypeLabel.setVisible(true);
comboDimensionTypeLabel.setVisible(false);
comboColumnReferenceTypeLabel.setVisible(false);
comboTimeDimensionTypeLabel.setVisible(false);
} else {
if (type == ColumnTypeCode.DIMENSION) {
comboMeasureTypeLabel.setVisible(false);
comboAttributeTypeLabel.setVisible(false);
comboDimensionTypeLabel.setVisible(true);
comboColumnReferenceTypeLabel.setVisible(false);
comboTimeDimensionTypeLabel.setVisible(false);
} else {
comboMeasureTypeLabel.setVisible(false);
comboAttributeTypeLabel.setVisible(false);
comboDimensionTypeLabel.setVisible(false);
comboColumnReferenceTypeLabel.setVisible(false);
if (type == ColumnTypeCode.TIMEDIMENSION) {
comboMeasureTypeLabel.setVisible(false);
comboAttributeTypeLabel.setVisible(false);
comboDimensionTypeLabel.setVisible(false);
comboColumnReferenceTypeLabel.setVisible(false);
comboTimeDimensionTypeLabel.setVisible(true);
} else {
comboMeasureTypeLabel.setVisible(false);
comboAttributeTypeLabel.setVisible(false);
comboDimensionTypeLabel.setVisible(false);
comboColumnReferenceTypeLabel.setVisible(false);
comboTimeDimensionTypeLabel.setVisible(false);
}
}
}
@ -451,6 +521,10 @@ public class ChangeColumnTypePanel extends FramedPanel implements
protected void updateAttributeType(ColumnDataType type) {
}
protected void updateTimeDimensionType(TimeDimensionType type) {
}
protected void loadData(ListLoadConfig loadConfig,
@ -521,7 +595,18 @@ public class ChangeColumnTypePanel extends FramedPanel implements
comboAttributeType.setValue(ColumnDataTypeStore
.selectedAttributeElement(cd.getDataTypeName()));
} else {
//TODO Add TimeDimension and Dimension information to ColumnData
/*
if (type == ColumnTypeCode.TIMEDIMENSION) {
changeColumnTypeSession.setColumnDataType(ColumnDataTypeStore
.selectedAttribute(cd.getDataTypeName()));
comboTimeDimensionType.setValue(TimeDimensionTypeStore
.selectedAttributeElement(cd.getDataTypeName()));
} else {
}
*/
}
}
@ -608,6 +693,24 @@ public class ChangeColumnTypePanel extends FramedPanel implements
alert("Attention", "No column reference selected!");
}
break;
case TIMEDIMENSION:
changeColumnTypeSession.setColumnTypeCodeTarget(type);
TimeDimensionTypeElement timeDimensionTypeElement = comboTimeDimensionType
.getCurrentValue();
if (timeDimensionTypeElement != null) {
TimeDimensionType timeDimensionType = timeDimensionTypeElement
.getType();
if (timeDimensionType != null) {
changeColumnTypeSession.setTimeDimensionType(timeDimensionType);
callChangeColumnType();
} else {
alert("Attention", "Time Dimension type not selected!");
}
} else {
alert("Attention", "Time Dimension type not selected!");
}
break;
default:
alert("Attention", "This column type is not supported now!");
break;

View File

@ -27,6 +27,7 @@ import com.google.web.bindery.event.shared.EventBus;
import com.sencha.gxt.core.client.IdentityValueProvider;
import com.sencha.gxt.core.client.Style.SelectionMode;
import com.sencha.gxt.core.client.resources.ThemeStyles;
import com.sencha.gxt.core.client.util.Point;
import com.sencha.gxt.data.client.loader.RpcProxy;
import com.sencha.gxt.data.shared.ListStore;
import com.sencha.gxt.data.shared.SortDir;
@ -78,6 +79,7 @@ public class DialogCodelistSelection extends Window {
protected ExtendedLiveGridView liveGridView;
protected PagingLoader<PagingLoadConfig, PagingLoadResult<TabResource>> loader;
protected String filter;
protected boolean firstLoad = true;
protected ResourceBundle res;
private TextButton select;
@ -89,16 +91,16 @@ public class DialogCodelistSelection extends Window {
setHeight(HEIGHT);
res = ResourceBundle.INSTANCE;
setBodyBorder(false);
setResizable(true);
setResizable(false);
setHeadingText("Select Codelist");
listeners = new ArrayList<CodelistSelectionListener>();
initLoad();
create();
}
protected void create() {
FramedPanel panel = new FramedPanel();
final FramedPanel panel = new FramedPanel();
panel.setHeaderVisible(false);
panel.setBodyBorder(false);
@ -158,9 +160,9 @@ public class DialogCodelistSelection extends Window {
liveGridView = new ExtendedLiveGridView();
liveGridView.setForceFit(true);
liveGridView.setEmptyText("No Matching Results.");
liveGridView.setEmptyText("No Results.");
liveGridView.setCacheSize(CACHE_SIZE);
grid = new Grid<TabResource>(store, cm) {
@Override
protected void onAfterFirstAttach() {
@ -179,8 +181,9 @@ public class DialogCodelistSelection extends Window {
grid.setView(liveGridView);
grid.setBorders(false);
grid.setLoadMask(true);
grid.setColumnReordering(true);
// grid.setColumnReordering(true);
addSelectionHandler();
SelectHandler sh = new SelectHandler() {
@ -222,6 +225,15 @@ public class DialogCodelistSelection extends Window {
protected void loadData(PagingLoadConfig loadConfig,
final AsyncCallback<PagingLoadResult<TabResource>> callback) {
if (firstLoad) {
initLoad(loadConfig, callback);
} else {
fastLoad(loadConfig, callback);
}
}
protected void fastLoad(PagingLoadConfig loadConfig,
final AsyncCallback<PagingLoadResult<TabResource>> callback) {
List<? extends SortInfo> sortInfo = loadConfig.getSortInfo();
Iterator<? extends SortInfo> iterator = sortInfo.iterator();
ArrayList<OrderInfo> listOrderInfo = new ArrayList<OrderInfo>();
@ -268,7 +280,8 @@ public class DialogCodelistSelection extends Window {
}
protected void initLoad() {
protected void initLoad(final PagingLoadConfig loadConfig,
final AsyncCallback<PagingLoadResult<TabResource>> callback) {
TDGWTServiceAsync.INSTANCE
.setCodelistsPagingLoader(new AsyncCallback<Void>() {
@ -284,7 +297,8 @@ public class DialogCodelistSelection extends Window {
@Override
public void onSuccess(Void result) {
create();
firstLoad = false;
fastLoad(loadConfig, callback);
}
@ -314,6 +328,23 @@ public class DialogCodelistSelection extends Window {
preventScrollToTopOnRefresh = true;
super.refresh(headerToo);
}
@Override
public Point getScrollState() {
return new Point(scroller.getScrollLeft(),
liveScroller.getScrollTop());
}
@Override
public void restoreScroll(Point state) {
if (state.getX() < cm.getTotalWidth()) {
scroller.setScrollLeft(state.getX());
}
if (state.getY() < totalCount * getCalculatedRowHeight()) {
liveScroller.setScrollTop(state.getY());
}
}
};
private void alert(String title, String message) {
@ -337,7 +368,6 @@ public class DialogCodelistSelection extends Window {
closeBtn.addSelectHandler(new SelectHandler() {
public void onSelect(SelectEvent event) {
fireAborted();
hide();
@ -345,7 +375,7 @@ public class DialogCodelistSelection extends Window {
});
}
public void addListener(CodelistSelectionListener listener) {
listeners.add(listener);
}

View File

@ -0,0 +1,24 @@
package org.gcube.portlets.user.td.columnwidget.client.properties;
import org.gcube.portlets.user.td.columnwidget.client.store.TimeDimensionTypeElement;
import com.google.gwt.editor.client.Editor.Path;
import com.sencha.gxt.data.shared.LabelProvider;
import com.sencha.gxt.data.shared.ModelKeyProvider;
import com.sencha.gxt.data.shared.PropertyAccess;
/**
*
* @author "Giancarlo Panichi"
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public interface TimeDimensionTypeProperties extends
PropertyAccess<TimeDimensionTypeElement> {
@Path("id")
ModelKeyProvider<TimeDimensionTypeElement> id();
LabelProvider<TimeDimensionTypeElement> label();
}

View File

@ -0,0 +1,51 @@
package org.gcube.portlets.user.td.columnwidget.client.store;
import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.TimeDimensionType;
/**
*
* @author "Giancarlo Panichi"
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public class TimeDimensionTypeElement {
protected int id; // For insert in table only
protected TimeDimensionType type;
public TimeDimensionTypeElement(int id,TimeDimensionType type){
this.id=id;
this.type=type;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public TimeDimensionType getType() {
return type;
}
public void setCode(TimeDimensionType type) {
this.type = type;
}
public String getLabel() {
return type.toString();
}
@Override
public String toString() {
return "TimeDimensionTypeElement [id=" + id + ", type=" + type + "]";
}
}

View File

@ -0,0 +1,100 @@
package org.gcube.portlets.user.td.columnwidget.client.store;
import java.io.Serializable;
import java.util.ArrayList;
import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.TimeDimensionType;
/**
*
* @author "Giancarlo Panichi" <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public class TimeDimensionTypeStore implements Serializable {
private static final long serialVersionUID = -5669638279415262224L;
protected static ArrayList<TimeDimensionTypeElement> store;
protected static TimeDimensionTypeElement dayElement=new TimeDimensionTypeElement(1,TimeDimensionType.Day);
protected static TimeDimensionTypeElement monthElement=new TimeDimensionTypeElement(2,TimeDimensionType.Month);
protected static TimeDimensionTypeElement quarterElement=new TimeDimensionTypeElement(3,TimeDimensionType.Quarter);
protected static TimeDimensionTypeElement yearElement=new TimeDimensionTypeElement(4,TimeDimensionType.Year);
public static ArrayList<TimeDimensionTypeElement> getTimeDimensionType(){
store=new ArrayList<TimeDimensionTypeElement>();
store.add(dayElement);
store.add(monthElement);
store.add(quarterElement);
store.add(yearElement);
return store;
}
public static int selectedTimeDimensionPosition(String selected){
int position=0;
if(selected.compareTo(TimeDimensionType.Day.toString())==0){
position=1;
} else {
if(selected.compareTo(TimeDimensionType.Month.toString())==0){
position=2;
} else {
if(selected.compareTo(TimeDimensionType.Quarter.toString())==0){
position=3;
} else {
if(selected.compareTo(TimeDimensionType.Year.toString())==0){
position=4;
} else {
}
}
}
}
return position;
}
public static TimeDimensionType selectedTimeDimension(String selected){
if(selected.compareTo(TimeDimensionType.Day.toString())==0){
return TimeDimensionType.Day;
} else {
if(selected.compareTo(TimeDimensionType.Month.toString())==0){
return TimeDimensionType.Month;
} else {
if(selected.compareTo(TimeDimensionType.Quarter.toString())==0){
return TimeDimensionType.Quarter;
} else {
if(selected.compareTo(TimeDimensionType.Year.toString())==0){
return TimeDimensionType.Year;
} else {
return null;
}
}
}
}
}
public static TimeDimensionTypeElement selectedTimeDimensionElement(String selected){
if(selected.compareTo(TimeDimensionType.Day.toString())==0){
return dayElement;
} else {
if(selected.compareTo(TimeDimensionType.Month.toString())==0){
return monthElement;
} else {
if(selected.compareTo(TimeDimensionType.Quarter.toString())==0){
return quarterElement;
} else {
if(selected.compareTo(TimeDimensionType.Year.toString())==0){
return yearElement;
} else {
return null;
}
}
}
}
}
}