Class DefaultDocumentIndexerParser
java.lang.Object
fr.paris.lutece.plugins.document.service.search.DefaultDocumentIndexerParser
- All Implemented Interfaces:
fr.paris.lutece.portal.service.parser.Parser
@ApplicationScoped
@Alternative
@Named("parser.defaultParser")
public class DefaultDocumentIndexerParser
extends Object
implements fr.paris.lutece.portal.service.parser.Parser
HTML Parser
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionparse(InputStream is) Parse the input stream and return a Reader containing the extracted text.Parse the input stream content using Jsoup to extract text from HTML.
-
Constructor Details
-
DefaultDocumentIndexerParser
public DefaultDocumentIndexerParser()
-
-
Method Details
-
parseToString
public String parseToString(InputStream is) throws fr.paris.lutece.portal.service.parser.ParserException Parse the input stream content using Jsoup to extract text from HTML. This method reads the HTML content and extracts only the text, removing all HTML tags and scripts.- Specified by:
parseToStringin interfacefr.paris.lutece.portal.service.parser.Parser- Throws:
fr.paris.lutece.portal.service.parser.ParserException
-
parse
Parse the input stream and return a Reader containing the extracted text. This method uses parseToString internally and wraps the result in a StringReader.- Specified by:
parsein interfacefr.paris.lutece.portal.service.parser.Parser- Throws:
fr.paris.lutece.portal.service.parser.ParserException
-