public DimensionMetaData createDimensionWithName(String dimName) { DimensionMetaData dimension = new DimensionMetaData(dimName); dimension.setExpanded(true); HierarchyMetaData hierarchy = createHierarchyForParentWithNode(dimension, null); hierarchy.setParent(dimension); hierarchy.setExpanded(true); dimension.add(hierarchy); return dimension; }
public DimensionMetaData createDimensionFromNode(ColumnBackedNode obj) { DimensionMetaData dimension = new DimensionMetaData(obj.getName()); dimension.setExpanded(true); HierarchyMetaData hierarchy = createHierarchyForParentWithNode(dimension, obj); hierarchy.setParent(dimension); hierarchy.setExpanded(true); dimension.add(hierarchy); return dimension; }
public DimensionMetaData createDimensionFromAvailableTable(AvailableTable tbl) { DimensionMetaData dimension = new DimensionMetaData(tbl.getName()); dimension.setExpanded(true); HierarchyMetaData hierarchy = new HierarchyMetaData(tbl.getName()); hierarchy.setExpanded(true); for (AvailableField field : tbl.getChildren()) { ColumnBackedNode node = this.createColumnBackedNode(field, ModelerPerspective.ANALYSIS); LevelMetaData level = createLevelForParentWithNode(hierarchy, node); hierarchy.add(level); } hierarchy.setParent(dimension); hierarchy.setExpanded(true); dimension.add(hierarchy); return dimension; }