jInfer

cz.cuni.mff.ksi.jinfer.base.interfaces
Interface Processor<T>

Type Parameters:
T - Type of items returned in List by process(java.io.InputStream) method.
All Known Implementing Classes:
DTDProcessor, FDProcessor, PathsProcessor, WeightsProcessor, XMLProcessor, XMLProcessor, XPathProcessor, XSDProcessor

public interface Processor<T>

Interface of any class that can take an InputStream and produce List of elements T from it. The class must work as a singleton, subsequent calls to process(InputStream) will be on the same instance.


Method Summary
 String getExtension()
          Which extension can this processor process.
 FolderType getFolder()
          Which folder does this processor operate on.
 Class<?> getResultType()
          Get Class of the type this processor returns by process method within List.
 List<T> process(InputStream s)
          Returns the List of type defined for this processor which represents the input.
 boolean processUndefined()
          Whether this processor can process also different extensions than that specified in getExtension().
 

Method Detail

getFolder

FolderType getFolder()
Which folder does this processor operate on.

Returns:
Folder on which this processor operates.

getExtension

String getExtension()
Which extension can this processor process.

Returns:
File extension this processor can process.

processUndefined

boolean processUndefined()
Whether this processor can process also different extensions than that specified in getExtension().

Returns:
True if this processor can process files with extensions different from what getExtension() reports. False otherwise.

process

List<T> process(InputStream s)
                throws InterruptedException
Returns the List of type defined for this processor which represents the input.

Parameters:
s - Input of any arbitrary type.
Returns:
Rules contained within. Empty list if there are no rules or an error occurs.
Throws:
InterruptedException - When user interrupts the processing operation at any moment.

getResultType

Class<?> getResultType()
Get Class of the type this processor returns by process method within List.

Returns:
Class of the type this processor returns by process method within List.

jInfer

Generated on Fri Dec 9 00:01:25 CET 2011