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));
}
}
Aggregations