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


Java Level.getName方法代码示例

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


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

示例1: outputProperty

import org.olap4j.metadata.Level; //导入方法依赖的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: outputLevel

import org.olap4j.metadata.Level; //导入方法依赖的package包/类
/**
 * Outputs a level.
 *
 * @param catalog Catalog name
 * @param cube Cube definition
 * @param hierarchy Hierarchy
 * @param level Level
 * @param rows List of rows to output to
 * @return whether the level is visible
 * @throws XmlaException If error occurs
 */
protected boolean outputLevel(
    OlapConnection connection,
    Catalog catalog,
    Cube cube,
    Hierarchy hierarchy,
    Level level,
    List<Row> rows)
    throws XmlaException, SQLException
{
    final XmlaHandler.XmlaExtra extra = getExtra(connection);
    String desc = level.getDescription();
    if (desc == null) {
        desc =
            cube.getName() + " Cube - "
            + getHierarchyName(hierarchy) + " Hierarchy - "
            + level.getName() + " Level";
    }

    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,
        hierarchy.getDimension().getUniqueName());
    row.set(HierarchyUniqueName.name, hierarchy.getUniqueName());
    row.set(LevelName.name, level.getName());
    row.set(LevelUniqueName.name, level.getUniqueName());
    //row.set(LevelGuid.name, "");
    row.set(LevelCaption.name, level.getCaption());
    // see notes on this #getDepth()
    row.set(LevelNumber.name, level.getDepth());

    // Get level cardinality
    // According to microsoft this is:
    //   "The number of members in the level."
    int n = extra.getLevelCardinality(level);
    row.set(LevelCardinality.name, n);

    row.set(LevelType.name, getLevelType(level));

    // TODO: most of the time this is correct
    row.set(CustomRollupSettings.name, 0);

    int uniqueSettings = 0;
    if (level.getLevelType() == Level.Type.ALL) {
        uniqueSettings |= 2;
    }
    if (extra.isLevelUnique(level)) {
        uniqueSettings |= 1;
    }
    row.set(LevelUniqueSettings.name, uniqueSettings);
    row.set(LevelIsVisible.name, level.isVisible());
    row.set(Description.name, desc);
    addRow(row, rows);
    return true;
}
 
开发者ID:OSBI,项目名称:mondrian,代码行数:69,代码来源:RowsetDefinition.java

示例3: outputProperty

import org.olap4j.metadata.Level; //导入方法依赖的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: outputLevel

import org.olap4j.metadata.Level; //导入方法依赖的package包/类
/**
 * Outputs a level.
 * 
 * @param catalog
 *           Catalog name
 * @param cube
 *           Cube definition
 * @param hierarchy
 *           Hierarchy
 * @param level
 *           Level
 * @param rows
 *           List of rows to output to
 * @return whether the level is visible
 * @throws XmlaException
 *            If error occurs
 */
protected boolean outputLevel(OlapConnection connection, Catalog catalog, Cube cube, Hierarchy hierarchy, Level level, List<Row> rows) throws XmlaException, SQLException {
   final CustomXmlaHandler.XmlaExtra extra = getExtra(connection);
   String desc = level.getDescription();
   if (desc == null) {
      desc = cube.getName() + " Cube - " + getHierarchyName(hierarchy) + " Hierarchy - " + level.getName() + " Level";
   }

   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, hierarchy.getDimension().getUniqueName());
   row.set(HierarchyUniqueName.name, hierarchy.getUniqueName());
   row.set(LevelName.name, level.getName());
   row.set(LevelUniqueName.name, level.getUniqueName());
   row.set(LevelCaption.name, level.getCaption());
   row.set(LevelNumber.name, level.getDepth());

   // Get level cardinality
   // According to microsoft this is:
   // "The number of members in the level."
   int n = extra.getLevelCardinality(level);
   row.set(LevelCardinality.name, n);
   row.set(LevelType.name, getLevelType(level));
   row.set(CustomRollupSettings.name, 0);

   int uniqueSettings = 0;
   if (level.getLevelType() == Level.Type.ALL) {
      uniqueSettings |= 2;
   }
   if (extra.isLevelUnique(level)) {
      uniqueSettings |= 1;
   }
   row.set(LevelUniqueSettings.name, uniqueSettings);
   row.set(LevelIsVisible.name, level.isVisible());
   row.set(LevelOrderingProperty.name, level.getName());
   row.set(Description.name, desc);
   row.set(LevelDbtype.name, 3);
   row.set(LevelKeyCardinality.name, 1);
   row.set(LevelOrigin.name, 2);
   
   
   if(!level.getName().equalsIgnoreCase("(All)")){
      String tmpName = level.getUniqueName();
      String str = tmpName.substring(1);
      tmpName = "[$".concat(str);
      
      row.set(LevelNameSqlColumnName.name, "NAME("+tmpName+")");
      row.set(LevelKeySqlColumnName.name, "KEY(" + tmpName+")");
      row.set(LevelUniqueNameSqlColumnName.name, "(UNIQUENAME(" +tmpName + ")");
      row.set(LevelAttributeHierarchyName.name, level.getName());
      

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


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