/** ensure a book is indexed and the index contains typical Greek or Hebrew Strongs Numbers */
 private boolean checkStrongs(Book bible) {
   try {
     return bible.getIndexStatus().equals(IndexStatus.DONE)
         && (bible.find("+[Gen 1:1] strong:h7225").getCardinality() > 0
             || bible.find("+[John 1:1] strong:g746").getCardinality() > 0
             || bible.find("+[Gen 1:1] strong:g746").getCardinality() > 0);
   } catch (BookException be) {
     System.out.println("Error checking strongs numbers: " + be.getMessage());
     return false;
   }
 }
示例#2
0
 private void doFindTest(Book book, String test, int expected) throws BookException {
   Key key = book.find(test);
   System.out.println(test + " found " + key.getCardinality() + " occurences: " + key.getName());
   assertEquals(test + " find count wrong", expected, key.getCardinality());
 }