degu.degudocumentbuilder.ejb
Class DeguDocumentBuilderAllTypes

java.lang.Object
  extended by degu.degudocumentbuilder.ejb.DeguDocumentBuilderAllTypes

public class DeguDocumentBuilderAllTypes
extends java.lang.Object

Builds a the Degu intermediate representation, i.e. converts any supported file into an XML Document


Field Summary
private  boolean initializeDone
           
private  java.util.Vector<MimeTypeDetector> mimeTypeDetectors
           
private  java.util.Hashtable<MimeTypeT,java.util.Vector<TextStripper>> textStrippers
           
 
Constructor Summary
DeguDocumentBuilderAllTypes()
           
DeguDocumentBuilderAllTypes(java.util.Vector<MimeTypeDetector> mimeTypeDetectors, java.util.Hashtable<MimeTypeT,java.util.Vector<TextStripper>> textStrippers)
          ctor
 
Method Summary
 DeguDocument buildDeguDocument(RawDocument rawDocument)
          Build the degu document
 void initialize()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

initializeDone

private boolean initializeDone

mimeTypeDetectors

private java.util.Vector<MimeTypeDetector> mimeTypeDetectors

textStrippers

private java.util.Hashtable<MimeTypeT,java.util.Vector<TextStripper>> textStrippers
Constructor Detail

DeguDocumentBuilderAllTypes

public DeguDocumentBuilderAllTypes()

DeguDocumentBuilderAllTypes

public DeguDocumentBuilderAllTypes(java.util.Vector<MimeTypeDetector> mimeTypeDetectors,
                                   java.util.Hashtable<MimeTypeT,java.util.Vector<TextStripper>> textStrippers)
ctor

Parameters:
mimeTypeDetectors - a set of MimeTypeDetectors to detect the mime type
textStrippers - TextStrippers for each MimeType, for example there could be 2 TextStrippers for pdf: one for common pdfs and one for pdfs which contain only pictures, i.e. the TextStripper should do some OCR stuff
Method Detail

initialize

public void initialize()
                throws MimeTypeDetectorInitializeException,
                       TextStripperInitializeException
Throws:
MimeTypeDetectorInitializeException
TextStripperInitializeException

buildDeguDocument

public DeguDocument buildDeguDocument(RawDocument rawDocument)
                               throws FailedToDetectMimeTypeException,
                                      NotSupportedMimeTypeException,
                                      FailedToStripText,
                                      DocumentEncryptedException,
                                      java.io.IOException
Build the degu document

Parameters:
file -
Returns:
Throws:
FailedToDetectMimeTypeException
NotSupportedMimeTypeException
FailedToStripText
DocumentEncryptedException
java.io.IOException