当前位置: 首页>>代码示例>>Java>>正文


Java Hierarchy.getDimension方法代码示例

本文整理汇总了Java中org.olap4j.metadata.Hierarchy.getDimension方法的典型用法代码示例。如果您正苦于以下问题:Java Hierarchy.getDimension方法的具体用法?Java Hierarchy.getDimension怎么用?Java Hierarchy.getDimension使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.olap4j.metadata.Hierarchy的用法示例。


在下文中一共展示了Hierarchy.getDimension方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: outputProperty

import org.olap4j.metadata.Hierarchy; //导入方法依赖的package包/类
private void outputProperty(Property property, Catalog catalog, Cube cube, Level level, List<Row> rows) {
   Hierarchy hierarchy = level.getHierarchy();
   Dimension dimension = hierarchy.getDimension();

   String propertyName = property.getName();

   Row row = new Row();
   row.set(CatalogName.name, catalog.getName());
   row.set(CubeName.name, cube.getName());
   row.set(DimensionUniqueName.name, dimension.getUniqueName());
   row.set(HierarchyUniqueName.name, hierarchy.getUniqueName());
   row.set(LevelUniqueName.name, level.getUniqueName());

   row.set(PropertyName.name, propertyName);
   row.set(PropertyCaption.name, property.getCaption());

   // Only member properties now
   row.set(PropertyType.name, 1);
   row.set(PropertyContentType.name, Property.ContentType.REGULAR.xmlaOrdinal());
   XmlaConstants.DBType dbType = getDBTypeFromProperty(property);
   row.set(DataType.name, 0);

   row.set(PropertyOrigin.name, 1);

   String desc = cube.getName() + " Cube - " + getHierarchyName(hierarchy) + " Hierarchy - " + level.getName() + " Level - " + property.getName() + " Property";
   row.set(Description.name, desc);
   row.set(PropertyCardinality.name, "MANY");
   row.set(PropertyAttributeHierarchyName.name, propertyName);
  //row.set(PropertyVisibility.name, 1);
   row.set(PropertyIsVisible.name, true);

   addRow(row, rows);
}
 
开发者ID:OpenlinkFinancial,项目名称:MXMLABridge,代码行数:34,代码来源:RowsetDefinition.java

示例2: outputMember

import org.olap4j.metadata.Hierarchy; //导入方法依赖的package包/类
private void outputMember(
    OlapConnection connection,
    Member member,
    final Catalog catalog,
    Cube cube,
    List<Row> rows)
    throws SQLException
{
    if (!memberNameCond.apply(member)) {
        return;
    }
    if (!memberTypeCond.apply(member)) {
        return;
    }

    getExtra(connection).checkMemberOrdinal(member);

    // Check whether the member is visible, otherwise do not dump.
    Boolean visible =
        (Boolean) member.getPropertyValue(
            Property.StandardMemberProperty.$visible);
    if (visible == null) {
        visible = true;
    }
    if (!visible && !XmlaUtil.shouldEmitInvisibleMembers(request)) {
        return;
    }

    final Level level = member.getLevel();
    final Hierarchy hierarchy = level.getHierarchy();
    final Dimension dimension = hierarchy.getDimension();

    int adjustedLevelDepth = level.getDepth();

    Row row = new Row();
    row.set(CatalogName.name, catalog.getName());
    row.set(SchemaName.name, cube.getSchema().getName());
    row.set(CubeName.name, cube.getName());
    row.set(DimensionUniqueName.name, dimension.getUniqueName());
    row.set(HierarchyUniqueName.name, hierarchy.getUniqueName());
    row.set(LevelUniqueName.name, level.getUniqueName());
    row.set(LevelNumber.name, adjustedLevelDepth);
    row.set(MemberOrdinal.name, member.getOrdinal());
    row.set(MemberName.name, member.getName());
    row.set(MemberUniqueName.name, member.getUniqueName());
    row.set(MemberType.name, member.getMemberType().ordinal());
    //row.set(MemberGuid.name, "");
    row.set(MemberCaption.name, member.getCaption());
    row.set(
        ChildrenCardinality.name,
        member.getPropertyValue(
            Property.StandardMemberProperty.CHILDREN_CARDINALITY));
    row.set(ChildrenCardinality.name, 100);

    if (adjustedLevelDepth == 0) {
        row.set(ParentLevel.name, 0);
    } else {
        row.set(ParentLevel.name, adjustedLevelDepth - 1);
        final Member parentMember = member.getParentMember();
        if (parentMember != null) {
            row.set(
                ParentUniqueName.name, parentMember.getUniqueName());
        }
    }

    row.set(ParentCount.name, member.getParentMember() == null ? 0 : 1);

    row.set(Depth.name, member.getDepth());
    addRow(row, rows);
}
 
