Package org.asciidoctor
Class Options
- java.lang.Object
-
- org.asciidoctor.Options
-
public class Options extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringATTRIBUTESstatic java.lang.StringBACKENDstatic java.lang.StringBASEDIRstatic java.lang.StringCATALOG_ASSETSstatic java.lang.StringCOMPACTstatic java.lang.StringDESTINATION_DIRstatic java.lang.StringDOCTYPEstatic java.lang.StringERUBYstatic java.lang.StringHEADER_FOOTERstatic java.lang.StringIN_PLACEstatic java.lang.StringMKDIRSstatic java.lang.StringPARSEstatic java.lang.StringPARSE_HEADER_ONLYstatic java.lang.StringSAFEstatic java.lang.StringSOURCEstatic java.lang.StringSOURCE_DIRstatic java.lang.StringSOURCEMAPstatic java.lang.StringSTANDALONEstatic java.lang.StringTEMPLATE_CACHEstatic java.lang.StringTEMPLATE_DIRSstatic java.lang.StringTEMPLATE_ENGINEstatic java.lang.StringTO_DIRstatic java.lang.StringTO_FILE
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static OptionsBuilderbuilder()java.util.Map<java.lang.String,java.lang.Object>map()Deprecated.For internal use only.voidsetAttributes(java.util.Map<java.lang.String,java.lang.Object> attributes)voidsetAttributes(Attributes attributes)voidsetBackend(java.lang.String backend)voidsetBaseDir(java.lang.String baseDir)voidsetCatalogAssets(boolean catalogAssets)If true, tells the parser to capture images and links in the reference table.voidsetCompact(boolean compact)voidsetDestinationDir(java.lang.String destinationDir)Deprecated.UsesetToDir(String)instead.voidsetDocType(java.lang.String docType)voidsetEruby(java.lang.String eruby)voidsetHeaderFooter(boolean headerFooter)Toggle including header and footer into the output.voidsetInPlace(boolean inPlace)voidsetMkDirs(boolean mkDirs)voidsetOption(java.lang.String optionName, java.lang.Object optionValue)voidsetParse(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).voidsetParseHeaderOnly(boolean parseHeaderOnly)voidsetSafe(SafeMode safeMode)Safe method calls safeMode.getLevel() to put the required level.voidsetSourceDir(java.lang.String srcDir)voidsetSourcemap(boolean sourcemap)Keeps track of the file and line number for each parsed block.voidsetStandalone(boolean standalone)Toggle including header and footer into the output.voidsetTemplateCache(boolean templateCache)voidsetTemplateDirs(java.lang.String... templateDirs)voidsetTemplateEngine(java.lang.String templateEngine)voidsetToDir(java.lang.String toDir)voidsetToFile(boolean toFile)Toogle writing output to a file.voidsetToFile(java.lang.String toFile)Enable writing output to a file.voidsetToStream(java.io.OutputStream toStream)
-
-
-
Field Detail
-
IN_PLACE
public static final java.lang.String IN_PLACE
- See Also:
- Constant Field Values
-
ATTRIBUTES
public static final java.lang.String ATTRIBUTES
- See Also:
- Constant Field Values
-
HEADER_FOOTER
public static final java.lang.String HEADER_FOOTER
- See Also:
- Constant Field Values
-
TEMPLATE_DIRS
public static final java.lang.String TEMPLATE_DIRS
- See Also:
- Constant Field Values
-
TEMPLATE_ENGINE
public static final java.lang.String TEMPLATE_ENGINE
- See Also:
- Constant Field Values
-
TO_FILE
public static final java.lang.String TO_FILE
- See Also:
- Constant Field Values
-
TO_DIR
public static final java.lang.String TO_DIR
- See Also:
- Constant Field Values
-
MKDIRS
public static final java.lang.String MKDIRS
- See Also:
- Constant Field Values
-
SAFE
public static final java.lang.String SAFE
- See Also:
- Constant Field Values
-
SOURCEMAP
public static final java.lang.String SOURCEMAP
- See Also:
- Constant Field Values
-
STANDALONE
public static final java.lang.String STANDALONE
- See Also:
- Constant Field Values
-
ERUBY
public static final java.lang.String ERUBY
- See Also:
- Constant Field Values
-
CATALOG_ASSETS
public static final java.lang.String CATALOG_ASSETS
- See Also:
- Constant Field Values
-
COMPACT
public static final java.lang.String COMPACT
- See Also:
- Constant Field Values
-
DESTINATION_DIR
public static final java.lang.String DESTINATION_DIR
- See Also:
- Constant Field Values
-
SOURCE_DIR
public static final java.lang.String SOURCE_DIR
- See Also:
- Constant Field Values
-
BACKEND
public static final java.lang.String BACKEND
- See Also:
- Constant Field Values
-
DOCTYPE
public static final java.lang.String DOCTYPE
- See Also:
- Constant Field Values
-
BASEDIR
public static final java.lang.String BASEDIR
- See Also:
- Constant Field Values
-
TEMPLATE_CACHE
public static final java.lang.String TEMPLATE_CACHE
- See Also:
- Constant Field Values
-
SOURCE
public static final java.lang.String SOURCE
- See Also:
- Constant Field Values
-
PARSE
public static final java.lang.String PARSE
- See Also:
- Constant Field Values
-
PARSE_HEADER_ONLY
public static final java.lang.String PARSE_HEADER_ONLY
- See Also:
- Constant Field Values
-
-
Method Detail
-
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(java.util.Map<java.lang.String,java.lang.Object> attributes)
-
setStandalone
public void setStandalone(boolean standalone)
Toggle including header and footer into the output.- Parameters:
standalone-trueto generate a standalone output document (which includes the shell around the body content, such as the header and footer). Defaults totruewhen converting a file only, otherwise isfalse.
-
setHeaderFooter
public void setHeaderFooter(boolean headerFooter)
Toggle including header and footer into the output.- Parameters:
headerFooter- Iftrue, include header and footer into the output, otherwise exclude them. This overrides any output-specific defaults.
-
setTemplateDirs
public void setTemplateDirs(java.lang.String... templateDirs)
-
setTemplateEngine
public void setTemplateEngine(java.lang.String templateEngine)
-
setToFile
public void setToFile(java.lang.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 viasetToDir(String)} orsetBaseDir(String)}, in that order.
-
setToStream
public void setToStream(java.io.OutputStream toStream)
-
setToFile
public void setToFile(boolean toFile)
Toogle writing output to a file.- Parameters:
toFile- Iftrue, write output to a file in the same directory as the input file, including header and footer into the output. Iffalse, return output as a string without any header or footer. The default header and footer visibility can be overridden usingsetHeaderFooter(boolean).
-
setToDir
public void setToDir(java.lang.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(java.lang.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
@Deprecated public void setDestinationDir(java.lang.String destinationDir)
Deprecated.UsesetToDir(String)instead.Destination output directory.- Parameters:
destinationDir- destination directory.
-
setSourceDir
public void setSourceDir(java.lang.String srcDir)
-
setBackend
public void setBackend(java.lang.String backend)
-
setDocType
public void setDocType(java.lang.String docType)
-
setBaseDir
public void setBaseDir(java.lang.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(java.lang.String optionName, java.lang.Object optionValue)
-
map
@Deprecated public java.util.Map<java.lang.String,java.lang.Object> map()
Deprecated.For internal use only.
-
-