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


Java Cell.getValue方法代码示例

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


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

示例1: emitCell

import org.olap4j.Cell; //导入方法依赖的package包/类
private void emitCell(SaxWriter writer, Cell cell) throws OlapException {
   ++cellOrdinal;
   Util.discard(cellOrdinal);

   // Ignore empty cells.
   final Object cellValue = cell.getValue();
   if (cellValue == null) {
      return;
   }

   writer.startElement("row");
   for (ColumnHandler columnHandler : columnHandlers) {
      columnHandler.write(writer, cell, members);
   }
   writer.endElement();
}
 
开发者ID:OpenlinkFinancial,项目名称:MXMLABridge,代码行数:17,代码来源:MDataSet.java

示例2: next

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

示例3: parseCellDataElement

import org.olap4j.Cell; //导入方法依赖的package包/类
protected void parseCellDataElement(CellSet result) throws JRException
{
	if (log.isDebugEnabled())
	{
		log.debug("COLUMNS axis size: " + result.getAxes().get(Axis.COLUMNS.axisOrdinal())
			.getPositions().size());
		log.debug("ROWS axis size: " + result.getAxes().get(Axis.ROWS.axisOrdinal())
			.getPositions().size());
	}
	for (Position axis_1 : result.getAxes().get(Axis.ROWS.axisOrdinal()).getPositions())
	{
		for (Position axis_0 : result.getAxes().get(Axis.COLUMNS.axisOrdinal()).getPositions())
		{
			Cell currentCell = result.getCell(axis_0, axis_1);
			if (currentCell.isError())
			{
				handleCellErrors(currentCell);
			}
			else
			{
				int cellOrdinal = currentCell.getOrdinal();
				Object value = currentCell.getValue();
				if (value instanceof Number)
				{
					try
					{
						value = currentCell.getDoubleValue();
					}
					catch (OlapException e)
					{
						throw new JRException(e);
					}
				}
				
				String fmtValue = currentCell.getFormattedValue();
				JRXmlaCell cell = new JRXmlaCell(value, fmtValue);
				if (log.isDebugEnabled())
				{
					log.debug("Cell: " + cellOrdinal + ", at axis 0 pos: " + axis_0.getOrdinal() + ", axis 1 pos: " + axis_1.getOrdinal());
				}
				xmlaResult.setCell(cell, cellOrdinal);
			}
		}
	}
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:46,代码来源:Olap4jXmlaQueryExecuter.java

示例4: handleCellErrors

import org.olap4j.Cell; //导入方法依赖的package包/类
protected void handleCellErrors(Cell currentCell) throws JRException
{
	log.error(currentCell.getValue());
	
	throw new JRException((OlapException) currentCell.getValue());
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:7,代码来源:Olap4jXmlaQueryExecuter.java

示例5: Olap4jCell

import org.olap4j.Cell; //导入方法依赖的package包/类
public Olap4jCell(Cell cell)
{
	this.value = cell.getValue();
	this.formattedValue = cell.getFormattedValue();
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:6,代码来源:Olap4jCell.java


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