Interface ObjectRecogniser

    • Method Detail

      • getSupportedMimes

        Set<org.apache.tika.mime.MediaType> getSupportedMimes()
        The mimes supported by this recogniser
        Returns:
        set of mediatypes
      • isAvailable

        boolean isAvailable()
        Is this service available
        Returns:
        true when the service is available, false otherwise
      • initialize

        void initialize​(Map<String,​org.apache.tika.config.Param> params)
                 throws org.apache.tika.exception.TikaConfigException
        This is the hook for configuring the recogniser
        Specified by:
        initialize in interface org.apache.tika.config.Initializable
        Parameters:
        params - configuration instance in the form of context
        Throws:
        org.apache.tika.exception.TikaConfigException - when there is an issue with configuration
      • recognise

        List<? extends RecognisedObject> recognise​(InputStream stream,
                                                   ContentHandler handler,
                                                   org.apache.tika.metadata.Metadata metadata,
                                                   org.apache.tika.parser.ParseContext context)
                                            throws IOException,
                                                   SAXException,
                                                   org.apache.tika.exception.TikaException
        Recognise the objects in the stream
        Parameters:
        stream - content stream
        handler - tika's content handler
        metadata - metadata instance
        context - parser context
        Returns:
        List of RecognisedObjects
        Throws:
        IOException - when an I/O error occurs
        SAXException - when an issue with XML occurs
        org.apache.tika.exception.TikaException - any generic error