_id stringlengths 2 7 | title stringlengths 3 140 | partition stringclasses 3
values | text stringlengths 73 34.1k | language stringclasses 1
value | meta_information dict |
|---|---|---|---|---|---|
q178700 | ConfigurationHandler.buildCommandList | test | private List<ConfigCommand> buildCommandList(final Sheet sheet, final int sheetRightCol, final Cell cell,
final List<ConfigCommand> cList, final CellAttributesMap cellAttributesMap) {
Comment comment = cell.getCellComment();
String text = comment.getString().getString();
String[] commentLines = text.spli... | java | {
"resource": ""
} |
q178701 | ConfigurationHandler.processMethodLine | test | private void processMethodLine(final Cell cell, final String line, final CellAttributesMap cellAttributesMap) {
if (ParserUtility.isWidgetMethodString(line)) {
ParserUtility.parseWidgetAttributes(cell, line, cellAttributesMap);
} else if (ParserUtility.isValidateMethodString(line)) {
ParserUtility.parseVa... | java | {
"resource": ""
} |
q178702 | ConfigurationHandler.processCommandLine | test | private void processCommandLine(final Sheet sheet, final Cell cell, final String line,
final List<ConfigCommand> cList, final int sheetRightCol) {
int nameEndIndex = line.indexOf(TieConstants.ATTR_PREFIX, TieConstants.COMMAND_PREFIX.length());
if (nameEndIndex < 0) {
String errMsg = "Failed to parse comma... | java | {
"resource": ""
} |
q178703 | ConfigurationHandler.moveCommentToMap | test | private void moveCommentToMap(final Cell cell, final String newComment,
final Map<String, Map<String, String>> sheetCommentMap, final boolean normalComment) {
String cellKey = cell.getSheet().getSheetName() + "!$" + cell.getColumnIndex() + "$" + cell.getRowIndex();
ParserUtility.parseCommentToMap(cellKey,... | java | {
"resource": ""
} |
q178704 | ConfigurationHandler.createConfigCommand | test | private ConfigCommand createConfigCommand(final Sheet sheet, final Cell firstCell, final int sheetRightCol,
final String commandName, final Map<String, String> attrMap) {
@SuppressWarnings("rawtypes")
Class clas = commandMap.get(commandName);
if (clas == null) {
LOG.log(Level.WARNING, "Cannot find comm... | java | {
"resource": ""
} |
q178705 | ConfigurationHandler.buildAttrMap | test | private Map<String, String> buildAttrMap(final String commandLine, final int nameEndIndex) {
int paramsEndIndex = commandLine.lastIndexOf(TieConstants.ATTR_SUFFIX);
if (paramsEndIndex < 0) {
String errMsg = "Failed to parse command line [" + commandLine + "]. Expected '" + TieConstants.ATTR_SUFFIX
+ "' ... | java | {
"resource": ""
} |
q178706 | ConfigurationHandler.getSheetConfigurationFromConfigCommand | test | private SheetConfiguration getSheetConfigurationFromConfigCommand(final Sheet sheet, final FormCommand fcommand,
final int sheetRightCol) {
SheetConfiguration sheetConfig = new SheetConfiguration();
sheetConfig.setFormName(fcommand.getName());
sheetConfig.setSheetName(sheet.getSheetName());
int leftCo... | java | {
"resource": ""
} |
q178707 | ConfigurationHandler.setFooterOfSheetConfiguration | test | private void setFooterOfSheetConfiguration(final FormCommand fcommand, final SheetConfiguration sheetConfig,
final int leftCol, final int rightCol) {
String tempStr;
if (fcommand.calcFooterLength() == 0) {
tempStr = CellUtility.getCellIndexLetterKey(leftCol, 0) + " : "
+ CellUtility.getCellIndexLett... | java | {
"resource": ""
} |
q178708 | ConfigurationHandler.setBodyOfSheetConfiguration | test | private void setBodyOfSheetConfiguration(final FormCommand fcommand, final SheetConfiguration sheetConfig,
final int leftCol, final int lastRow, final int rightCol) {
String tempStr;
tempStr = CellUtility.getCellIndexLetterKey(leftCol, fcommand.getTopRow() + fcommand.calcHeaderLength() + 1)
+ " : " + Cel... | java | {
"resource": ""
} |
q178709 | ConfigurationHandler.setHeaderOfSheetConfiguration | test | private void setHeaderOfSheetConfiguration(final FormCommand fcommand, final SheetConfiguration sheetConfig,
final int leftCol, final int rightCol) {
String tempStr;
if (fcommand.calcHeaderLength() == 0) {
tempStr = CellUtility.getCellIndexLetterKey(leftCol, 0) + " : "
+ CellUtility.getCellIndexLett... | java | {
"resource": ""
} |
q178710 | CommandUtility.deleteRow | test | @SuppressWarnings({ "rawtypes" })
public static int deleteRow(final ConfigBuildRef configBuildRef,
final int rowIndex, final Map<String, Object> dataContext,
final SheetConfiguration sheetConfig,
final List<FacesRow> bodyRows) {
String fullName = ConfigurationUtility.getFullNameFromRow(
configBu... | java | {
"resource": ""
} |
q178711 | CommandUtility.removeRangesFromShiftMap | test | private static void removeRangesFromShiftMap(
final NavigableMap<String, ConfigRangeAttrs> shiftMap,
final List<String> removeFullNameList) {
for (String fname : removeFullNameList) {
shiftMap.remove(fname);
}
} | java | {
"resource": ""
} |
q178712 | CommandUtility.findRemoveFullNameList | test | private static List<String> findRemoveFullNameList(final Sheet sheet,
final int startRow, final int endRow) {
List<String> list = new ArrayList<>();
for (int rowIndex = startRow; rowIndex <= endRow; rowIndex++) {
String fullName = ConfigurationUtility
.getFullNameFromRow(sheet.getRow(rowIndex));... | java | {
"resource": ""
} |
q178713 | CommandUtility.getEachCommandFromPartsName | test | public static EachCommand getEachCommandFromPartsName(
final Map<String, Command> commandIndexMap,
final String[] varparts) {
if (varparts.length == TieConstants.DEFAULT_COMMAND_PART_LENGTH) {
return (EachCommand) commandIndexMap
.get(TieConstants.EACH_COMMAND_FULL_NAME_PREFIX
+ varparts[1]... | java | {
"resource": ""
} |
q178714 | CommandUtility.insertEmptyObjectInContext | test | @SuppressWarnings({ "rawtypes", "unchecked" })
private static String insertEmptyObjectInContext(final String fullName,
final Collection lastCollection, final EachCommand eachCommand,
final int lastCollectionIndex,
final Map<String, Object> dataContext) {
if (!(lastCollection instanceof List)) {
thr... | java | {
"resource": ""
} |
q178715 | CommandUtility.deleteObjectInContext | test | @SuppressWarnings({ "rawtypes" })
private static void deleteObjectInContext(
final Collection lastCollection, final EachCommand eachCommand,
final int lastCollectionIndex,
final Map<String, Object> dataContext) {
if (!(lastCollection instanceof List)) {
throw new EvaluationException(eachCommand.get... | java | {
"resource": ""
} |
q178716 | CommandUtility.prepareCollectionDataInContext | test | @SuppressWarnings("rawtypes")
public static int prepareCollectionDataInContext(
final String[] varparts, final Collection collection,
final Map<String, Object> dataContext) {
if (varparts.length == TieConstants.DEFAULT_COMMAND_PART_LENGTH) {
int collectionIndex = Integer.parseInt(varparts[2]);
Obje... | java | {
"resource": ""
} |
q178717 | CommandUtility.indexCommandRange | test | public static void indexCommandRange(
final ConfigRange sourceConfigRange,
final Map<String, Command> indexMap) {
if (sourceConfigRange.getCommandList() != null) {
for (int i = 0; i < sourceConfigRange.getCommandList()
.size(); i++) {
Command command = sourceConfigRange.getCommandList().get(i)... | java | {
"resource": ""
} |
q178718 | CommandUtility.isRowAllowAdd | test | public static boolean isRowAllowAdd(final Row row,
final SheetConfiguration sheetConfig) {
String fullName = ConfigurationUtility.getFullNameFromRow(row);
if (fullName != null) {
ConfigRangeAttrs attrs = sheetConfig.getShiftMap()
.get(fullName);
if ((attrs != null) && (attrs.isAllowAdd()) && (ro... | java | {
"resource": ""
} |
q178719 | CommandUtility.insertEachTemplate | test | public static void insertEachTemplate(
final ConfigRange sourceConfigRange,
final ConfigBuildRef configBuildRef, final int index,
final int insertPosition, final RowsMapping unitRowsMapping) {
int srcStartRow = sourceConfigRange.getFirstRowAddr().getRow();
int srcEndRow = sourceConfigRange.getLastRowP... | java | {
"resource": ""
} |
q178720 | CommandUtility.evaluateNormalCells | test | public static void evaluateNormalCells(final Cell cell,
final String strValue, final Map<String, Object> context,
final ExpressionEngine engine) {
if (strValue.contains(TieConstants.METHOD_PREFIX)) {
Object evaluationResult = evaluate(strValue, context, engine);
if (evaluationResult == null) {
... | java | {
"resource": ""
} |
q178721 | CommandUtility.evaluateUserFormula | test | private static void evaluateUserFormula(final Cell cell,
final String strValue) {
String formulaStr = strValue.substring(2, strValue.length() - 1);
if ((formulaStr != null) && (!formulaStr.isEmpty())) {
cell.setCellFormula(formulaStr);
}
} | java | {
"resource": ""
} |
q178722 | CommandUtility.isUserFormula | test | private static boolean isUserFormula(final String str) {
return str.startsWith(TieConstants.USER_FORMULA_PREFIX)
&& str.endsWith(TieConstants.USER_FORMULA_SUFFIX);
} | java | {
"resource": ""
} |
q178723 | CommandUtility.createCellComment | test | public static void createCellComment(final Cell cell,
final String newComment,
final Map<Cell, String> finalCommentMap) {
// due to poi's bug. the comment must be set in sorted order ( row first
// then column),
// otherwise poi will mess up.
// workaround solution is to save all comments into a map... | java | {
"resource": ""
} |
q178724 | CommandUtility.evalBoolExpression | test | public static boolean evalBoolExpression(
final ExpressionEngine expEngine, final String pscript) {
Object result = null;
String script = "( " + pscript + " )";
script = script.toUpperCase().replace("AND", "&&");
script = script.toUpperCase().replace("OR", "||");
try {
result = expEngine.evaluate... | java | {
"resource": ""
} |
q178725 | CommandUtility.removeRowsInSheet | test | public static void removeRowsInSheet(final Sheet sheet,
final int rowIndexStart, final int rowIndexEnd,
final Map<Cell, String> cachedMap) {
for (int irow = rowIndexStart; irow <= rowIndexEnd; irow++) {
removeCachedCellForRow(sheet, irow, cachedMap);
}
int irows = rowIndexEnd - rowIndexStart + 1;... | java | {
"resource": ""
} |
q178726 | CommandUtility.removeSingleRowInSheet | test | private static void removeSingleRowInSheet(final Sheet sheet,
final int rowIndexStart) {
Row removingRow = sheet.getRow(rowIndexStart);
if (removingRow != null) {
sheet.removeRow(removingRow);
}
} | java | {
"resource": ""
} |
q178727 | CommandUtility.removeCachedCellForRow | test | private static void removeCachedCellForRow(final Sheet sheet,
final int rowIndexStart, final Map<Cell, String> cachedMap) {
Row removingRow = sheet.getRow(rowIndexStart);
if (removingRow != null) {
// remove cached cell.
for (Cell cell : removingRow) {
cachedMap.remove(cell);
}
}
} | java | {
"resource": ""
} |
q178728 | CommandUtility.removeRowsInBody | test | public static void removeRowsInBody(
final SheetConfiguration sheetConfig,
final List<FacesRow> bodyRows, final int rowIndexStart,
final int rowIndexEnd) {
int top = sheetConfig.getBodyCellRange().getTopRow();
if ((rowIndexEnd < rowIndexStart) || (rowIndexStart < top)) {
return;
}
int irow... | java | {
"resource": ""
} |
q178729 | CellMap.loadPicture | test | private String loadPicture(final int rowIndex, final int colIndex) {
FacesCell facesCell = parent.getCellHelper()
.getFacesCellWithRowColFromCurrentPage(rowIndex, colIndex);
if (facesCell != null && facesCell.isContainPic()) {
FacesContext context = FacesContext.getCurrentInstance();
String picture... | java | {
"resource": ""
} |
q178730 | CellMap.loadChart | test | private String loadChart(final int rowIndex, final int colIndex) {
FacesCell facesCell = parent.getCellHelper()
.getFacesCellWithRowColFromCurrentPage(rowIndex, colIndex);
if (facesCell != null && facesCell.isContainChart()) {
FacesContext context = FacesContext.getCurrentInstance();
String chartId... | java | {
"resource": ""
} |
q178731 | CellMap.assembleNewValue | test | private String assembleNewValue(final Object value,
final FacesCell facesCell) {
String newValue;
if (value instanceof java.util.Date) {
String datePattern = facesCell.getDatePattern();
if (datePattern == null || datePattern.isEmpty()) {
datePattern = parent.getDefaultDatePattern();
}
... | java | {
"resource": ""
} |
q178732 | CellUtility.getCellValueWithFormat | test | @SuppressWarnings("deprecation")
public static String getCellValueWithFormat(final Cell poiCell, final FormulaEvaluator formulaEvaluator,
final DataFormatter dataFormatter) {
if (poiCell == null) {
return null;
}
String result;
try {
CellType cellType = poiCell.getCellTypeEnum();
if (c... | java | {
"resource": ""
} |
q178733 | CellUtility.getCellValueWithoutFormat | test | @SuppressWarnings("deprecation")
public static String getCellValueWithoutFormat(final Cell poiCell) {
if (poiCell == null) {
return null;
}
if (poiCell.getCellTypeEnum() == CellType.FORMULA) {
return getCellStringValueWithType(poiCell, poiCell.getCachedFormulaResultTypeEnum());
} else {
re... | java | {
"resource": ""
} |
q178734 | CellUtility.getCellStringValueWithType | test | private static String getCellStringValueWithType(final Cell poiCell, final CellType cellType) {
switch (cellType) {
case BOOLEAN:
return getCellStringValueWithBooleanType(poiCell);
case NUMERIC:
return getCellStringValueWithNumberType(poiCell);
case STRING:
return poiCell.getStringCellValue();... | java | {
"resource": ""
} |
q178735 | CellUtility.getCellStringValueWithNumberType | test | private static String getCellStringValueWithNumberType(final Cell poiCell) {
String result;
if (DateUtil.isCellDateFormatted(poiCell)) {
result = poiCell.getDateCellValue().toString();
} else {
result = BigDecimal.valueOf(poiCell.getNumericCellValue()).toPlainString();
// remove .0 from end for int... | java | {
"resource": ""
} |
q178736 | CellUtility.setCellValue | test | @SuppressWarnings("deprecation")
public static Cell setCellValue(final Cell c, final String value) {
try {
if (value.length() == 0) {
c.setCellType(CellType.BLANK);
} else if (WebSheetUtility.isNumeric(value)) {
setCellValueNumber(c, value);
} else if (WebSheetUtility.isDate(value)) {
... | java | {
"resource": ""
} |
q178737 | CellUtility.setCellValueString | test | private static void setCellValueString(final Cell c, final String value) {
c.setCellType(CellType.STRING);
c.setCellValue(value);
} | java | {
"resource": ""
} |
q178738 | CellUtility.setCellValueBoolean | test | private static void setCellValueBoolean(final Cell c, final String value) {
if ("Y".equalsIgnoreCase(value) || "Yes".equalsIgnoreCase(value) || "True".equalsIgnoreCase(value)) {
c.setCellValue(true);
} else {
c.setCellValue(false);
}
} | java | {
"resource": ""
} |
q178739 | CellUtility.setCellValueDate | test | private static void setCellValueDate(final Cell c, final String value) {
String date = WebSheetUtility.parseDate(value);
setCellValueString(c, date);
} | java | {
"resource": ""
} |
q178740 | CellUtility.setCellValueNumber | test | private static void setCellValueNumber(final Cell c, final String value) {
double val = Double.parseDouble(value.replace(Character.toString(','), ""));
c.setCellType(CellType.NUMERIC);
c.setCellValue(val);
} | java | {
"resource": ""
} |
q178741 | CellUtility.copyRows | test | public static void copyRows(final Sheet srcSheet, final Sheet destSheet, final int srcRowStart, final int srcRowEnd,
final int destRow, final boolean checkLock, final boolean setHiddenColumn) {
int length = srcRowEnd - srcRowStart + 1;
if (length <= 0) {
return;
}
destSheet.shiftRows(destRow, dest... | java | {
"resource": ""
} |
q178742 | CellUtility.copySingleRow | test | private static void copySingleRow(final Sheet srcSheet, final Sheet destSheet, final int sourceRowNum,
final int destinationRowNum, final boolean checkLock, final boolean setHiddenColumn) {
// Get the source / new row
Row newRow = destSheet.getRow(destinationRowNum);
Row sourceRow = srcSheet.getRow(sourceR... | java | {
"resource": ""
} |
q178743 | CellUtility.copyCell | test | public static Cell copyCell(final Sheet destSheet, final Row sourceRow, final Row newRow, final int cellIndex,
final boolean checkLock) {
// If the old cell is null jump to next cell
Cell sourceCell = sourceRow.getCell(cellIndex);
if (sourceCell == null) {
return null;
}
// If source cell is dest... | java | {
"resource": ""
} |
q178744 | CellUtility.copyCellSetValue | test | @SuppressWarnings("deprecation")
private static void copyCellSetValue(final Cell sourceCell, final Cell newCell, final boolean checkLock) {
CellStyle newCellStyle = newCell.getCellStyle();
String name = sourceCell.getCellTypeEnum().toString();
CellValueType e = Enum.valueOf(CellValueType.class, name);
e... | java | {
"resource": ""
} |
q178745 | CellUtility.copyCellSetStyle | test | @SuppressWarnings("deprecation")
private static void copyCellSetStyle(final Sheet destSheet, final Cell sourceCell, final Cell newCell) {
CellStyle newCellStyle = getCellStyleFromSourceCell(destSheet, sourceCell);
newCell.setCellStyle(newCellStyle);
// If there is a cell hyperlink, copy
if (sourceCell.g... | java | {
"resource": ""
} |
q178746 | CellUtility.cloneComment | test | public static void cloneComment(final Cell sourceCell, final Cell newCell) {
XSSFSheet sheet = (XSSFSheet) newCell.getSheet();
CreationHelper factory = sheet.getWorkbook().getCreationHelper();
Drawing drawing = sheet.createDrawingPatriarch();
XSSFComment sourceComment = (XSSFComment) sourceCell.getCellCom... | java | {
"resource": ""
} |
q178747 | CellUtility.createCommentAnchor | test | private static ClientAnchor createCommentAnchor(final Cell newCell, CreationHelper factory) {
ClientAnchor anchor = factory.createClientAnchor();
anchor.setCol1(newCell.getColumnIndex());
anchor.setCol2(newCell.getColumnIndex() + 1);
anchor.setRow1(newCell.getRowIndex());
anchor.setRow2(newCell.getRowInd... | java | {
"resource": ""
} |
q178748 | CellUtility.createOrInsertComment | test | public static void createOrInsertComment(final Cell cell, final String commentStr) {
XSSFSheet sheet = (XSSFSheet) cell.getSheet();
CreationHelper factory = sheet.getWorkbook().getCreationHelper();
Drawing drawing = sheet.createDrawingPatriarch();
Comment comment = cell.getCellComment();
String originS... | java | {
"resource": ""
} |
q178749 | CellUtility.matchCommentSettings | test | private static void matchCommentSettings(final Cell newCell, final Cell sourceCell) {
try {
XSSFVMLDrawing sourceVml = getVmlDrawingFromCell(sourceCell);
XSSFVMLDrawing targetVml = getVmlDrawingFromCell(newCell);
CTShape sourceCtShape = getCtShapeFromVml(sourceCell, sourceVml);
CTShape targetCtShape ... | java | {
"resource": ""
} |
q178750 | CellUtility.getVmlDrawingFromCell | test | private static XSSFVMLDrawing getVmlDrawingFromCell(final Cell cell) {
XSSFSheet sourceSheet = (XSSFSheet) cell.getSheet();
for (POIXMLDocumentPart sourcePart : sourceSheet.getRelations()) {
if ((sourcePart != null) && (sourcePart instanceof XSSFVMLDrawing)) {
return (XSSFVMLDrawing) sourcePart;
}
... | java | {
"resource": ""
} |
q178751 | CellUtility.getCtShapeFromVml | test | @SuppressWarnings("rawtypes")
private static CTShape getCtShapeFromVml(final Cell sourceCell, XSSFVMLDrawing sourceVml)
throws ReflectiveOperationException {
Method findshape;
// int parameter
Class[] paramInt = new Class[2];
paramInt[0] = Integer.TYPE;
paramInt[1] = Integer.TYPE;
findshape = so... | java | {
"resource": ""
} |
q178752 | CellUtility.getCellStyleFromSourceCell | test | private static CellStyle getCellStyleFromSourceCell(final Sheet destSheet, final Cell sourceCell) {
Workbook wb = destSheet.getWorkbook();
// Copy style from old cell and apply to new cell
CellStyle newCellStyle = wb.createCellStyle();
newCellStyle.cloneStyleFrom(sourceCell.getCellStyle());
return newCel... | java | {
"resource": ""
} |
q178753 | CellUtility.convertCell | test | public static void convertCell(final SheetConfiguration sheetConfig, final FacesCell fcell, final Cell poiCell,
final Map<String, CellRangeAddress> cellRangeMap, final int originRowIndex,
final CellAttributesMap cellAttributesMap, final String saveAttrs) {
CellRangeAddress caddress;
String key = getCellIn... | java | {
"resource": ""
} |
q178754 | CellUtility.getRowColFromComponentAttributes | test | public static int[] getRowColFromComponentAttributes(final UIComponent target) {
int rowIndex = (Integer) target.getAttributes().get("data-row");
int colIndex = (Integer) target.getAttributes().get("data-column");
int[] list = new int[2];
list[0] = rowIndex;
list[1] = colIndex;
return list;
} | java | {
"resource": ""
} |
q178755 | CellUtility.getInitRowsFromConfig | test | public static int getInitRowsFromConfig(final SheetConfiguration sheetConfig) {
int initRows = 1;
if ("Repeat".equalsIgnoreCase(sheetConfig.getFormBodyType())) {
initRows = sheetConfig.getBodyInitialRows();
if (initRows < 1) {
initRows = 1;
}
}
return initRows;
} | java | {
"resource": ""
} |
q178756 | CellUtility.getFacesRowFromBodyRow | test | public static FacesRow getFacesRowFromBodyRow(final int row, final List<FacesRow> bodyRows, final int topRow) {
FacesRow frow = null;
try {
frow = bodyRows.get(row - topRow);
} catch (Exception e) {
LOG.log(Level.SEVERE, "getFacesRowFromBodyRow Error row = " + row + "top row = " + topRow + " ; erro... | java | {
"resource": ""
} |
q178757 | CellUtility.getFacesCellFromBodyRow | test | public static FacesCell getFacesCellFromBodyRow(final int row, final int col, final List<FacesRow> bodyRows,
final int topRow, final int leftCol) {
FacesCell cell = null;
try {
cell = bodyRows.get(row - topRow).getCells().get(col - leftCol);
} catch (Exception e) {
LOG.log(Level.SEVERE, "getFac... | java | {
"resource": ""
} |
q178758 | CellUtility.getPoiCellFromSheet | test | public static Cell getPoiCellFromSheet(final int rowIndex, final int colIndex, final Sheet sheet1) {
if ((sheet1 != null) && (sheet1.getRow(rowIndex) != null)) {
return sheet1.getRow(rowIndex).getCell(colIndex);
}
return null;
} | java | {
"resource": ""
} |
q178759 | CellUtility.getSkeyFromPoiCell | test | public static String getSkeyFromPoiCell(final Cell poiCell) {
return poiCell.getSheet().getSheetName() + "!"
+ CellUtility.getCellIndexNumberKey(poiCell.getColumnIndex(), poiCell.getRowIndex());
} | java | {
"resource": ""
} |
q178760 | CellUtility.getOrAddTieCellInMap | test | public static TieCell getOrAddTieCellInMap(final Cell poiCell, HashMap<String, TieCell> tieCells) {
String skey = CellUtility.getSkeyFromPoiCell(poiCell);
TieCell tieCell = tieCells.get(skey);
if (tieCell == null) {
tieCell = new TieCell();
tieCell.setSkey(skey);
tieCells.put(skey, tieCell);
}
... | java | {
"resource": ""
} |
q178761 | TieWebSheetBeanCurrent.getCurrentDataContextName | test | public final String getCurrentDataContextName() {
if (currentDataContextName == null) {
StringBuilder sb = new StringBuilder();
List<String> list = this.getCurrentDataContextNameList();
for (int i = 0; i < list.size(); i++) {
if (i > 0) {
sb.append(":" + list.get(i));
} else {
sb.ap... | java | {
"resource": ""
} |
q178762 | ExpressionEngine.evaluate | test | public final Object evaluate(final String expression,
final Map<String, Object> context) {
JexlContext jexlContext = new MapContext(context);
try {
JexlEngine jexl = JEXL_LOCAL.get();
Map<String, Expression> expMap = JEXL_MAP_LOCAL.get();
Expression jexlExpression = expMap.get(expression);
if ... | java | {
"resource": ""
} |
q178763 | ExpressionEngine.evaluate | test | public final Object evaluate(final Map<String, Object> context) {
JexlContext jexlContext = new MapContext(context);
try {
return jExpression.evaluate(jexlContext);
} catch (Exception e) {
throw new EvaluationException(
"An error occurred when evaluating expression "
+ jExpression.getExpr... | java | {
"resource": ""
} |
q178764 | SerialRow.writeObject | test | private void writeObject(final java.io.ObjectOutputStream out)
throws IOException {
this.rowIndex = this.getRow().getRowNum();
out.defaultWriteObject();
} | java | {
"resource": ""
} |
q178765 | RowsMapping.removeRow | test | public final void removeRow(final Integer sourceRowNum,
final Row targetRow) {
List<SerialRow> mapRowList = rowsMap.get(sourceRowNum);
if (mapRowList != null) {
mapRowList.remove(new SerialRow(targetRow, -1));
rowsMap.put(sourceRowNum, mapRowList);
}
} | java | {
"resource": ""
} |
q178766 | RowsMapping.mergeMap | test | public final void mergeMap(final RowsMapping addMap) {
Map<Integer, List<SerialRow>> map = addMap.getRowsMap();
for (Map.Entry<Integer, List<SerialRow>> entry : map.entrySet()) {
List<SerialRow> entryRowList = entry.getValue();
if ((entryRowList != null) && (!entryRowList.isEmpty())) {
for (SerialRow... | java | {
"resource": ""
} |
q178767 | RowsMapping.recover | test | public final void recover(final Sheet sheet) {
for (Map.Entry<Integer, List<SerialRow>> entry : this.getRowsMap()
.entrySet()) {
List<SerialRow> listRow = entry.getValue();
for (SerialRow serialRow : listRow) {
serialRow.recover(sheet);
}
}
} | java | {
"resource": ""
} |
q178768 | ChartUtility.getChartType | test | public static ChartType getChartType(final CTChart ctChart) {
CTPlotArea plotArea = ctChart.getPlotArea();
for (ChartType chartType : ChartType.values()) {
if (chartType.isThisType(plotArea)) {
return chartType;
}
}
return null;
} | java | {
"resource": ""
} |
q178769 | ChartUtility.toStroke | test | public static BasicStroke toStroke(final String style) {
BasicStroke result = null;
if (style != null) {
float lineWidth = STROKE_DEFAULT_LINE_WIDTH;
float[] dash = { STROKE_DEFAULT_DASH_WIDTH };
float[] dot = { lineWidth };
if (style.equalsIgnor... | java | {
"resource": ""
} |
q178770 | ChartUtility.initChartDataFromXSSFChart | test | public static ChartData initChartDataFromXSSFChart(final String chartId,
final XSSFChart chart, final XSSFWorkbook wb) {
ThemesTable themeTable = wb.getStylesSource().getTheme();
ChartData chartData = new ChartData();
XSSFRichTextString chartTitle = chart.getTitle();
... | java | {
"resource": ""
} |
q178771 | ChartUtility.setUpChartData | test | public static void setUpChartData(final ChartData chartData,
final CTChart ctChart, final ThemesTable themeTable,
final ChartObject ctObj) {
Object chartObj = null;
@SuppressWarnings("rawtypes")
List plotCharts = ctObj.getChartListFromCtChart(ctChart);
/... | java | {
"resource": ""
} |
q178772 | ChartUtility.initXSSFAnchorsMap | test | public static void initXSSFAnchorsMap(final XSSFWorkbook wb,
final ChartsData charsData) {
Map<String, ClientAnchor> anchortMap = charsData
.getChartAnchorsMap();
Map<String, String> positionMap = charsData.getChartPositionMap();
anchortMap.clear();
po... | java | {
"resource": ""
} |
q178773 | ChartUtility.initXSSFAnchorsMapForSheet | test | private static void initXSSFAnchorsMapForSheet(
final Map<String, ClientAnchor> anchortMap,
final Map<String, String> positionMap, final XSSFSheet sheet) {
XSSFDrawing drawing = sheet.createDrawingPatriarch();
CTDrawing ctDrawing = drawing.getCTDrawing();
if (ctDrawi... | java | {
"resource": ""
} |
q178774 | ChartUtility.getAnchorAssociateChartId | test | private static String getAnchorAssociateChartId(
final CTTwoCellAnchor ctanchor) {
if (ctanchor.getGraphicFrame() == null) {
return null;
}
Node parentNode = ctanchor.getGraphicFrame().getGraphic()
.getGraphicData().getDomNode();
NodeL... | java | {
"resource": ""
} |
q178775 | ChartUtility.getChartIdFromChildNodeAttributes | test | private static String getChartIdFromChildNodeAttributes(
final NamedNodeMap attrs) {
for (int j = 0; j < attrs.getLength(); j++) {
Attr attribute = (Attr) attrs.item(j);
if ("r:id".equalsIgnoreCase(attribute.getName())) {
return attribute.getValue();
... | java | {
"resource": ""
} |
q178776 | EachCommand.buildEachObjects | test | @SuppressWarnings("rawtypes")
private int buildEachObjects(String fullName,
final ConfigBuildRef configBuildRef, final int atRow,
final Map<String, Object> context,
final List<RowsMapping> currentRowsMappingList,
final Collection itemsCollection, final String objClassName) {
int index = 0;
int... | java | {
"resource": ""
} |
q178777 | CellHelper.saveDataInContext | test | public final void saveDataInContext(final Cell poiCell,
final String strValue) {
String saveAttr = SaveAttrsUtility.prepareContextAndAttrsForCell(poiCell, ConfigurationUtility.getFullNameFromRow(poiCell.getRow()), this);
if (saveAttr!= null) {
SaveAttrsUtility.saveDataToObjectInContext(
parent.g... | java | {
"resource": ""
} |
q178778 | CellHelper.reCalc | test | public final void reCalc() {
parent.getFormulaEvaluator().clearAllCachedResultValues();
try {
parent.getFormulaEvaluator().evaluateAll();
} catch (Exception ex) {
// skip the formula exception when recalc but log it
LOG.log(Level.SEVERE,
" recalc formula error : " + ex.getLocalizedMessage()... | java | {
"resource": ""
} |
q178779 | CellHelper.getPoiCellWithRowColFromTab | test | public final Cell getPoiCellWithRowColFromTab(final int rowIndex,
final int colIndex, final String tabName) {
if (parent.getWb() != null) {
return CellUtility.getPoiCellFromSheet(rowIndex, colIndex,
parent.getWb().getSheet(parent.getSheetConfigMap()
.get(tabName).getSheetName()));
}
ret... | java | {
"resource": ""
} |
q178780 | CellHelper.getFacesCellWithRowColFromCurrentPage | test | public final FacesCell getFacesCellWithRowColFromCurrentPage(
final int rowIndex, final int colIndex) {
if (parent.getBodyRows() != null) {
int top = parent.getCurrent().getCurrentTopRow();
int left = parent.getCurrent().getCurrentLeftColumn();
return parent.getBodyRows().get(rowIndex - top).getCells... | java | {
"resource": ""
} |
q178781 | CellHelper.restoreDataContext | test | public final void restoreDataContext(final String fullName) {
String[] parts = fullName.split(":");
if (!isNeedRestore(fullName, parts)) {
return;
}
boolean stopSkip = false;
List<String> list = parent.getCurrent()
.getCurrentDataContextNameList();
int listSize = list.size();
// pr... | java | {
"resource": ""
} |
q178782 | CellHelper.getLastCollect | test | public final CollectionObject getLastCollect(final String fullName) {
String[] parts = fullName.split(":");
String part = parts[parts.length - 1];
return startRestoreDataContext(part);
} | java | {
"resource": ""
} |
q178783 | CellHelper.isNeedRestore | test | private boolean isNeedRestore(final String fullName,
final String[] parts) {
if (fullName == null) {
return false;
}
if ((parent.getCurrent().getCurrentDataContextName() != null)
&& (parent.getCurrent().getCurrentDataContextName()
.toLowerCase()
.startsWith(fullName.toLowerCase()))) ... | java | {
"resource": ""
} |
q178784 | CellHelper.startRestoreDataContext | test | private CollectionObject startRestoreDataContext(final String part) {
if (part.startsWith(TieConstants.EACH_COMMAND_FULL_NAME_PREFIX)) {
String[] varparts = part.split("\\.");
CollectionObject collect = new CollectionObject();
collect.setEachCommand(
CommandUtility
.getEachCommandFromPart... | java | {
"resource": ""
} |
q178785 | ConfigRange.shiftRowRef | test | public final void shiftRowRef(final Sheet sheet, final int shiftnum) {
try {
this.setFirstRowRef(sheet
.getRow(attrs.getFirstRowAddr().getRow() + shiftnum)
.getCell(attrs.getFirstRowAddr().getColumn(),
MissingCellPolicy.CREATE_NULL_AS_BLANK),
false);
this.setLastRowPlusRef(sheet,
... | java | {
"resource": ""
} |
q178786 | ConfigRange.setFirstRowRef | test | public final void setFirstRowRef(final Cell pFirstRowRef,
final boolean alsoCreateAddr) {
this.attrs.setFirstRowRef(pFirstRowRef);
if (alsoCreateAddr) {
this.setFirstRowAddr(new SerialCellAddress(pFirstRowRef));
}
} | java | {
"resource": ""
} |
q178787 | ConfigRange.setLastRowPlusRef | test | public final void setLastRowPlusRef(final Sheet sheet,
final int rightCol, final int lastRow,
final boolean alsoSetAddr) {
if ((lastRow >= 0) && (sheet != null) && (rightCol >= 0)) {
Row row = sheet.getRow(lastRow + 1);
if (row == null) {
row = sheet.createRow(lastRow + 1);
}
Cell cell... | java | {
"resource": ""
} |
q178788 | ConfigRange.buildCellsForRow | test | private void buildCellsForRow(final Row row, final String fullName,
final Map<String, Object> context,
final ConfigBuildRef configBuildRef,
ShiftFormulaRef shiftFormulaRef) {
if ((row == null)
|| !ConfigurationUtility.isStaticRowRef(this, row)) {
return;
}
for (Cell cell : row) {
build... | java | {
"resource": ""
} |
q178789 | ConfigRange.buildSingleCell | test | private void buildSingleCell(final Cell cell,
final Map<String, Object> context,
final ConfigBuildRef configBuildRef,
final ShiftFormulaRef shiftFormulaRef) {
try {
CommandUtility.evaluate(context, cell,
configBuildRef.getEngine());
if (cell.getCellTypeEnum() == CellType.FORMULA) {
// ... | java | {
"resource": ""
} |
q178790 | SerialDataContext.readObject | test | private void readObject(final java.io.ObjectInputStream in)
throws IOException {
try {
in.defaultReadObject();
Gson objGson = new GsonBuilder().setPrettyPrinting().create();
Type listType = new TypeToken<Map<String, Object>>() {
}.getType();
this.dataContext = objGson.fromJson(mapToJson, list... | java | {
"resource": ""
} |
q178791 | ChartData.buildCategoryList | test | public final void buildCategoryList(final CTAxDataSource ctAxDs) {
List<ParsedCell> cells = new ArrayList<>();
try {
String fullRangeName = ctAxDs.getStrRef().getF();
String sheetName = WebSheetUtility
.getSheetNameFromFullCellRefName(fullRangeName);
CellRangeAddress region = CellRangeAddress.... | java | {
"resource": ""
} |
q178792 | ChartData.buildSeriesList | test | @SuppressWarnings("rawtypes")
public final void buildSeriesList(final List bsers,
final ThemesTable themeTable, final ChartObject ctObj) {
List<ChartSeries> lseriesList = new ArrayList<>();
try {
for (int index = 0; index < bsers.size(); index++) {
Object ctObjSer = bsers.get(index);
ChartSe... | java | {
"resource": ""
} |
q178793 | ChartData.buildChartSeriesInList | test | private ChartSeries buildChartSeriesInList(final ThemesTable themeTable,
final ChartObject ctObj, final Object ctObjSer, final int index) {
ChartSeries ctSer = new ChartSeries();
ctSer.setSeriesLabel(new ParsedCell(
ctObj.getSeriesLabelFromCTSer(ctObjSer)));
ctSer.setSeriesColor(ColorUtility.geColorFr... | java | {
"resource": ""
} |
q178794 | ChartData.getColorListFromDPTWithValueList | test | private List<XColor> getColorListFromDPTWithValueList(
final List<CTDPt> dptList, final List<ParsedCell> cells,
final ThemesTable themeTable, final ChartObject ctObj) {
List<XColor> colors = new ArrayList<>();
if ((dptList != null) && (cells != null)) {
for (int index = 0; index < cells.size(); inde... | java | {
"resource": ""
} |
q178795 | ChartData.getDPtFromListWithIndex | test | private CTDPt getDPtFromListWithIndex(final List<CTDPt> dptList,
final int index) {
if (dptList != null) {
for (CTDPt dpt : dptList) {
if (dpt.getIdx().getVal() == index) {
return dpt;
}
}
}
return null;
} | java | {
"resource": ""
} |
q178796 | SheetConfiguration.setCommandIndexMap | test | public final void setCommandIndexMap(
final Map<String, Command> pcommandIndexMap) {
if (pcommandIndexMap instanceof HashMap) {
this.commandIndexMap = (HashMap<String, Command>) pcommandIndexMap;
} else {
this.commandIndexMap = new HashMap<>();
this.commandIndexMap.putAll(pcommandIndexMap);
}
... | java | {
"resource": ""
} |
q178797 | PicturesUtility.getPictruesMap | test | public static void getPictruesMap(final Workbook wb,
final Map<String, Picture> picMap) {
if (wb instanceof XSSFWorkbook) {
getXSSFPictruesMap((XSSFWorkbook) wb, picMap);
}
return;
} | java | {
"resource": ""
} |
q178798 | PicturesUtility.getXSSFPictruesMap | test | private static void getXSSFPictruesMap(final XSSFWorkbook wb,
final Map<String, Picture> picMap) {
picMap.clear();
List<XSSFPictureData> pictures = wb.getAllPictures();
if (pictures.isEmpty()) {
return;
}
for (int i = 0; i < wb.getNumberOfSheets(); i++) {
XSSFSheet sheet = wb.getSheetAt(i);... | java | {
"resource": ""
} |
q178799 | PicturesUtility.indexPictureInMap | test | private static void indexPictureInMap(final Map<String, Picture> picMap,
final XSSFSheet sheet, final POIXMLDocumentPart dr) {
if (dr instanceof XSSFDrawing) {
XSSFDrawing drawing = (XSSFDrawing) dr;
List<XSSFShape> shapes = drawing.getShapes();
for (XSSFShape shape : shapes) {
if (shape instanc... | java | {
"resource": ""
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.