public String getSelectedText ( ParsedPage pp ) { if ( pp == null ) return null ; StringBuilder sb = new StringBuilder ( ) ; levelModifier = pp . getSection ( 0 ) . getLevel ( ) - 1 ; if ( pageHandling == null ) { if ( firstParagraphHandling != null ) { handleContent ( pp . getFirstParagraph ( ) , firstParagraphHandling , sb ) ; deleteParagraph ( pp . getFirstParagraphNr ( ) , pp . getSections ( ) ) ; } for ( Section s : pp . getSections ( ) ) handleSection ( s , sb ) ; } else { if ( pageHandling . get ( CIT . TEXT ) ) { sb . append ( pp . getText ( ) ) ; } else { if ( pageHandling . get ( CIT . BOLD ) ) { handleSpans ( pp . getFormatSpans ( FormatType . BOLD ) , pp . getText ( ) , sb ) ; } if ( pageHandling . get ( CIT . ITALIC ) ) { handleSpans ( pp . getFormatSpans ( FormatType . ITALIC ) , pp . getText ( ) , sb ) ; } } if ( pageHandling . get ( CIT . LINK ) ) handleLinks ( pp . getLinks ( ) , ! pageHandling . get ( CIT . TEXT ) , sb ) ; } return sb . toString ( ) . trim ( ) ; }
Returns the Information of a ParsedPage which are selected by the actual configuration