public class IdfileReaderFactory
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
IdfileReader |
getFileReader(java.io.File aFile,
WaitingHandler waitingHandler)
This method returns the proper identification file reader depending on
the format of the provided file.
|
static IdfileReaderFactory |
getInstance()
A static method to retrieve the instance of the factory.
|
int |
getSearchEngine(java.io.File aFile)
This method return the search engine corresponding to the given file.
|
static java.lang.Class |
registerIdFileReader(java.lang.Class aReader,
java.lang.String aExtension)
This method registers a new IdfileReader Class, and the file extension it
can read from.
|
public static IdfileReaderFactory getInstance()
public static java.lang.Class registerIdFileReader(java.lang.Class aReader,
java.lang.String aExtension)
aReader - Class of the IdfileReader to register.aExtension - String with the extension of the file that this
IdfileReader implementation can read.public IdfileReader getFileReader(java.io.File aFile, WaitingHandler waitingHandler) throws org.xml.sax.SAXException, java.io.FileNotFoundException, java.io.IOException, java.lang.OutOfMemoryError
aFile - the file to parsewaitingHandler - a waiting handler to display the results. Can be
nullorg.xml.sax.SAXExceptionjava.io.FileNotFoundExceptionjava.io.IOExceptionjava.lang.OutOfMemoryError - thrown if the parser runs out of memorypublic int getSearchEngine(java.io.File aFile)
aFile - an identification fileCopyright © 2014. All Rights Reserved.