static void getNext(JCas jcas, ResultSet res_, boolean expandAbbrevs_) throws CollectionException { try { int pmid = res_.getInt(1); String title = res_.getString(2); String abstrct = res_.getString(3); if (abstrct == null) abstrct = ""; Header h = new Header(jcas); h.setDocId(pmid + ""); h.setTitle(title); h.addToIndexes(); if (expandAbbrevs_) { abstrct = AbbreviationExpander.expand(abstrct); } jcas.setDocumentText(abstrct); } catch (SQLException e) { throw new CollectionException(e); } }