namhnguyen / asterixdb

Automatically exported from code.google.com/p/asterixdb
0 stars 0 forks source link

Refactor Printer code #834

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
IDataFormat has three methods now:

public IPrinterFactoryProvider getPrinterFactoryProvider();
public IPrinterFactoryProvider getJSONPrinterFactoryProvider();
public IPrinterFactoryProvider getCSVPrinterFactoryProvider();

There is also already an enum in APIFramework:

    public enum OutputFormat {
        ADM,
        HTML,
        JSON,
        CSV
    }

(HTML is a bastard case for the web UI.)

We should consolidate on a single getPrinterFactoryProvider(OutputFormat) 
method.

Original issue reported on code.google.com by c...@lambda.nu on 5 Dec 2014 at 12:22

GoogleCodeExporter commented 9 years ago
Additionally (this is a bigger task), there is a great deal of code sharing 
between the various printer implementation (CSV, ADM, and JSON). In particular, 
numerics are handled virtually identically in all cases. The overall Printer 
implementation is ripe for refactoring and cleanup.

Original comment by c...@lambda.nu on 5 Dec 2014 at 12:34