Class TikaIndexerUtil


  • public final class TikaIndexerUtil
    extends java.lang.Object
    Util class for use of tika methods.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void addFileContentToSolrItem​(SolrItem item, byte[] fileContent)
      Parse and add the content of a file to the solr item.
      static void addFileContentToSolrItem​(SolrItem item, java.util.List<byte[]> fileContentList)
      Parse and add the content of multiples files to the solr item.
      static org.xml.sax.ContentHandler parse​(java.io.InputStream stream)
      Identify the type of content and parse the stream
      static org.xml.sax.ContentHandler parse​(java.io.InputStream stream, org.apache.tika.metadata.Metadata metadata, org.apache.tika.parser.ParseContext parseContext)
      Identify the type of content and parse the stream
      static org.xml.sax.ContentHandler parseHtml​(java.lang.String strContentToIndex)
      Parse the xml content
      static org.xml.sax.ContentHandler parseHtml​(java.lang.String strContentToIndex, org.apache.tika.metadata.Metadata metadata, org.apache.tika.parser.ParseContext parseContext)
      Parse the xml content
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • parseHtml

        public static org.xml.sax.ContentHandler parseHtml​(java.lang.String strContentToIndex,
                                                           org.apache.tika.metadata.Metadata metadata,
                                                           org.apache.tika.parser.ParseContext parseContext)
                                                    throws LuteceSolrException
        Parse the xml content
        Parameters:
        strContentToIndex -
        metadata -
        parseContext -
        Returns:
        the content handler containing the parsed content
        Throws:
        LuteceSolrException
      • parse

        public static org.xml.sax.ContentHandler parse​(java.io.InputStream stream,
                                                       org.apache.tika.metadata.Metadata metadata,
                                                       org.apache.tika.parser.ParseContext parseContext)
                                                throws LuteceSolrException
        Identify the type of content and parse the stream
        Parameters:
        stream -
        Returns:
        the content handler containing the parsed content
        Throws:
        LuteceSolrException
      • parse

        public static org.xml.sax.ContentHandler parse​(java.io.InputStream stream)
                                                throws LuteceSolrException
        Identify the type of content and parse the stream
        Parameters:
        stream -
        Returns:
        the content handler containing the parsed content
        Throws:
        LuteceSolrException
      • parseHtml

        public static org.xml.sax.ContentHandler parseHtml​(java.lang.String strContentToIndex)
                                                    throws LuteceSolrException
        Parse the xml content
        Parameters:
        strContentToIndex -
        Returns:
        the content handler containing the parsed content
        Throws:
        LuteceSolrException
      • addFileContentToSolrItem

        public static void addFileContentToSolrItem​(SolrItem item,
                                                    byte[] fileContent)
                                             throws LuteceSolrException
        Parse and add the content of a file to the solr item.
        Parameters:
        item -
        fileContent - the content of the file
        Throws:
        LuteceSolrException
      • addFileContentToSolrItem

        public static void addFileContentToSolrItem​(SolrItem item,
                                                    java.util.List<byte[]> fileContentList)
                                             throws LuteceSolrException
        Parse and add the content of multiples files to the solr item.
        Parameters:
        item -
        fileContentList - the content of the files
        Throws:
        LuteceSolrException