Enum Class FormatOption

java.lang.Object
java.lang.Enum<FormatOption>
org.verapdf.processor.FormatOption
All Implemented Interfaces:
Serializable, Comparable<FormatOption>, java.lang.constant.Constable

public enum FormatOption extends Enum<FormatOption>
Author:
Carl Wilson
  • Enum Constant Details

    • RAW

      public static final FormatOption RAW
      Output in XML format
    • MRR

      public static final FormatOption MRR
      Output in MachineReadableReport XML format
    • XML

      public static final FormatOption XML
    • TEXT

      public static final FormatOption TEXT
      Output in brief format
    • HTML

      public static final FormatOption HTML
      Output in HTML format
    • JSON

      public static final FormatOption JSON
      Output in JSON format
  • Method Details

    • values

      public static FormatOption[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static FormatOption valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getOption

      public String getOption()
      Returns:
      the option string for the FormatType instance.
    • toString

      public String toString()
      Overrides:
      toString in class Enum<FormatOption>
    • fromOption

      public static FormatOption fromOption(String option)
      Performs a match against the parameter String option of each FormatType's option and returns a matching instance. Defaults to returning RAW if no match can be made.
      Parameters:
      option - the string CLI option to compare
      Returns:
      a matching FormatType instance or XML if no match can be made.