com.compomics.util.experiment.io.identifications
Class IdfileReaderFactory

java.lang.Object
  extended by com.compomics.util.experiment.io.identifications.IdfileReaderFactory

public class IdfileReaderFactory
extends Object

This factory will provide the appropriate identification file reader for each type of file. Null when the format is not supported.

Author:
Marc Vaudel

Method Summary
 IdfileReader getFileReader(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(File aFile)
          This method return the search engine corresponding to the given file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static IdfileReaderFactory getInstance()
A static method to retrieve the instance of the factory.

Returns:
the factory instance

getFileReader

public IdfileReader getFileReader(File aFile,
                                  WaitingHandler waitingHandler)
                           throws SAXException,
                                  FileNotFoundException,
                                  IOException
This method returns the proper identification file reader depending on the format of the provided file. It is very important to close the file reader after creation. //@TODO: create parsers using waiting handlers and indexed files.

Parameters:
aFile - the file to parse
waitingHandler - a waiting handler to display the results. Can be null
Returns:
an adapted file reader
Throws:
SAXException
FileNotFoundException
IOException

getSearchEngine

public int getSearchEngine(File aFile)
This method return the search engine corresponding to the given file.

Parameters:
aFile - an identification file
Returns:
the index of the search engine


Copyright © 2012. All Rights Reserved.