Search in sources :

Example 1 with Filter

use of org.geometerplus.fbreader.book.Filter in project FBReaderJ by geometer.

the class SyncTree method waitForOpening.

@Override
public void waitForOpening() {
    clear();
    final ZLResource baseResource = resource().getResource(ROOT_SYNC);
    Filter others = new Filter.HasPhysicalFile();
    for (String label : myLabels) {
        final Filter filter = new Filter.ByLabel(label);
        if (Collection.hasBooks(filter)) {
            new SyncLabelTree(this, label, filter, baseResource.getResource(label));
        }
        others = new Filter.And(others, new Filter.Not(filter));
    }
    if (Collection.hasBooks(others)) {
        new SyncLabelTree(this, Book.SYNC_TOSYNC_LABEL, others, baseResource.getResource(Book.SYNC_TOSYNC_LABEL));
    }
}
Also used : Filter(org.geometerplus.fbreader.book.Filter) ZLResource(org.geometerplus.zlibrary.core.resources.ZLResource)

Aggregations

Filter (org.geometerplus.fbreader.book.Filter)1 ZLResource (org.geometerplus.zlibrary.core.resources.ZLResource)1