code: @Override
      protected void _to(ObjectOutput out) throws IOException {
          final int stmts = statements.size();
          // 1: write number of stmts
          out.writeInt(stmts);
          Integer[] stmtdocs = index(Integer.class, statementDocumentMap);
          Statement[] stmtidxs = index(Statement.class, indexedStatements);
          for (int i = 0; i < stmts; i++) {
              TableStatement ts = statements.get(i);
              // 1: write each table statement
              ts.writeExternal(out);
              // 2: write the relevant document index
              out.writeInt(stmtdocs[i]);
              // 3: write statement
              writeStatement(out, stmtidxs[i]);
          }
      }
docs: {@inheritDoc}