int allDimCnt = db.getDimensionCount();
int dimCnt = 0;
XObject ret[];
for (int i = 0; i < allDimCnt; i++) {
Dimension dim = db.getDimensionAt(i);
if ((parent.getFolderType().equalsIgnoreCase(TYPE_STATIC_FOLDER_DIMENSIONS) && isDataDimension(dim)) ||
(parent.getFolderType().equalsIgnoreCase(TYPE_STATIC_FOLDER_SYSTEMDIMENSIONS) && dim.isSystemDimension()) ||
(parent.getFolderType().equalsIgnoreCase(TYPE_STATIC_FOLDER_ATTRIBUTEDIMENSIONS) && dim.isAttributeDimension())) {
dimCnt++;
}
}
if (parent.getFolderType().equalsIgnoreCase(TYPE_STATIC_FOLDER_DIMENSIONS)) {
dimCnt += 2; // for additional subfolders
}
ret = new XObject[dimCnt];
int curDim = 0;
for (int i = 0; i < allDimCnt; i++)
{
Dimension dim = db.getDimensionAt(i);
if ((parent.getFolderType().equalsIgnoreCase(TYPE_STATIC_FOLDER_DIMENSIONS) && isDataDimension(dim)) ||
(parent.getFolderType().equalsIgnoreCase(TYPE_STATIC_FOLDER_SYSTEMDIMENSIONS) && dim.isSystemDimension()) ||
(parent.getFolderType().equalsIgnoreCase(TYPE_STATIC_FOLDER_ATTRIBUTEDIMENSIONS) && dim.isAttributeDimension())) {
XDimension xdim = (XDimension) XConverter.createX(dim);
// xdim.setName(dim.getName());
// xdim.setDbId(db.getId());
// xdim.setDimId(dim.getId());
setIdToXObject(xdim);