Class AbstractResultMatrix<T>
java.lang.Object
com.itextpdf.pdfua.checkers.utils.tables.AbstractResultMatrix<T>
- Type Parameters:
T- the type of the cell
- Direct Known Subclasses:
CellResultMatrix, StructTreeResultMatrix
Class that represents a matrix of cells in a table.
It is used to check if the table has valid headers and scopes for the cells.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intprivate final PdfUAConformanceprotected final ITableIterator<T> private final int -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractResultMatrix(ITableIterator<T> iterator, PdfUAConformance conformance) Creates a newAbstractResultMatrixinstance. -
Method Summary
Modifier and TypeMethodDescriptionvoidRuns the algorithm to check if the table has valid headers and scopes for the cells.private static <Z> List<Z> createFixedSizedList(int capacity, Object defaultValue) private voiddetermineDefaultScope(int rowIdx, int rowspan, int colIdx, int colspan, List<Boolean> scopeMatrix) (package private) abstract byte[]getElementId(T cell) (package private) abstract List<byte[]> getHeaders(T cell) private StringgetLocationInTable(int row) private intgetNormalizedRow(int row) (package private) abstract String(package private) abstract Stringprivate booleanhasValidHeaderIds(T cell, Set<String> knownIds) private <Z> voidprivate voidsetColumnValue(int col, int colSpan, List<Boolean> arr, boolean value) private voidsetRowAndColumnValue(int row, int rowSpan, int col, int colSpan, List<Boolean> arr, boolean value) private voidsetRowValue(int row, int rowSpan, List<Boolean> arr, boolean value) private voidvalidateTableCells(Set<String> knownIds, List<Boolean> scopeMatrix, boolean hasUnknownHeaders)
-
Field Details
-
iterator
-
cellMatrix
-
rows
private final int rows -
cols
private final int cols -
conformance
-
-
Constructor Details
-
AbstractResultMatrix
Creates a newAbstractResultMatrixinstance.- Parameters:
iterator- the iterator that will be used to iterate over the cellsconformance-PdfUAConformanceof the document that is being checked
-
-
Method Details
-
checkValidTableTagging
public void checkValidTableTagging()Runs the algorithm to check if the table has valid headers and scopes for the cells.- Throws:
PdfUAConformanceException- if the table doesn't have valid headers and scopes for the cells.
-
getHeaders
-
getScope
-
getElementId
-
getRole
-
determineDefaultScope
-
validateTableCells
-
getLocationInTable
-
getNormalizedRow
private int getNormalizedRow(int row) -
setCell
-
setRowValue
-
setColumnValue
-
setRowAndColumnValue
-
hasValidHeaderIds
-
createFixedSizedList
-