Package org.asciidoctor
Class Attributes
java.lang.Object
org.asciidoctor.Attributes
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final String -
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.Attributes(String attributes) Deprecated.Usebuilder()instead.Attributes(String[] attributes) Deprecated.Usebuilder()instead.Attributes(Map<String, Object> attributes) Deprecated.Usebuilder()instead. -
Method Summary
Modifier and TypeMethodDescriptionstatic AttributesBuilderbuilder()map()Deprecated.For internal use only.voidsetAllowUriRead(boolean allowUriRead) Allow Asciidoctor to read content from an URI.voidsetAnchors(boolean setAnchors) Sets setanchor flag.voidsetAppendixCaption(String appendixCaption) Defines the prefix added to appendix sections.voidsetAttribute(String attributeName, Object attributeValue) voidsetAttributeMissing(String attributeMissing) Define how to handle missing attribute references.voidsetAttributes(String attributes) Sets attributes in string form.voidsetAttributes(String... attributes) Sets attributes in array form.voidsetAttributes(Map<String, Object> attributes) Adds all attributes.voidsetAttributeUndefined(String attributeUndefined) Define how to handle expressions that undefine an attribute.voidsetBackend(String backend) Sets the backend attribute.voidsetCacheUri(boolean cacheUri) Enables or disables caching of content read from URIsvoidsetCompatMode(CompatMode compatMode) Sets compat-mode attribute.voidsetCopyCss(boolean copyCss) Sets copy css attribute.voidsetDataUri(boolean dataUri) Sets data-uri attribute.voidsetDocDate(Date docDate) Sets date in format yyyy-MM-ddvoidsetDocTime(Date docTime) Sets time in format HH:mm:ss zvoidsetDocType(String docType) Sets the document type, which defines how a document and what parts are rendered.voidsetExperimental(boolean experimental) Sets experimental attribute.voidsetHardbreaks(boolean hardbreaks) Enables or disables preserving of line breaks in a paragraph.voidsetHideUriScheme(boolean hideUriScheme) Enables or disables rendering of the URI scheme when rendering URLs.voidsetIconFontCdn(URI cdnUri) The URI prefix of the icon font; looks for minified CSS file based on iconfont-name value; used when iconfont-remote is setvoidsetIconFontName(String iconFontName) The name of the stylesheet in the stylesdir to load (.css extension added automatically)voidsetIconFontRemote(boolean iconFontRemote) Enable icon font remote attribute.voidSets which admonition icons to use.voidsetIconsDir(String iconsDir) Sets icons directory.voidsetIgnoreUndefinedAttributes(boolean ignoreUndefinedAttributes) Sets ignore undefined flag so lines are kept when they contain a reference to a missing attribute.voidsetImagesDir(String imagesDir) Sets the directory to which images are resolved if the image target is a relative path.voidsetLinkAttrs(boolean linkAttrs) Sets linkattrs attribute.voidsetLinkCss(boolean linkCss) Sets link css attribute.voidsetLocalDate(Date localDate) Sets date in format yyyy-MM-ddvoidsetLocalTime(Date localTime) Sets time in format HH:mm:ss zvoidSets the interpreter to use for rendering stems, i.e. equations and formulas.voidsetMaxIncludeDepth(int maxIncludeDepth) Defines how many documents can be recursively included.voidsetNoFooter(boolean noFooter) Sets nofooter attribute.voidsetSectionNumbers(boolean sectionNumbers) auto-number section titles in the HTML backendvoidsetSectNumLevels(int sectNumLevels) Sets the depth of section numbering.voidsetShowTitle(boolean showTitle) Sets showtitle value as an alias for notitle!voidsetSkipFrontMatter(boolean skipFrontMatter) Skips front matter.voidsetSourceHighlighter(String sourceHighlighter) Sets the source highlighter to use for rendering source blocks.voidsetSourceLanguage(String sourceLanguage) Globally sets the source language attribute when rendering source blocks.voidsetStylesDir(String stylesDir) Sets the styles dir.voidsetStyleSheetName(String styleSheetName) Sets stylesheet name.voidsetTableOfContents(boolean toc) Sets if a table of contents should be rendered or not.voidsetTableOfContents(Placement placement) Sets if a table of contents should be rendered or not.voidsetTableOfContents2(Placement placement) Deprecated.voidvoidsetTocLevels(int levels) Sets the amount of levels which should be shown in the toc.voidsetUntitledLabel(String untitledLabel) Sets the untitled label value.static StringtoAsciidoctorFlag(boolean flag) voidUnsets stylesheet name so document will be generated without style.
-
Field Details
-
TOC
- See Also:
-
TOC_POSITION
- See Also:
-
TOC_LEVELS
- See Also:
-
TOC_2
- See Also:
-
BACKEND
- See Also:
-
TITLE
- See Also:
-
DOCTYPE
- See Also:
-
IMAGESDIR
- See Also:
-
SOURCE_HIGHLIGHTER
- See Also:
-
SOURCE_LANGUAGE
- See Also:
-
LOCALDATE
- See Also:
-
LOCALTIME
- See Also:
-
DOCDATE
- See Also:
-
DOCTIME
- See Also:
-
STYLESHEET_NAME
- See Also:
-
STYLES_DIR
- See Also:
-
NOT_STYLESHEET_NAME
- See Also:
-
LINK_CSS
- See Also:
-
COPY_CSS
- See Also:
-
ICONS
- See Also:
-
ICONFONT_REMOTE
- See Also:
-
ICONFONT_CDN
- See Also:
-
ICONFONT_NAME
- See Also:
-
ICONS_DIR
- See Also:
-
DATA_URI
- See Also:
-
SECTION_NUMBERS
- See Also:
-
IMAGE_ICONS
- See Also:
-
FONT_ICONS
- See Also:
-
LINK_ATTRS
- See Also:
-
EXPERIMENTAL
- See Also:
-
SHOW_TITLE
- See Also:
-
NOTITLE
- See Also:
-
ALLOW_URI_READ
- See Also:
-
IGNORE_UNDEFINED
- See Also:
-
UNTITLED_LABEL
- See Also:
-
SET_ANCHORS
- See Also:
-
SKIP_FRONT_MATTER
- See Also:
-
MAX_INCLUDE_DEPTH
- See Also:
-
ATTRIBUTE_MISSING
- See Also:
-
ATTRIBUTE_UNDEFINED
- See Also:
-
NO_FOOTER
- See Also:
-
HARDBREAKS
- See Also:
-
SECT_NUM_LEVELS
- See Also:
-
CACHE_URI
- See Also:
-
MATH
- See Also:
-
APPENDIX_CAPTION
- See Also:
-
HIDE_URI_SCHEME
- See Also:
-
COMPAT_MODE
- See Also:
-
-
Constructor Details
-
Method Details
-
builder
- Returns:
- Empty AttributesBuilder instance.
-
setAllowUriRead
public void setAllowUriRead(boolean allowUriRead) Allow Asciidoctor to read content from an URI. Additionally the optionSafeModemust be less thanSafeMode.SECUREto enable inclusion of content from an URI.- Parameters:
allowUriRead-trueto enable inclusion of content from an URI- See Also:
-
setAttributeMissing
Define how to handle missing attribute references. Possible values are:skipleave the reference in place (default setting) dropdrop the reference, but not the line drop-linedrop the line on which the reference occurs (compliant behavior) warnprint a warning about the missing attribute - Parameters:
attributeMissing- One of the constants shown in the table above.- See Also:
-
setAttributeUndefined
Define how to handle expressions that undefine an attribute. Possible values are:dropsubstitute the expression with an empty string after processing it drop-linedrop the line that contains this expression (default setting and compliant behavior) - Parameters:
attributeUndefined- One of the constants shown in the table above.- See Also:
-
setBackend
Sets the backend attribute.- Parameters:
backend- The name of the backend, e.g.docbook.
-
setTitle
-
setDocType
Sets the document type, which defines how a document and what parts are rendered. Possible values are:articlebookinlinemanpage
- Parameters:
docType- One of the constants mentioned above.- See Also:
-
setImagesDir
Sets the directory to which images are resolved if the image target is a relative path.- Parameters:
imagesDir- The name of the directory.- See Also:
-
setSourceLanguage
Globally sets the source language attribute when rendering source blocks.- Parameters:
sourceLanguage- The default source language to use, e.g.Java.- See Also:
-
setSourceHighlighter
Sets the source highlighter to use for rendering source blocks. Possible values are:- coderay
- highlightjs
- prettify
- Parameters:
sourceHighlighter- One of the constants mentioned above.- See Also:
-
setMaxIncludeDepth
public void setMaxIncludeDepth(int maxIncludeDepth) Defines how many documents can be recursively included.- Parameters:
maxIncludeDepth- A positive integer.- See Also:
-
setSectNumLevels
public void setSectNumLevels(int sectNumLevels) Sets the depth of section numbering. That is if set to 1 only the top level section will be assigned a number. Default is 3.- Parameters:
sectNumLevels- A positive integer.
-
setHardbreaks
public void setHardbreaks(boolean hardbreaks) Enables or disables preserving of line breaks in a paragraph.- Parameters:
hardbreaks-trueto enable preserving of line breaks in paragraphs- See Also:
-
setCacheUri
public void setCacheUri(boolean cacheUri) Enables or disables caching of content read from URIs- Parameters:
cacheUri-trueto enable caching of content read from URIs- See Also:
-
setHideUriScheme
public void setHideUriScheme(boolean hideUriScheme) Enables or disables rendering of the URI scheme when rendering URLs.- Parameters:
hideUriScheme-- See Also:
-
setAppendixCaption
Defines the prefix added to appendix sections. The default value isAppendix- Parameters:
appendixCaption- The string that is prefixed to the section name in the appendix.- See Also:
-
setMath
Sets the interpreter to use for rendering stems, i.e. equations and formulas.- Parameters:
math- The name of the interpreter, i.e. eitherasciimathorlatexmath.- See Also:
-
setSkipFrontMatter
public void setSkipFrontMatter(boolean skipFrontMatter) Skips front matter.- Parameters:
skipFrontMatter- value.
-
setAnchors
public void setAnchors(boolean setAnchors) Sets setanchor flag.- Parameters:
setAnchors- value.
-
setUntitledLabel
Sets the untitled label value.- Parameters:
untitledLabel- value.
-
setIgnoreUndefinedAttributes
public void setIgnoreUndefinedAttributes(boolean ignoreUndefinedAttributes) Sets ignore undefined flag so lines are kept when they contain a reference to a missing attribute.- Parameters:
ignoreUndefinedAttributes- value.
-
setTableOfContents2
Deprecated.Sets table of contents 2 attribute.- Parameters:
placement- where toc is rendered.
-
setTableOfContents
Sets if a table of contents should be rendered or not.- Parameters:
placement- position of toc.
-
setTocLevels
public void setTocLevels(int levels) Sets the amount of levels which should be shown in the toc.- Parameters:
levels- number of levels which should be shown in the toc.
-
setShowTitle
public void setShowTitle(boolean showTitle) Sets showtitle value as an alias for notitle!- Parameters:
showTitle- value.
-
setTableOfContents
public void setTableOfContents(boolean toc) Sets if a table of contents should be rendered or not.- Parameters:
toc- value.
-
setLocalDate
Sets date in format yyyy-MM-dd- Parameters:
localDate- object.
-
setLocalTime
Sets time in format HH:mm:ss z- Parameters:
localTime- object.
-
setDocDate
Sets date in format yyyy-MM-dd- Parameters:
docDate- object.
-
setDocTime
Sets time in format HH:mm:ss z- Parameters:
docTime- object.
-
setStyleSheetName
Sets stylesheet name.- Parameters:
styleSheetName- of css file.
-
unsetStyleSheet
public void unsetStyleSheet()Unsets stylesheet name so document will be generated without style. -
setStylesDir
Sets the styles dir.- Parameters:
stylesDir- directory.
-
setLinkCss
public void setLinkCss(boolean linkCss) Sets link css attribute.- Parameters:
linkCss- true if css is linked, false if css is embedded.
-
setCopyCss
public void setCopyCss(boolean copyCss) Sets copy css attribute.- Parameters:
copyCss- true if css should be copied to the output location, false otherwise.
-
setIcons
Sets which admonition icons to use. Attributes.IMAGE_ICONS constant can be used to use the original icons with images or Attributes.FONT_ICONS for font icons (font-awesome).- Parameters:
iconsName- value.
-
setIconFontRemote
public void setIconFontRemote(boolean iconFontRemote) Enable icon font remote attribute. If enabled, will use the iconfont-cdn value to load the icon font URI; if disabled, will use the iconfont-name value to locate the icon font CSS file- Parameters:
iconFontRemote- true if attribute enabled false otherwise.
-
setIconFontCdn
The URI prefix of the icon font; looks for minified CSS file based on iconfont-name value; used when iconfont-remote is set- Parameters:
cdnUri- uri where css is stored.
-
setIconFontName
The name of the stylesheet in the stylesdir to load (.css extension added automatically)- Parameters:
iconFontName- stylesheet name without .css extension.
-
setDataUri
public void setDataUri(boolean dataUri) Sets data-uri attribute.- Parameters:
dataUri- true if images should be embedded, false otherwise.
-
setIconsDir
Sets icons directory.- Parameters:
iconsDir-
-
setSectionNumbers
public void setSectionNumbers(boolean sectionNumbers) auto-number section titles in the HTML backend- Parameters:
sectionNumbers-
-
setLinkAttrs
public void setLinkAttrs(boolean linkAttrs) Sets linkattrs attribute.- Parameters:
linkAttrs- true if Asciidoctor should parse link macro attributes, false otherwise.
-
setExperimental
public void setExperimental(boolean experimental) Sets experimental attribute.- Parameters:
experimental- true if experimental features should be enabled, false otherwise.
-
setCompatMode
Sets compat-mode attribute.- Parameters:
compatMode- value.
-
setAttribute
-
setAttributes
Sets attributes in string form. An example of a valid string would be: 'toc numbered source-highlighter=coderay' where you are adding three attributes: toc, numbered and source-highlighter with value coderay.- Parameters:
attributes- in string format.
-
setAttributes
Sets attributes in array form. An example of a valid array would be: '['toc', 'numbered']' where you are adding three attributes: toc and numbered.- Parameters:
attributes- in array format.
-
setAttributes
Adds all attributes.- Parameters:
attributes- to add.
-
toAsciidoctorFlag
-
map
Deprecated.For internal use only.
-
builder()instead.