Enum Class Format.Characteristics

java.lang.Object
java.lang.Enum<Format.Characteristics>
nz.org.riskscape.engine.output.Format.Characteristics
All Implemented Interfaces:
Serializable, Comparable<Format.Characteristics>, Constable
Enclosing interface:
Format

public static enum Format.Characteristics extends Enum<Format.Characteristics>

Format characteristics are here to guide the various bits of code that use them to be able to use them generically without prior knowledge of them specifically. For example, we might want to only allow the use of STREAMABLE formats with a specific output backend. Or restrict the use of MULTIPLE_FILES formats to the file protocol only.

  • Enum Constant Details

    • STREAMABLE

      public static final Format.Characteristics STREAMABLE

      This format can read/write tuples from a stream of bytes without needing all the contents at once

    • MULTIPLE_FILES

      public static final Format.Characteristics MULTIPLE_FILES

      This format ends up storing multiple files, rather than a single one. These are a mess and we might want to impose some conventions on these, e.g. they end up in a zip file, or a folder

    • PROTOCOL_BASED

      public static final Format.Characteristics PROTOCOL_BASED

      This format doesn't read/write bytes to some sort of file (or files), e.g. it uses some sort of protocol (e.g. an SQL connection) to read and write tuples. Formats that end up writing bytes to a file shouldn't use this. TODO maybe this doesn't exist for Format? Maybe that's something else?

    • NON_SPATIAL

      public static final Format.Characteristics NON_SPATIAL

      This format doesn't require geometry to be present and might not record spatial data efficiently (or accurately)

  • Method Details

    • values

      public static Format.Characteristics[] 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 Format.Characteristics 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