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 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:
      parseToString in interface fr.paris.lutece.portal.service.parser.Parser
      Throws:
      fr.paris.lutece.portal.service.parser.ParserException
    • parse

      public Reader parse(InputStream is) throws fr.paris.lutece.portal.service.parser.ParserException
      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:
      parse in interface fr.paris.lutece.portal.service.parser.Parser
      Throws:
      fr.paris.lutece.portal.service.parser.ParserException