Class TikaAutoDetectParser
java.lang.Object
fr.paris.lutece.plugins.parser.service.TikaAutoDetectParser
- All Implemented Interfaces:
fr.paris.lutece.portal.service.parser.Parser
@ApplicationScoped
@Named("parser.tikaParser")
public class TikaAutoDetectParser
extends Object
implements fr.paris.lutece.portal.service.parser.Parser
Universal parser using Tika's AutoDetectParser.
This parser automatically detects the document format and applies the
appropriate parsing strategy.
Supports PDF, MS Office (legacy and OOXML), OpenDocument, HTML, archives, and
many other formats.
This implementation simplifies the architecture by replacing multiple
specialized parsers
with a single, intelligent parser that handles all supported formats.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionparse(InputStream is) Parse the input stream content using Tika's AutoDetectParser.
-
Constructor Details
-
TikaAutoDetectParser
public TikaAutoDetectParser()Constructor - initializes the AutoDetectParser
-
-
Method Details
-
parseToString
public String parseToString(InputStream is) throws fr.paris.lutece.portal.service.parser.ParserException Parse the input stream content using Tika's AutoDetectParser. The parser automatically detects the document format based on: - Magic bytes (file signature) - File extension - MIME type- Specified by:
parseToStringin interfacefr.paris.lutece.portal.service.parser.Parser- Throws:
fr.paris.lutece.portal.service.parser.ParserException
-
parse
- Specified by:
parsein interfacefr.paris.lutece.portal.service.parser.Parser- Throws:
fr.paris.lutece.portal.service.parser.ParserException
-