Class TableStructElementIterator

    • Field Detail

      • locationCache

        private final java.util.HashMap<PdfStructElem,​Tuple2<java.lang.Integer,​java.lang.Integer>> locationCache
      • amountOfCols

        private int amountOfCols
      • amountOfRowsHeader

        private int amountOfRowsHeader
      • amountOfRowsBody

        private int amountOfRowsBody
      • amountOfRowsFooter

        private int amountOfRowsFooter
      • iterIndex

        private int iterIndex
    • Method Detail

      • hasNext

        public boolean hasNext()
        Checks if there is a next element in the iteration.
        Specified by:
        hasNext in interface ITableIterator<PdfStructElem>
        Returns:
        true if there is a next element, false otherwise.
      • getAmountOfRowsBody

        public int getAmountOfRowsBody()
        Gets the number of rows in the body of the table.
        Specified by:
        getAmountOfRowsBody in interface ITableIterator<PdfStructElem>
        Returns:
        The number of rows in the body of the table.
      • getAmountOfRowsHeader

        public int getAmountOfRowsHeader()
        Gets the number of rows in the header of the table.
        Specified by:
        getAmountOfRowsHeader in interface ITableIterator<PdfStructElem>
        Returns:
        The number of rows in the header of the table.
      • getAmountOfRowsFooter

        public int getAmountOfRowsFooter()
        Gets the number of rows in the footer of the table.
        Specified by:
        getAmountOfRowsFooter in interface ITableIterator<PdfStructElem>
        Returns:
        The number of rows in the footer of the table.
      • getNumberOfColumns

        public int getNumberOfColumns()
        Returns the amount of columns the table has. All rows in a table in UA specification must have the same column count. So return the max column count for correctly generated error messages.
        Specified by:
        getNumberOfColumns in interface ITableIterator<PdfStructElem>
        Returns:
        the amount of columns
      • getCol

        public int getCol()
        Gets the column index of current position.
        Specified by:
        getCol in interface ITableIterator<PdfStructElem>
        Returns:
        The column index.
      • getColspan

        public int getColspan()
        Gets the colspan of the current position
        Specified by:
        getColspan in interface ITableIterator<PdfStructElem>
        Returns:
        the colspan of current position
      • flattenElements

        private void flattenElements​(PdfStructElem table)
      • build2DRepresentationOfTagTreeStructures

        private void build2DRepresentationOfTagTreeStructures​(java.util.List<PdfStructElem> rows)
      • setAmountOfCols

        private void setAmountOfCols​(java.util.List<PdfStructElem> rows)
      • getColspan

        private static int getColspan​(PdfStructElem structElem)
      • getRowspan

        private static int getRowspan​(PdfStructElem structElem)
      • getIntValueFromAttributes

        private static int getIntValueFromAttributes​(PdfStructElem elem,
                                                     PdfName name)