Class OpenFinancialExchangeReader


public class OpenFinancialExchangeReader extends IntegrationReader
Read an OFX / QFX (Quicken) / QBO (QuickBooks) file as a single nested Record that mirrors the document's aggregate hierarchy, using the OFX tag names (BANKMSGSRSV1, STMTTRN, TRNAMT, ...) as field names.

Child aggregates become nested Records, repeating aggregates become ArrayValues, and elements that are absent or empty are left out entirely. Values keep the types ofx4j produces, so tax-form amounts and dates (which OFX models as free-form strings) stay strings.

Every repeating list ofx4j exposes becomes one ArrayValue. Where such a list is an aggregate's only content and its entries can be of different kinds (INVPOSLIST, SECLIST, MSGSETLIST), the field itself is that array and each entry is a one-field record naming the entry's own tag (POSSTOCK, STOCKINFO, BANKMSGSET, ...). INVTRANLIST also carries DTSTART and DTEND, so it stays a record and its mixed transactions sit in a TRANSACTIONS array - the one field name here that is not an OFX tag.

  • Constructor Details

    • OpenFinancialExchangeReader

      public OpenFinancialExchangeReader(File file)
      Read an OFX/QFX/QBO file.
      Parameters:
      file - the file to be read
    • OpenFinancialExchangeReader

      public OpenFinancialExchangeReader(InputStream inputStream)
      Read a stream of OFX/QFX/QBO data.
      Parameters:
      inputStream - the source stream
  • Method Details