src/main/java/eu/digitisation/text/Text.java
private void readPageFile(File file, boolean isSorted) throws IOException, WarningException {
        Document doc = loadXMLFile(file);
        Document sorted = ((SortPageXML.isSorted(doc)) || (isSorted)) ? doc : SortPageXML.sorted(doc);
        List<Element> regions = (filter == null)
                ? new ElementList(sorted.getElementsByTagName("TextRegion"))
                : filter.selectElements(sorted);

        for (int r = 0; r < regions.size(); ++r) {
            Element region = regions.get(r);
            readPageTextRegion(region);
        }
    }
/**
     * Reads textual content in PAGE XML document. By default selects all
     * TextREgion elements
     *
     * @param file the input XML file
     * @param isSorted if true, it avoid to sort pagexml file,
     *                 if false, it sort pagexml file if needed
     */
Reads textual content in PAGE XML document. By default selects all
TextREgion elements

@param file the input XML file
@param isSorted if true, it avoid to sort pagexml file,
if false, it sort pagexml file if needed
Reads textual content in PAGE XML document . By default selects all TextREgion elements @param file the input XML file @param isSorted if true it avoid to sort pagexml file if false it sort pagexml file if needed
private void readPageFile(File file, boolean isSorted) throws IOException, WarningException {
        Document doc = loadXMLFile(file);
        Document sorted = ((SortPageXML.isSorted(doc)) || (isSorted)) ? doc : SortPageXML.sorted(doc);
        List<Element> regions = (filter == null)
                ? new ElementList(sorted.getElementsByTagName("TextRegion"))
                : filter.selectElements(sorted);
        for (int r = 0; r < regions.size(); ++r) {
            Element region = regions.get(r);
            readPageTextRegion(region);
        }
    }
private void readPageFile ( File file , boolean isSorted ) throws IOException , WarningException { Document doc = loadXMLFile ( file ) ; Document sorted = ( ( SortPageXML . isSorted ( doc ) ) || ( isSorted ) ) ? doc : SortPageXML . sorted ( doc ) ; List < Element > regions = ( filter == null ) ? new ElementList ( sorted . getElementsByTagName ( "TextRegion" ) ) : filter . selectElements ( sorted ) ; for ( int r = 0 ; r < regions . size ( ) ; ++ r ) { Element region = regions . get ( r ) ; readPageTextRegion ( region ) ; } }
Reads textual content in PAGE XML document.
Reads textual content in PAGE XML document .