public void initialize() throws ResourceInitializationException {
    File collectionFile = new File(((String) getConfigParameterValue(PARAM_INPUT)).trim());
    mLanguage  = (String) getConfigParameterValue(PARAM_LANGUAGE);
    mCurrentIndex = 0;
    mNumberOfLines = 0;
    
    docsArray = new ArrayList<String>();

    // if input file does not exist, throw exception
    if (!collectionFile.exists()) {
        throw new ResourceInitializationException(ResourceConfigurationException.MANDATORY_VALUE_MISSING,
              new Object[] { PARAM_INPUT, this.getMetaData().getName()});
    }
    
    FileReader fReader;
    try {
      fReader = new FileReader(collectionFile);
      BufferedReader bReader = new BufferedReader(fReader);
      String doc;
      while((doc = bReader.readLine()) != null) { 
        docsArray.add(doc);
        mNumberOfLines++;
      }
      fReader.close();
    } catch (FileNotFoundException e) {
      e.printStackTrace();
    } catch (IOException e) {
      e.printStackTrace();
    }
    
    
  }