Interface TextUnit

  • All Known Subinterfaces:
    CompatibilityTextUnit
    All Known Implementing Classes:
    JavaTextUnit, RegularTextUnit

    public interface TextUnit
    Unit of text generation, corresponds to output file. Bears attributes relevant to file, e.g. name, encoding, location keys, etc. Tracks inputs that served to populate the unit.
    Since:
    3.3
    • Method Detail

      • generate

        void generate()
      • getFilePath

        @Nullable
        default String getFilePath()
        PROVISIONAL API Perhaps, shall stick to Path object rather than plain String Tell desired location of the text outcome
        Returns:
        null to use default value derived from qualified model name.
      • getBytes

        byte[] getBytes()
        FIXME decide whether throws exception or return null/empty value if not yet generated.
      • getEncoding

        Charset getEncoding()
        FIXME makes sense for text/string output only. Shall decide whether we keep binary/textual generation separate, or combine under single API, and what to do in case of binary file with encoding?