- public ParsedLedgerAccount nextAccount() throws IOException {
- return iter.hasNext() ? iter.next() : null;
+ public abstract API getApiVersion();
+ public LedgerAccount nextAccount(RetrieveTransactionsTask task,
+ HashMap<String, LedgerAccount> map) {
+ if (!iterator.hasNext())
+ return null;
+
+ LedgerAccount next = iterator.next()
+ .toLedgerAccount(task, map);
+
+ if (next.getName()
+ .equalsIgnoreCase("root"))
+ return nextAccount(task, map);
+
+ debug("accounts", String.format("Got account '%s' [%s]", next.getName(),
+ getApiVersion().getDescription()));
+ return next;