package net.nullschool.grib2json;

import com.lexicalscope.jewel.cli.*;

import java.io.File;


/**
 * 2013-10-25<p/>
 *
 * Command line options for the grib2json utility. This interface is proxied by the Jewel Cli options parsing library.
 *
 * @author Cameron Beccario
 */
@CommandLineInterface(application="grib2json")
public interface Options {

    @Option(longName="help", shortName={"h", "?"}, description="display help")
    boolean getShowHelp();

    @Option(longName="names", shortName="n", description="print names of the numeric codes")
    boolean getPrintNames();

    @Option(longName="data", shortName="d", description="print record data")
    boolean getPrintData();

    @Option(longName="compact", shortName="c", description="enable compact formatting")
    boolean isCompactFormat();

    @Option(longName="verbose", shortName="v", description="enable logging")
    boolean getEnableLogging();

    @Option(longName="output", shortName="o", description="print to specified file", defaultToNull=true)
    File getOutput();

    @Unparsed(name="FILE", defaultToNull=true)
    File getFile();

    // ============================
    // options to perform filtering

    @Option(
        longName={"filter.category", "fc"},
        description="select records with this numeric category",
        defaultToNull=true)
    Integer getFilterCategory();

    @Option(
        longName={"filter.parameter", "fp"},
        description="select records with this numeric parameter",
        defaultToNull=true)
    Integer getFilterParameter();

    @Option(
        longName={"filter.surface", "fs"},
        description="select records with this surface type",
        defaultToNull=true)
    Integer getFilterSurface();

    @Option(
        longName={"filter.value", "fv"},
        description="select records with this surface value",
        defaultToNull=true)
    Double getFilterValue();
}

@@ -386,19 +386,12 @@
 ame=
-%7B
 %22h%22,
- %22?%22%7D,
  des
@@ -408,16 +408,21 @@
 display 
+this 
 help%22)%0A 
@@ -521,20 +521,16 @@
 ames of 
-the 
 numeric 
@@ -630,16 +630,21 @@
 =%22print 
+GRIB 
 record d
@@ -753,16 +753,21 @@
 compact 
+Json 
 formatti
@@ -877,16 +877,26 @@
  logging
+ to stdout
 %22)%0A    b
@@ -927,32 +927,41 @@
 );%0A%0A    @Option(
+%0A        
 longName=%22output
@@ -962,16 +962,24 @@
 output%22,
+%0A       
  shortNa
@@ -985,16 +985,24 @@
 ame=%22o%22,
+%0A       
  descrip
@@ -1011,33 +1011,72 @@
 on=%22
-print to specified file%22,
+write output to the specified file (default is stdout)%22,%0A       
  def
@@ -1721,32 +1721,40 @@
 cords with this 
+numeric 
 surface type%22,%0A 
@@ -1913,16 +1913,24 @@
 th this 
+numeric 
 surface 

clarify option descriptions