Class TikaIndexerUtil
- java.lang.Object
-
- fr.paris.lutece.plugins.search.solr.util.TikaIndexerUtil
-
public final class TikaIndexerUtil extends Object
Util class for use of tika methods.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static 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 ContentHandlerparseHtml(String strContentToIndex)Parse the xml contentstatic ContentHandlerparseHtml(String strContentToIndex, org.apache.tika.metadata.Metadata metadata, org.apache.tika.parser.ParseContext parseContext)Parse the xml content
-
-
-
Method Detail
-
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
public static ContentHandler parse(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 ContentHandler parseHtml(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, 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
-
-