com.arsdigita.search.converter
Class BaseConverter

java.lang.Object
  extended bycom.arsdigita.search.converter.BaseConverter
All Implemented Interfaces:
Converter
Direct Known Subclasses:
ExcelConverter, OOConverter, PDFConverter, TextConverter, WordConverter

public abstract class BaseConverter
extends Object
implements Converter

This class provides the mechanism to perform a conversion from Excel to standard text


Constructor Summary
BaseConverter()
           
 
Method Summary
 String convertDocument(byte[] document)
          This takes in a document represented as a byte[] and returns a text representation of that document.
 String convertDocument(File document)
          This takes the document and returns a String containing the contents of the document.
protected abstract  String[] getFileExtensions()
          Returns a string array representing all of the files types used by the given converter
 MimeType[] getMimeTypes()
          This returns an array of all MimeTypes that this converter is able to convert to a String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.arsdigita.search.converter.Converter
convertDocument
 

Constructor Detail

BaseConverter

public BaseConverter()
Method Detail

convertDocument

public String convertDocument(byte[] document)
This takes in a document represented as a byte[] and returns a text representation of that document.

Specified by:
convertDocument in interface Converter

convertDocument

public String convertDocument(File document)
                       throws FileNotFoundException
This takes the document and returns a String containing the contents of the document.

Specified by:
convertDocument in interface Converter
Throws:
FileNotFoundException

getFileExtensions

protected abstract String[] getFileExtensions()
Returns a string array representing all of the files types used by the given converter


getMimeTypes

public MimeType[] getMimeTypes()
This returns an array of all MimeTypes that this converter is able to convert to a String.

Specified by:
getMimeTypes in interface Converter


Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 21 2004:2337 UTC