use of eu.transkribus.core.model.beans.TrpDocMetadata in project TranskribusCore by Transkribus.
the class FakeDocProvider method create.
public static TrpDoc create(boolean useLocalFiles) {
final int docid = 1;
// initialize pageNum here so it can be set in docMd
nrOfPages = useLocalFiles ? localFileUrls.size() : fileKeys.size();
// set up a TrpDoc
TrpDoc doc = new TrpDoc();
TrpDocMetadata md = createDocMd(docid);
doc.setMd(md);
// set up the pages
// List<TrpPage> pages = new ArrayList<>(nrOfPages);
TrpPage page;
for (int i = 0; i < nrOfPages; i++) {
page = createPage(docid, i, useLocalFiles);
doc.addPage(page);
// pages.add(page);
}
return doc;
}
Aggregations