ca.sqlpower.architect.profile.output
Interface ProfileFormat

All Known Implementing Classes:
ProfileCSVFormat, ProfileHTMLFormat, ProfilePDFFormat

public interface ProfileFormat

The general contract of a class that can format a profile results. Implementations may format the profile results in HTML, XML, PDF, CSV, etc.

Author:
ian

Method Summary
 void format(java.io.OutputStream out, java.util.List<ProfileResult> profile)
          Formats a set of profile results to an open OutputStream.
 

Method Detail

format

void format(java.io.OutputStream out,
            java.util.List<ProfileResult> profile)
            throws java.lang.Exception
Formats a set of profile results to an open OutputStream. The "out" parameter is an OutputStream not a Writer since some of the formats (e.g., PDF) are binary formats. An outline of one possible algorithm is:
 // Generate headers ...
 for (ProfileResult res : profile) {
      for (ProfileColumn pc : ProfileColumn.values()) {
          switch (pc) {
              // format each column here
          }
      }
 }
 

Parameters:
out - The file to write to.
profile - The list of SQL Tables
pm - The ProfileManager which generated this Profile
Throws:
java.lang.Exception


Copyright © 2003-2007 SQL Power Group Inc. www.sqlpower.ca