com.jalios.jcms.fileprocessor
Interface FileParser

All Superinterfaces:
FileActionComponent
All Known Implementing Classes:
SampleProcessor

public interface FileParser
extends FileActionComponent

A class that implements this interface is a parser for at least one kind of files. It is supposed to extract (parse) the text from the supported files.

Version:
$Revision: 27882 $

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.jalios.jcms.fileprocessor.FileActionComponent
FileActionComponent.Operation
 
Field Summary
 
Fields inherited from interface com.jalios.jcms.fileprocessor.FileActionComponent
CURRENT_OPERATION, FILE_SEPARATOR, REVISION
 
Method Summary
 String extractText(File file, Map<String,Object> ctxt)
          Parsers have to implement at least this method which exctract the text from the specified file and returns it.
 
Methods inherited from interface com.jalios.jcms.fileprocessor.FileActionComponent
getDescription, getName, getOrder, isAvailable
 

Method Detail

extractText

String extractText(File file,
                   Map<String,Object> ctxt)
                   throws ProcessingException
Parsers have to implement at least this method which exctract the text from the specified file and returns it.

Parameters:
file - the file to parse
ctxt - a Map to share informations between processings.
Returns:
the text to index (can be empty) or null if no action was processed (do not return null in case of error, instead throw a ProcessingException).
Throws:
ProcessingException - if the text could not be extracted.


Copyright © 2001-2010 Jalios SA. All Rights Reserved.