Skip to content

Task Types

Joel Håkansson edited this page Nov 3, 2017 · 3 revisions

The following types are supported today:

  • Identify ?>
  • Verify !>
  • Convert ->
  • Enhance +>

These additional types could be supported in the future:

  • Fix ~>
  • Tap ^>

Identify

Assumption 1

The file extension is sufficient to identify a file type.

Caveats: Even under this assumption, there is still one case that needs solving. Many xml-formats have the same extension (xml), but it would be useful if one could provide an implementation for a specific xml-format in a separate bundle.

Assumption 2

The item to identify is always a single file.

Caveats: The item may be a fileset, with or without a known manifest or master file. The item might be a URL.

Verify

...

Convert

Properties of the convert type:

  • Inclusion of a converter in a path is determined by its usefulness in reaching the target format
  • Converters are included in the order required by input and target format
  • Converters can assume that the input is correctly identified and validated
  • Converters should return a valid result of the specified format

Enhance

Properties of the enhance type:

  • Inclusion of an enhancer in a path is always optional
  • An enhancer is qualified for inclusion by input format and specific keys and/or key-value combinations supplied by the user
  • Enhancements are included in an arbitrary order
  • Enhancements cannot be required by other parts
  • Enhancements cannot make any assumptions about the state of the input except for its identity and validity
  • An enhancer should be designed so that chaining the part any number of times directly after each other yields the same result as including the part only once.

Fix

...

Tap

Tap is a read-only task which produces a side effect, such as copying the intermediary result or uploading files to a server.

Properties of the tap type:

  • Inclusion of a tap in a path is always optional
  • A tap is qualified for inclusion by input format and specific keys and/or key-value combinations supplied by the user

Caveats: The location of the tap could be important (that is to say, before or after enhancements), but could perhaps be configurable (first/last).

Clone this wiki locally