/** * Gets the horizontal table representation from current table. If it was vertical it will be transposed. * * @param tableBody the body of a table to check * @param tableType the type of data table * @return Horizontal representation of table. */ public static ILogicalTable getHorizontalTable(ILogicalTable tableBody, IOpenClass tableType) { ILogicalTable resultTable = null; if (tableBody != null) { if (isHorizontalTable(tableBody, tableType)) { resultTable = tableBody; } else { resultTable = tableBody.transpose(); } } return resultTable; }
/** * Gets the Data_With_Titles columns from the data table body. Data_With_Titles start column consider to be the next * column after descriptor section of the table and till the end of the table. * * @param verticalTableBody Vertical representation of data table body. * @return Data_With_Titles columns for current data table body. */ private static ILogicalTable getVerticalDataWithTitle(ILogicalTable verticalTableBody) { ILogicalTable horizDataTableBody = verticalTableBody.transpose(); int startIndex = getStartIndexForDataWithTitlesSection(horizDataTableBody); return verticalTableBody.getColumns(startIndex); }
/** * * @return table with 1 column, if necessary transposed, caller is * responsible to check that table is either 1xN or Nx1 */ public static ILogicalTable make1ColumnTable(ILogicalTable t) { if (t.getWidth() == 1) { return t; } if (t.getHeight() == 1) { return t.transpose(); } // caller is responsible to check that table is either 1xN or Nx1 return t; }
return dataPart; } else if (dataPart.getWidth() == 1) { return dataPart.transpose(); return dataPart.transpose(); if (dataPart.getHeight() == MAXIMUM_COLUMNS_COUNT && isThirdColumnForDefaults(dataPart.transpose())) { return dataPart.transpose(); int horizontalCount = countTypes(dataPart.transpose(), openl, cxt); return dataPart.transpose();
int fieldsCount2 = countChangeableFields(dataTableBody.transpose(), tableType);
int cnt2 = countConditionsAndActions(table.transpose());