Class TikaIndexerUtil
java.lang.Object
fr.paris.lutece.plugins.search.solr.util.TikaIndexerUtil
Util class for use of tika methods.
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddFileContentToSolrItem(SolrItem item, byte[] fileContent) Parse and add the content of a file to the solr item.static voidaddFileContentToSolrItem(SolrItem item, List<byte[]> fileContentList) Parse and add the content of multiples files to the solr item.static ContentHandlerparse(InputStream stream) Identify the type of content and parse the streamstatic ContentHandlerparse(InputStream stream, org.apache.tika.metadata.Metadata metadata, org.apache.tika.parser.ParseContext parseContext) Identify the type of content and parse the streamstatic ContentHandlerParse the xml contentstatic ContentHandlerparseHtml(String strContentToIndex, org.apache.tika.metadata.Metadata metadata, org.apache.tika.parser.ParseContext parseContext) Parse the xml content
-
Method Details
-
parseHtml
public static ContentHandler parseHtml(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 ContentHandler parse(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
Identify the type of content and parse the stream- Parameters:
stream-- Returns:
- the content handler containing the parsed content
- Throws:
LuteceSolrException
-
parseHtml
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, 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
-