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


Java Position.getMembers方法代码示例

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


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

示例1: determineRowAxisColumns

import org.olap4j.Position; //导入方法依赖的package包/类
/**
 * 
 * @param axis
 * @return
 */
private List<Level> determineRowAxisColumns(CellSetAxis axis) {
    Set<Level> levelsEncountered = new HashSet<Level>();
    for (Position p : axis.getPositions()) {
        for (Member m : p.getMembers()) {
            levelsEncountered.add(m.getLevel());
        }
    }
    
    List<Level> columnAssignments = new ArrayList<Level>();
    for (Hierarchy h : axis.getAxisMetaData().getHierarchies()) {
        for (Level l : h.getLevels()) {
            if (levelsEncountered.contains(l)) {
                columnAssignments.add(l);
            }
        }
    }
    
    return columnAssignments;
}
 
开发者ID:SQLPower,项目名称:wabit,代码行数:25,代码来源:OlapResultSet.java

示例2: computeAxisInfo

import org.olap4j.Position; //导入方法依赖的package包/类
/**
 * Computes a description of an axis.
 * 
 * @param axis
 *            Axis
 * @return Description of axis
 */
private AxisInfo computeAxisInfo(final CellSetAxis axis) {
    if (axis == null) {
        return new AxisInfo(0);
    }
    final AxisInfo axisInfo = new AxisInfo(axis.getAxisMetaData().getHierarchies().size());
    int p = -1;
    for (final Position position : axis.getPositions()) {
        ++p;
        int k = -1;
        for (final Member member : position.getMembers()) {
            ++k;
            final AxisOrdinalInfo axisOrdinalInfo = axisInfo.ordinalInfos.get(k);
            final int topDepth = member.isAll() ? member.getDepth() : member.getHierarchy().hasAll() ? 1 : 0;
            if (axisOrdinalInfo.minDepth > topDepth || p == 0) {
                axisOrdinalInfo.minDepth = topDepth;
            }
            axisOrdinalInfo.maxDepth = Math.max(axisOrdinalInfo.maxDepth, member.getDepth());
        }
    }
    return axisInfo;
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:29,代码来源:CellSetFormatter.java

示例3: computeAxisInfo

import org.olap4j.Position; //导入方法依赖的package包/类
/**
 * Computes a description of an axis.
 *
 * @param axis
 *          Axis
 * @return Description of axis
 */
private AxisInfo computeAxisInfo( final CellSetAxis axis ) {
  if ( axis == null ) {
    return new AxisInfo( 0 );
  }
  final AxisInfo axisInfo = new AxisInfo( axis.getAxisMetaData().getHierarchies().size() );
  int p = -1;
  for ( final Position position : axis.getPositions() ) {
    ++p;
    int k = -1;
    for ( final Member member : position.getMembers() ) {
      ++k;
      final AxisOrdinalInfo axisOrdinalInfo = axisInfo.ordinalInfos.get( k );
      final int topDepth = member.isAll() ? member.getDepth() : member.getHierarchy().hasAll() ? 1 : 0;
      if ( axisOrdinalInfo.minDepth > topDepth || p == 0 ) {
        axisOrdinalInfo.minDepth = topDepth;
      }
      axisOrdinalInfo.maxDepth = Math.max( axisOrdinalInfo.maxDepth, member.getDepth() );
    }
  }
  return axisInfo;
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:29,代码来源:CellSetFormatter.java

示例4: next

import org.olap4j.Position; //导入方法依赖的package包/类
@Override
  public List<?> next() throws TranslatorException {
  	if (!rowPositionIterator.hasNext()) {
  		return null;
  	}
  	Position rowPosition = rowPositionIterator.next();
  	Object[] result = new Object[colWidth];
  	int i = 0;
  	// add in rows axis
List<Member> members = rowPosition.getMembers();
for (Member member:members) {
	String columnName = member.getName();
	result[i++] = columnName;
}

// add col axis
for (Position colPos : columnsAxis) {
	Cell cell = cellSet.getCell(colPos, rowPosition);
	result[i++] = cell.getValue();
}	
if (returnsArray) {
	ArrayList<Object[]> results = new ArrayList<Object[]>(1);
	results.add(result);
	return results;
}
return Arrays.asList(result);
  }
 
开发者ID:kenweezy,项目名称:teiid,代码行数:28,代码来源:OlapQueryExecution.java

示例5: iterate

import org.olap4j.Position; //导入方法依赖的package包/类
private void iterate(SaxWriter writer, int axis, final int xxx) throws OlapException {
   final List<Position> positions = cellSet.getAxes().get(axis).getPositions();
   int axisLength = axis == 0 ? 1 : positions.size();

   for (int i = 0; i < axisLength; i++) {
      final Position position = positions.get(i);
      int ho = xxx;
      final List<Member> members = position.getMembers();
      for (int j = 0; j < members.size() && ho < this.members.length; j++, ho++) {
         this.members[ho] = position.getMembers().get(j);
      }

      ++cellOrdinal;
      Util.discard(cellOrdinal);

      if (axis >= 2) {
         iterate(writer, axis - 1, ho);
      } else {
         writer.startElement("row");// abrimos la fila
         pos[axis] = i; // coordenadas: fila i
         pos[0] = 0; // coordenadas (0,i): columna 0
         for (ColumnHandler columnHandler : columnHandlers) {
            if (columnHandler instanceof MemberColumnHandler) {
               columnHandler.write(writer, null, this.members);
            } else if (columnHandler instanceof CellColumnHandler) {
               columnHandler.write(writer, cellSet.getCell(posList), null);
               pos[0]++;// next col.
            }
         }
         writer.endElement();// cerramos la fila
      }
   }
}
 
开发者ID:OpenlinkFinancial,项目名称:MXMLABridge,代码行数:34,代码来源:MDataSet.java


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