开发者ID:OSBI,项目名称:mondrian,代码行数:71,代码来源:RowsetDefinition.java

示例3: outputProperty

import org.olap4j.metadata.Hierarchy; //导入方法依赖的package包/类
private void outputProperty(
    Property property,
    Catalog catalog,
    Cube cube,
    Level level,
    List<Row> rows)
{
    Hierarchy hierarchy = level.getHierarchy();
    Dimension dimension = hierarchy.getDimension();

    String propertyName = property.getName();

    Row row = new Row();
    row.set(CatalogName.name, catalog.getName());
    row.set(SchemaName.name, cube.getSchema().getName());
    row.set(CubeName.name, cube.getName());
    row.set(DimensionUniqueName.name, dimension.getUniqueName());
    row.set(HierarchyUniqueName.name, hierarchy.getUniqueName());
    row.set(LevelUniqueName.name, level.getUniqueName());
    //TODO: what is the correct value here
    //row.set(MemberUniqueName.name, "");

    row.set(PropertyName.name, propertyName);
    // Only member properties now
    row.set(
        PropertyType.name,
        Property.TypeFlag.MEMBER.xmlaOrdinal());
    row.set(
        PropertyContentType.name,
        Property.ContentType.REGULAR.xmlaOrdinal());
    row.set(PropertyCaption.name, property.getCaption());
    XmlaConstants.DBType dbType = getDBTypeFromProperty(property);
    row.set(DataType.name, dbType.xmlaOrdinal());

    String desc =
        cube.getName() + " Cube - "
        + getHierarchyName(hierarchy) + " Hierarchy - "
        + level.getName() + " Level - "
        + property.getName() + " Property";
    row.set(Description.name, desc);

    addRow(row, rows);
}
 
开发者ID:OSBI,项目名称:mondrian,代码行数:44,代码来源:RowsetDefinition.java

示例4: outputMember

import org.olap4j.metadata.Hierarchy; //导入方法依赖的package包/类
private void outputMember(OlapConnection connection, Member member, final Catalog catalog, Cube cube, List<Row> rows) throws SQLException {
   if (!memberNameCond.apply(member)) {
      return;
   }
   if (!memberTypeCond.apply(member)) {
      return;
   }

   getExtra(connection).checkMemberOrdinal(member);

   // Check whether the member is visible, otherwise do not dump.
   Boolean visible = (Boolean) member.getPropertyValue(Property.StandardMemberProperty.$visible);
   if (visible == null) {
      visible = true;
   }
   if (!visible && !XmlaUtil.shouldEmitInvisibleMembers(request)) {
      return;
   }

   final Level level = member.getLevel();
   final Hierarchy hierarchy = level.getHierarchy();
   final Dimension dimension = hierarchy.getDimension();

   int adjustedLevelDepth = level.getDepth();

   Row row = new Row();
   row.set(CatalogName.name, catalog.getName());
   row.set(SchemaName.name, cube.getSchema().getName());
   row.set(CubeName.name, cube.getName());
   row.set(DimensionUniqueName.name, dimension.getUniqueName());
   row.set(HierarchyUniqueName.name, hierarchy.getUniqueName());
   row.set(LevelUniqueName.name, level.getUniqueName());
   row.set(LevelNumber.name, adjustedLevelDepth);
   row.set(MemberOrdinal.name, member.getOrdinal());
   row.set(MemberName.name, member.getName());
   row.set(MemberUniqueName.name, member.getUniqueName());
   row.set(MemberType.name, member.getMemberType().ordinal());
   //row.set(MemberGuid.name, "");
   row.set(MemberCaption.name, member.getCaption());
   row.set(ChildrenCardinality.name, member.getPropertyValue(Property.StandardMemberProperty.CHILDREN_CARDINALITY));
   row.set(ChildrenCardinality.name, 100);

   if (adjustedLevelDepth == 0) {
      row.set(ParentLevel.name, 0);
   } else {
      row.set(ParentLevel.name, adjustedLevelDepth - 1);
      final Member parentMember = member.getParentMember();
      if (parentMember != null) {
         row.set(ParentUniqueName.name, parentMember.getUniqueName());
      }
   }

   row.set(ParentCount.name, member.getParentMember() == null ? 0 : 1);

   row.set(Depth.name, member.getDepth());
   row.set(MemberKey.name, member.getCaption());// Member_Key =
                                                // Member_Caption?
   row.set(IsPlaceHolderMember.name, false);
   row.set(IsDatamember.name, false);
   addRow(row, rows);
}
 
开发者ID:OpenlinkFinancial,项目名称:MXMLABridge,代码行数:62,代码来源:RowsetDefinition.java


注:本文中的org.olap4j.metadata.Hierarchy.getDimension方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。