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 int
protected final ITableIterator
<T> private final int
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
AbstractResultMatrix
(ITableIterator<T> iterator) Creates a newAbstractResultMatrix
instance. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Runs 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) (package private) abstract byte[]
getElementId
(T cell) (package private) abstract List
<byte[]> getHeaders
(T cell) private String
getLocationInTable
(int row) private int
getNormalizedRow
(int row) (package private) abstract String
(package private) abstract String
private boolean
hasValidHeaderIds
(T cell, Set<String> knownIds) private <Z> void
private void
setColumnValue
(int col, int colSpan, List<Boolean> arr, boolean value) private void
setRowValue
(int row, int rowSpan, List<Boolean> arr, boolean value) private void
validateTableCells
(Set<String> knownIds, List<Boolean> scopeMatrix, boolean hasUnknownHeaders)
-
Field Details
-
iterator
-
cellMatrix
-
rows
private final int rows -
cols
private final int cols
-
-
Constructor Details
-
AbstractResultMatrix
Creates a newAbstractResultMatrix
instance.- Parameters:
iterator
- The iterator that will be used to iterate over the cells.
-
-
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.
-
setRowValue
-
getHeaders
-
getScope
-
getElementId
-
getRole
-
validateTableCells
-
getLocationInTable
-
getNormalizedRow
private int getNormalizedRow(int row) -
setCell
-
setColumnValue
-
hasValidHeaderIds
-
createFixedSizedList
-