tml.storage.importers
Class AbstractImporter
java.lang.Object
tml.storage.importers.AbstractImporter
- Direct Known Subclasses:
- HtmlImporter, TextImporter
public abstract class AbstractImporter
- extends java.lang.Object
Abstract class for all importers to extend from. It implements the logger
a list of file extensions and a static factory to obtain the right
importer for a given extension
- Author:
- Jorge Villalon
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractImporter
public AbstractImporter()
- Creates a new instance of an
AbstractImporter
. As this class
is an abstract class, this can be called only by the constructor
of a sub-class
isValidFileExtension
public boolean isValidFileExtension(java.lang.String fileExtension)
- Parameters:
fileExtension
- the extension of a filename (e.g. txt, pdf, doc)
- Returns:
- true if the importer can manage the extension
createImporter
public static Importer createImporter(java.lang.String fileExtension)
- Parameters:
fileExtension
- the file extension to validate
- Returns:
- an importer to manage files of the given extension