SkySpark by SkyFoundry

abstract const class haystack::GridFormat

sys::Obj
  haystack::GridFormat

@Js

GridFormat models a file format used to encode/decode grids. Subclasses of this class are used to register a new grid file format and map it to the appropiate reader and/or writer class. GridFormats are registered with indexed props as follows:

// build.fan script
index =
[
  "haystack.gridFormat": ["acmeCustomExt::CustomFormat", "acmeCustomExt::CustomFormat2", ]
]
dis

abstract Str dis()

Return display name for the format

fileExt

abstract Str fileExt()

File extension name which should be used for encoding this format

fromMime

const static GridFormat? fromMime(MimeType mime, Bool checked := true)

Find the format registerd for the given MIME type. If the MIME type is not supported return null or raise an exception.

list

const static GridFormat[] list()

List the formats installed

mimeType

abstract MimeType mimeType()

MIME type for the format

reader

virtual Type? reader()

Return GridReader type used to write this format

writer

virtual Type? writer()

Return GridWriter type used to write this format