Exemplo n.º 1
0
  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;
  }
Exemplo n.º 2
0
 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;
 }
Exemplo n.º 3
0
 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;
 }
Exemplo n.º 4
0
 public HierarchyMetaData createHierarchyForParentWithNode(
     DimensionMetaData parent, ColumnBackedNode obj) {
   HierarchyMetaData hier = new HierarchyMetaData(obj.getName());
   hier.setParent(parent);
   hier.setExpanded(true);
   if (obj != null) {
     LevelMetaData level = createLevelForParentWithNode(hier, obj);
     hier.add(level);
   }
   return hier;
 }