com.arsdigita.search.converter
Class ConverterRegistry

java.lang.Object
  extended bycom.arsdigita.search.converter.ConverterRegistry

public class ConverterRegistry
extends Object

This is a location for Converters to register with mime types. This can then be used at run time to take a file and get a String representation of the contents of that document.


Constructor Summary
ConverterRegistry()
           
 
Method Summary
static Converter getConverter(MimeType mimeType)
          This will return the appropriate converter, if one has been registered.
static void registerConverter(Converter converter, MimeType[] mimeTypes)
          Initializers should register their converters here.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConverterRegistry

public ConverterRegistry()
Method Detail

registerConverter

public static void registerConverter(Converter converter,
                                     MimeType[] mimeTypes)
Initializers should register their converters here. If two converters with the same MimeType are registered then the second converter will be returned with the call to getConverter. You can clear a converter for a mime type by passing in a null converter with with non-null mimetype array.


getConverter

public static Converter getConverter(MimeType mimeType)
This will return the appropriate converter, if one has been registered. If there is no registered converter then this will return null.



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