示例#1
0
  @Test
  public void testMetaData() {
    for (int i = 0; i < bmds.length; i++) {
      BookMetaData bmd = bmds[i];

      Assert.assertTrue(bmd.getInitials() != null);
      Assert.assertTrue(bmd.getInitials().length() > 0);
      Assert.assertTrue(bmd.getName() != null);
      Assert.assertTrue(bmd.getName().length() > 0);
    }
  }
示例#2
0
  /** Read all the books that we can get our hands on. */
  public static void main(String[] args) throws IOException {
    out = new PrintWriter(new BufferedWriter(new FileWriter("passages.log")));
    // Loop through all the Books
    log.warn("*** Reading all known Books");
    BookFilter filter =
        BookFilters.getCustom("GlobalOptionFilter=ThMLScripref;Category=Biblical Texts");
    List<Book> comments = Books.installed().getBooks(filter);
    for (Book book : comments) {

      if (!book.isLocked()) {
        BookMetaData bmd = book.getBookMetaData();
        // Skip PlainText as they do not have references marked up
        if (bmd.getProperty("SourceType") != null) {
          Key set = book.getGlobalKeyList();

          readBook(book, set);
        }
      }
    }
    out.flush();
    out.close();
  }