Package org.asciidoctor
Class AttributesBuilder
- java.lang.Object
-
- org.asciidoctor.AttributesBuilder
-
public class AttributesBuilder extends java.lang.Object
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description AttributesBuilderallowUriRead(boolean allowUriRead)Sets allow uri read attribute.AttributesBuilderappendixCaption(java.lang.String appendixCaption)Sets appendix-caption label.AttributesBuilderarguments(java.lang.String attributes)Sets attributes in string form.AttributesBuilderarguments(java.lang.String... attributes)Sets attributes in array form.java.util.Map<java.lang.String,java.lang.Object>asMap()Deprecated.Usebuild()instead.AttributesBuilderattribute(java.lang.String attributeName)Sets custom or unlisted attribute to the default value, empty string.AttributesBuilderattribute(java.lang.String attributeName, java.lang.Object attributeValue)Sets custom or unlisted attributeAttributesBuilderattributeMissing(java.lang.String attributeMissing)Sets attribute missing attribute.static AttributesBuilderattributes()Deprecated.UseAttributes.builder()instead.static AttributesBuilderattributes(java.lang.String arguments)Deprecated.UseAttributes.builder()witharguments(String)instead.static AttributesBuilderattributes(java.lang.String[] arguments)Deprecated.UseAttributes.builder()witharguments(String...)instead.AttributesBuilderattributes(java.util.Map<java.lang.String,java.lang.Object> attributes)Adds all attributes.AttributesBuilderattributeUndefined(java.lang.String attributeUndefined)Sets attribute undefined attribute.AttributesBuilderbackend(java.lang.String backend)Sets backend attribue.Attributesbuild()Returns a valid Attributes instance.AttributesBuildercacheUri(boolean cacheUri)Sets cache-uri flag.AttributesBuildercompatMode(CompatMode compatMode)Sets compat mode attribute.AttributesBuildercopyCss(boolean copyCss)Sets copy css attribute.AttributesBuilderdataUri(boolean dataUri)Sets data-uri attribute.AttributesBuilderdocDate(java.util.Date date)Sets doc date for current document.AttributesBuilderdocTime(java.util.Date time)Sets doc time for current document.AttributesBuilderdocType(java.lang.String docType)Sets doc type attribute.AttributesBuilderexperimental(boolean experimental)Sets experimental attribute.Attributesget()Deprecated.Usebuild()instead.AttributesBuilderhardbreaks(boolean hardbreaks)Sets hardbreaks at the end of each line.AttributesBuilderhiddenUriScheme(boolean hiddenUriScheme)Sets hide-uri-scheme flag.AttributesBuildericonFontCdn(java.net.URI cdnUri)The URI prefix of the icon font; looks for minified CSS file based on iconfont-name value; used when iconfont-remote is setAttributesBuildericonFontName(java.lang.String iconFontName)The name of the stylesheet in the stylesdir to load (.css extension added automatically)AttributesBuildericonFontRemote(boolean iconFontRemote)Enable icon font remote attribute.AttributesBuildericons(java.lang.String icons)Sets which admonition icons to use.AttributesBuildericonsDir(java.lang.String iconsDir)Sets icons directory location.AttributesBuilderignoreUndefinedAttributes(boolean ignoreUndefinedAttributes)Sets ignore undefined flag so lines are kept when they contain a reference to a missing attribute.AttributesBuilderimagesDir(java.lang.String imagesDir)Sets image directory.AttributesBuilderlinkAttrs(boolean linkAttrs)Sets linkattrs attribute.AttributesBuilderlinkCss(boolean linkCss)Sets link css attribute.AttributesBuilderlocalDate(java.util.Date date)Sets local date for document.AttributesBuilderlocalTime(java.util.Date time)Sets local time for document.AttributesBuildermath(java.lang.String math)Sets math default engine.AttributesBuildermaxIncludeDepth(int maxIncludeDepth)Sets max include depth attribute.AttributesBuildernoFooter(boolean noFooter)Sets nofooter attribute.AttributesBuildersectionNumbers(boolean sectionNumbers)Auto-number section titles.AttributesBuildersectNumLevels(int sectnumlevels)Sets sect num levels attribute.AttributesBuildersetAnchors(boolean setAnchors)Sets setanchor flag.AttributesBuildershowTitle(boolean showTitle)Sets showtitle value as an alias for notitle!AttributesBuilderskipFrontMatter(boolean skipFrontMatter)Skips front matter.AttributesBuildersourceHighlighter(java.lang.String sourceHighlighter)Sets source highlighter processor.AttributesBuildersourceLanguage(java.lang.String sourceLanguage)Source language attribute.AttributesBuilderstylesDir(java.lang.String stylesDir)Sets the styles dir.AttributesBuilderstyleSheetName(java.lang.String styleSheetName)Sets stylesheet name.AttributesBuildertableOfContents(boolean toc)Sets if table of contents should be rendered or notAttributesBuildertableOfContents(Placement placement)Sets table of contents attribute.AttributesBuildertableOfContents2(Placement placement)Deprecated.AttributesBuildertitle(java.lang.String title)Sets title of document.AttributesBuilderunsetStyleSheet()Unsets stylesheet name so document will be generated without style.AttributesBuilderuntitledLabel(java.lang.String untitledLabel)Sets the untitled label value.
-
-
-
Method Detail
-
attributes
@Deprecated public static AttributesBuilder attributes()
Deprecated.UseAttributes.builder()instead.Creates attributes builder.- Returns:
- attributes builder.
-
attributes
@Deprecated public static AttributesBuilder attributes(java.lang.String[] arguments)
Deprecated.UseAttributes.builder()witharguments(String...)instead.Creates attributes builder.- Returns:
- attributes builder.
-
attributes
@Deprecated public static AttributesBuilder attributes(java.lang.String arguments)
Deprecated.UseAttributes.builder()witharguments(String)instead.Creates attributes builder.- Returns:
- attributes builder.
-
sourceLanguage
public AttributesBuilder sourceLanguage(java.lang.String sourceLanguage)
Source language attribute.- Parameters:
sourceLanguage- value.- Returns:
- this instance.
-
skipFrontMatter
public AttributesBuilder skipFrontMatter(boolean skipFrontMatter)
Skips front matter.- Parameters:
skipFrontMatter- value.- Returns:
- this instance.
-
ignoreUndefinedAttributes
public AttributesBuilder ignoreUndefinedAttributes(boolean ignoreUndefinedAttributes)
Sets ignore undefined flag so lines are kept when they contain a reference to a missing attribute.- Parameters:
ignoreUndefinedAttributes- value.- Returns:
- this instance.
-
maxIncludeDepth
public AttributesBuilder maxIncludeDepth(int maxIncludeDepth)
Sets max include depth attribute.- Parameters:
maxIncludeDepth- value.- Returns:
- this instance.
-
sectNumLevels
public AttributesBuilder sectNumLevels(int sectnumlevels)
Sets sect num levels attribute.- Parameters:
sectnumlevels- value.- Returns:
- this instance.
-
attributeMissing
public AttributesBuilder attributeMissing(java.lang.String attributeMissing)
Sets attribute missing attribute. (Possible values skip, drop, drop-line)- Parameters:
attributeMissing- value.- Returns:
- this instance.
-
attributeUndefined
public AttributesBuilder attributeUndefined(java.lang.String attributeUndefined)
Sets attribute undefined attribute. (Possible values skip, drop, drop-line)- Parameters:
attributeUndefined- value.- Returns:
- this instance.
-
setAnchors
public AttributesBuilder setAnchors(boolean setAnchors)
Sets setanchor flag.- Parameters:
setAnchors- value.- Returns:
- this instance.
-
untitledLabel
public AttributesBuilder untitledLabel(java.lang.String untitledLabel)
Sets the untitled label value.- Parameters:
untitledLabel- value.- Returns:
- this instance.
-
tableOfContents
public AttributesBuilder tableOfContents(Placement placement)
Sets table of contents attribute.- Parameters:
placement- where toc is rendered.- Returns:
- this instance.
-
tableOfContents2
@Deprecated public AttributesBuilder tableOfContents2(Placement placement)
Deprecated.Sets table of contents 2 attribute.- Parameters:
placement- where toc is rendered.- Returns:
- this instance.
-
allowUriRead
public AttributesBuilder allowUriRead(boolean allowUriRead)
Sets allow uri read attribute.- Parameters:
allowUriRead- value.- Returns:
- this instance.
-
backend
public AttributesBuilder backend(java.lang.String backend)
Sets backend attribue.- Parameters:
backend- value.- Returns:
- this instance.
-
showTitle
public AttributesBuilder showTitle(boolean showTitle)
Sets showtitle value as an alias for notitle!- Parameters:
showTitle- value.- Returns:
- this instance
-
title
public AttributesBuilder title(java.lang.String title)
Sets title of document.- Parameters:
title- for document.- Returns:
- this instance.
-
docType
public AttributesBuilder docType(java.lang.String docType)
Sets doc type attribute.- Parameters:
docType- value.- Returns:
- this instance.
-
imagesDir
public AttributesBuilder imagesDir(java.lang.String imagesDir)
Sets image directory.- Parameters:
imagesDir- location.- Returns:
- this instance.
-
sourceHighlighter
public AttributesBuilder sourceHighlighter(java.lang.String sourceHighlighter)
Sets source highlighter processor. It should be supported by asciidoctor.- Parameters:
sourceHighlighter- name of the source highlighting library (e.g., coderay).- Returns:
- this instance.
-
localDate
public AttributesBuilder localDate(java.util.Date date)
Sets local date for document.- Parameters:
date-- Returns:
- this instance.
-
localTime
public AttributesBuilder localTime(java.util.Date time)
Sets local time for document.- Parameters:
time-- Returns:
- this instance.
-
docDate
public AttributesBuilder docDate(java.util.Date date)
Sets doc date for current document.- Parameters:
date-- Returns:
- this instance.
-
docTime
public AttributesBuilder docTime(java.util.Date time)
Sets doc time for current document.- Parameters:
time-- Returns:
- this instance.
-
tableOfContents
public AttributesBuilder tableOfContents(boolean toc)
Sets if table of contents should be rendered or not- Parameters:
toc- value- Returns:
- this instance.
-
styleSheetName
public AttributesBuilder styleSheetName(java.lang.String styleSheetName)
Sets stylesheet name.- Parameters:
styleSheetName- of css file.- Returns:
- this instance.
-
unsetStyleSheet
public AttributesBuilder unsetStyleSheet()
Unsets stylesheet name so document will be generated without style.- Returns:
- this instance.
-
stylesDir
public AttributesBuilder stylesDir(java.lang.String stylesDir)
Sets the styles dir.- Parameters:
stylesDir- directory.- Returns:
- this instance.
-
linkCss
public AttributesBuilder linkCss(boolean linkCss)
Sets link css attribute.- Parameters:
linkCss- true if css is linked, false if css is embedded.- Returns:
- this instance.
-
copyCss
public AttributesBuilder copyCss(boolean copyCss)
Sets copy css attribute.- Parameters:
copyCss- true if css should be copied to the output location, false otherwise.- Returns:
- this instance.
-
icons
public AttributesBuilder icons(java.lang.String icons)
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:
icons- value.- Returns:
- this instance.
-
iconFontRemote
public AttributesBuilder iconFontRemote(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.- Returns:
- this instance.
-
iconFontCdn
public AttributesBuilder iconFontCdn(java.net.URI cdnUri)
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.- Returns:
- this instance.
-
iconFontName
public AttributesBuilder iconFontName(java.lang.String iconFontName)
The name of the stylesheet in the stylesdir to load (.css extension added automatically)- Parameters:
iconFontName- stylesheet name without .css extension.- Returns:
- this instance.
-
iconsDir
public AttributesBuilder iconsDir(java.lang.String iconsDir)
Sets icons directory location.- Parameters:
iconsDir- location.- Returns:
- this instance.
-
dataUri
public AttributesBuilder dataUri(boolean dataUri)
Sets data-uri attribute.- Parameters:
dataUri- true if images should be embedded, false otherwise.
-
attribute
public AttributesBuilder attribute(java.lang.String attributeName)
Sets custom or unlisted attribute to the default value, empty string.- Parameters:
attributeName- A flag-only attribute, such as "icons"- Returns:
- this instance.
-
sectionNumbers
public AttributesBuilder sectionNumbers(boolean sectionNumbers)
Auto-number section titles.- Parameters:
sectionNumbers- true if numbers should be auto-numbered, false otherwise.- Returns:
- this instance.
-
hardbreaks
public AttributesBuilder hardbreaks(boolean hardbreaks)
Sets hardbreaks at the end of each line.- Parameters:
hardbreaks- true if each line should be added a hardbreak, false otherwise.- Returns:
- this instance.
-
cacheUri
public AttributesBuilder cacheUri(boolean cacheUri)
Sets cache-uri flag.- Parameters:
cacheUri- true if URI content should be cached, false otherwise.- Returns:
- this instance.
-
hiddenUriScheme
public AttributesBuilder hiddenUriScheme(boolean hiddenUriScheme)
Sets hide-uri-scheme flag.- Parameters:
hiddenUriScheme- true if URI is hidden, false otherwise.- Returns:
- this instance.
-
appendixCaption
public AttributesBuilder appendixCaption(java.lang.String appendixCaption)
Sets appendix-caption label.- Parameters:
appendixCaption- value.- Returns:
- this instance.
-
math
public AttributesBuilder math(java.lang.String math)
Sets math default engine.- Parameters:
math- value.- Returns:
- this instance.
-
linkAttrs
public AttributesBuilder linkAttrs(boolean linkAttrs)
Sets linkattrs attribute.- Parameters:
linkAttrs- true if Asciidoctor should parse link macro attributes, false otherwise.- Returns:
- this instance.
-
experimental
public AttributesBuilder experimental(boolean experimental)
Sets experimental attribute.- Parameters:
experimental- true if experimental features should be enabled, false otherwise.
-
noFooter
public AttributesBuilder noFooter(boolean noFooter)
Sets nofooter attribute.- Parameters:
noFooter- true if footer block should not be shown, false otherwise.- Returns:
- this instance.
-
compatMode
public AttributesBuilder compatMode(CompatMode compatMode)
Sets compat mode attribute.- Parameters:
compatMode- value.- Returns:
- this instance.
-
attribute
public AttributesBuilder attribute(java.lang.String attributeName, java.lang.Object attributeValue)
Sets custom or unlisted attribute- Parameters:
attributeName-attributeValue-- Returns:
- this instance.
-
attributes
public AttributesBuilder attributes(java.util.Map<java.lang.String,java.lang.Object> attributes)
Adds all attributes.- Parameters:
attributes- map.- Returns:
- this instance.
-
arguments
public AttributesBuilder arguments(java.lang.String attributes)
Sets attributes in string form. An example of a valid string would be: 'toc sectnums source-highlighter=coderay' where you are adding three attributes: toc, sectnums and source-highlighter with value coderay.- Parameters:
attributes- in string format.- Returns:
- this instance.
-
arguments
public AttributesBuilder arguments(java.lang.String... attributes)
Sets attributes in array form. An example of a valid array would be: '['toc', 'sectnums']' where you are adding two attributes: toc and sectnums.- Parameters:
attributes- in array format.- Returns:
- this instance.
-
asMap
@Deprecated public java.util.Map<java.lang.String,java.lang.Object> asMap()
Deprecated.Usebuild()instead.Gets a map with configured options.- Returns:
- map with all options. By default an empty map is returned.
-
get
@Deprecated public Attributes get()
Deprecated.Usebuild()instead.
-
build
public Attributes build()
Returns a valid Attributes instance.- Returns:
- attributes instance.
-
-