Class Options

java.lang.Object
org.asciidoctor.Options

public class Options extends Object
  • Field Details

  • Constructor Details

  • Method Details

    • builder

      public static OptionsBuilder builder()
      Returns:
      Empty OptionsBuilder instance.
    • setInPlace

      public void setInPlace(boolean inPlace)
    • setAttributes

      public void setAttributes(Attributes attributes)
    • setAttributes

      public void setAttributes(Map<String,Object> attributes)
    • setHeaderFooter

      public void setHeaderFooter(boolean headerFooter)
      Toggle including header and footer into the output.
      Parameters:
      headerFooter - If true, include header and footer into the output, otherwise exclude them. This overrides any output-specific defaults.
    • setTemplateDirs

      public void setTemplateDirs(String... templateDirs)
    • setTemplateEngine

      public void setTemplateEngine(String templateEngine)
    • setToFile

      public void setToFile(String toFile)
      Enable writing output to a file. The file includes header and footer by default.
      Parameters:
      toFile - The path to the output file. If the path is not absolute, it is interpreted relative to what was set via setToDir(String)} or setBaseDir(String)}, in that order.
    • setToStream

      public void setToStream(OutputStream toStream)
    • setToFile

      public void setToFile(boolean toFile)
      Toogle writing output to a file.
      Parameters:
      toFile - If true, write output to a file in the same directory as the input file, including header and footer into the output. If false, return output as a string without any header or footer. The default header and footer visibility can be overridden using setHeaderFooter(boolean).
    • setToDir

      public void setToDir(String toDir)
    • setMkDirs

      public void setMkDirs(boolean mkDirs)
    • setSafe

      public void setSafe(SafeMode safeMode)
      Safe method calls safeMode.getLevel() to put the required level.
      Parameters:
      safeMode - enum.
    • setSourcemap

      public void setSourcemap(boolean sourcemap)
      Keeps track of the file and line number for each parsed block. (Useful for tooling applications where the association between the converted output and the source file is important).
      Parameters:
      sourcemap - value.
    • setEruby

      public void setEruby(String eruby)
    • setCatalogAssets

      public void setCatalogAssets(boolean catalogAssets)
      If true, tells the parser to capture images and links in the reference table. (Normally only IDs, footnotes and indexterms are included). The reference table is available via the references property on the document AST object. (Experimental).
      Parameters:
      catalogAssets - value.
    • setCompact

      public void setCompact(boolean compact)
    • setDestinationDir

      public void setDestinationDir(String destinationDir)
    • setSourceDir

      public void setSourceDir(String srcDir)
    • setBackend

      public void setBackend(String backend)
    • setDocType

      public void setDocType(String docType)
    • setBaseDir

      public void setBaseDir(String baseDir)
    • setTemplateCache

      public void setTemplateCache(boolean templateCache)
    • setParse

      public void setParse(boolean parse)
      If true, the source is parsed eagerly (i.e., as soon as the source is passed to the load or load_file API). If false, parsing is deferred until the parse method is explicitly invoked.
      Parameters:
      parse - value.
    • setParseHeaderOnly

      public void setParseHeaderOnly(boolean parseHeaderOnly)
    • setOption

      public void setOption(String optionName, Object optionValue)
    • map

      @Deprecated public Map<String,Object> map()
      Deprecated.
      For internal use only.