public void getNext(CAS aCAS) throws IOException, CollectionException {
    JCas jcas;
    try {
      jcas = aCAS.getJCas();
    } catch (CASException e) {
      throw new CollectionException(e);
    }

    String doc;
    
    // Removes everything in the order we added
    doc = docsArray.remove(0);
    jcas.setDocumentText(doc); //put Document in CAS
    
    // set language if it was explicitly specified as a configuration parameter
    if (mLanguage != null) {
      ((DocumentAnnotation) jcas.getDocumentAnnotationFs()).setLanguage(mLanguage);
    }
    
    String[] docArray = doc.split("\\s+");
    String headDoc = docArray[0];
    String tailDoc = "";
    if(docArray.length >= 2)
    {
      tailDoc = docArray[1];
      for(int i = 2; i < docArray.length; i++)
      {
        tailDoc = tailDoc + " " + docArray[i];
      }
    }

    IndividualSentenceIdentifier isi = new IndividualSentenceIdentifier(jcas);
    isi.setSentenceID(headDoc);
    isi.setSentenceString(tailDoc);
    
    mCurrentIndex++;
    
  }