public boolean test(Book book) { return book.hasFeature(feature) && !book.isLocked(); }
@Override public boolean test(Book book) { return book.getBookCategory().equals(bookCategory) && !book.isLocked(); } });
public boolean test(Book book) { return book.getBookCategory().equals(category) && !book.isLocked(); }
public boolean test(Book book) { return !book.getBookCategory().equals(category) && !book.isLocked(); }
/** * Read all the books that we can get our hands on. * * @param args * @throws IOException */ 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(); }
public boolean test(Book book) { BookCategory bookCategory = book.getBookCategory(); if (book.isLocked()) { return false; } else { return bookCategory.equals(BookCategory.BIBLE) || bookCategory.equals(BookCategory.COMMENTARY) || bookCategory.equals(BookCategory.DICTIONARY) || bookCategory.equals(BookCategory.GENERAL_BOOK) || bookCategory.equals(BookCategory.MAPS); } } }
/** * Read all the books that we can get our hands on. * @param args */ public static void main(String[] args) { // TODO(DMS): add the ability to pass a filter specification // Loop through all the Books log.warn("*** Reading all installed Bibles"); BookFilter filter = null; //filter = BookFilters.getCustom("SourceType=ThML"); //filter = BookFilters.getCustom("Description=Ergane Turkish to English Glossary"); //filter = BookFilters.getCustom("ModDrv=zLD"); //filter = BookFilters.getCustom("Initials=BosworthToller"); //filter = BookFilters.getDictionaries(); List<Book> books = getBooks(filter); for (Book book : books) { if (book.isLocked()) { log.warn("****** Skipping: [{}] {} ({})", book.getInitials(), book.getName(), book.getBookCategory()); continue; } log.warn("****** Reading: [{}] {} ({})", book.getInitials(), book.getName(), book.getBookCategory()); Key set = book.getGlobalKeyList(); testReadMultiple(book, set); } }