public class Attributes
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ALLOW_URI_READ |
static java.lang.String |
APPENDIX_CAPTION |
static java.lang.String |
ATTRIBUTE_MISSING |
static java.lang.String |
ATTRIBUTE_UNDEFINED |
static java.lang.String |
BACKEND |
static java.lang.String |
CACHE_URI |
static java.lang.String |
COMPAT_MODE |
static java.lang.String |
COPY_CSS |
static java.lang.String |
DATA_URI |
static java.lang.String |
DOCDATE |
static java.lang.String |
DOCTIME |
static java.lang.String |
DOCTYPE |
static java.lang.String |
EXPERIMENTAL |
static java.lang.String |
FONT_ICONS |
static java.lang.String |
HARDBREAKS |
static java.lang.String |
HIDE_URI_SCHEME |
static java.lang.String |
ICONFONT_CDN |
static java.lang.String |
ICONFONT_NAME |
static java.lang.String |
ICONFONT_REMOTE |
static java.lang.String |
ICONS |
static java.lang.String |
ICONS_DIR |
static java.lang.String |
IGNORE_UNDEFINED |
static java.lang.String |
IMAGE_ICONS |
static java.lang.String |
IMAGESDIR |
static java.lang.String |
LINK_ATTRS |
static java.lang.String |
LINK_CSS |
static java.lang.String |
LOCALDATE |
static java.lang.String |
LOCALTIME |
static java.lang.String |
MATH |
static java.lang.String |
MAX_INCLUDE_DEPTH |
static java.lang.String |
NO_FOOTER |
static java.lang.String |
NOT_STYLESHEET_NAME |
static java.lang.String |
NOTITLE |
static java.lang.String |
SECT_NUM_LEVELS |
static java.lang.String |
SECTION_NUMBERS |
static java.lang.String |
SET_ANCHORS |
static java.lang.String |
SHOW_TITLE |
static java.lang.String |
SKIP_FRONT_MATTER |
static java.lang.String |
SOURCE_HIGHLIGHTER |
static java.lang.String |
SOURCE_LANGUAGE |
static java.lang.String |
STYLES_DIR |
static java.lang.String |
STYLESHEET_NAME |
static java.lang.String |
TITLE |
static java.lang.String |
TOC |
static java.lang.String |
TOC_2 |
static java.lang.String |
TOC_LEVELS |
static java.lang.String |
TOC_POSITION |
static java.lang.String |
UNTITLED_LABEL |
Constructor and Description |
---|
Attributes()
Deprecated.
Use
builder() instead. |
Attributes(java.util.Map<java.lang.String,java.lang.Object> attributes)
Deprecated.
Use
builder() instead. |
Attributes(java.lang.String attributes)
Deprecated.
Use
builder() instead. |
Attributes(java.lang.String[] attributes)
Deprecated.
Use
builder() instead. |
Modifier and Type | Method and Description |
---|---|
static AttributesBuilder |
builder() |
java.util.Map<java.lang.String,java.lang.Object> |
map()
Deprecated.
For internal use only.
|
void |
setAllowUriRead(boolean allowUriRead)
Allow Asciidoctor to read content from an URI.
|
void |
setAnchors(boolean setAnchors)
Sets setanchor flag.
|
void |
setAppendixCaption(java.lang.String appendixCaption)
Defines the prefix added to appendix sections.
|
void |
setAttribute(java.lang.String attributeName,
java.lang.Object attributeValue) |
void |
setAttributeMissing(java.lang.String attributeMissing)
Define how to handle missing attribute references.
|
void |
setAttributes(java.util.Map<java.lang.String,java.lang.Object> attributes)
Adds all attributes.
|
void |
setAttributes(java.lang.String... attributes)
Sets attributes in array form.
|
void |
setAttributes(java.lang.String attributes)
Sets attributes in string form.
|
void |
setAttributeUndefined(java.lang.String attributeUndefined)
Define how to handle expressions that undefine an attribute.
|
void |
setBackend(java.lang.String backend)
Sets the backend attribute.
|
void |
setCacheUri(boolean cacheUri)
Enables or disables caching of content read from URIs
|
void |
setCompatMode(CompatMode compatMode)
Sets compat-mode attribute.
|
void |
setCopyCss(boolean copyCss)
Sets copy css attribute.
|
void |
setDataUri(boolean dataUri)
Sets data-uri attribute.
|
void |
setDocDate(java.util.Date docDate)
Sets date in format yyyy-MM-dd
|
void |
setDocTime(java.util.Date docTime)
Sets time in format HH:mm:ss z
|
void |
setDocType(java.lang.String docType)
Sets the document type, which defines how a document and what parts are rendered.
|
void |
setExperimental(boolean experimental)
Sets experimental attribute.
|
void |
setHardbreaks(boolean hardbreaks)
Enables or disables preserving of line breaks in a paragraph.
|
void |
setHideUriScheme(boolean hideUriScheme)
Enables or disables rendering of the URI scheme when rendering URLs.
|
void |
setIconFontCdn(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
|
void |
setIconFontName(java.lang.String iconFontName)
The name of the stylesheet in the stylesdir to load (.css extension added automatically)
|
void |
setIconFontRemote(boolean iconFontRemote)
Enable icon font remote attribute.
|
void |
setIcons(java.lang.String iconsName)
Sets which admonition icons to use.
|
void |
setIconsDir(java.lang.String iconsDir)
Sets icons directory.
|
void |
setIgnoreUndefinedAttributes(boolean ignoreUndefinedAttributes)
Sets ignore undefined flag so lines are kept when they contain a reference to a missing attribute.
|
void |
setImagesDir(java.lang.String imagesDir)
Sets the directory to which images are resolved if the image target is a relative path.
|
void |
setLinkAttrs(boolean linkAttrs)
Sets linkattrs attribute.
|
void |
setLinkCss(boolean linkCss)
Sets link css attribute.
|
void |
setLocalDate(java.util.Date localDate)
Sets date in format yyyy-MM-dd
|
void |
setLocalTime(java.util.Date localTime)
Sets time in format HH:mm:ss z
|
void |
setMath(java.lang.String math)
Sets the interpreter to use for rendering stems, i.e. equations and formulas.
|
void |
setMaxIncludeDepth(int maxIncludeDepth)
Defines how many documents can be recursively included.
|
void |
setNoFooter(boolean noFooter)
Sets nofooter attribute.
|
void |
setSectionNumbers(boolean sectionNumbers)
auto-number section titles in the HTML backend
|
void |
setSectNumLevels(int sectNumLevels)
Sets the depth of section numbering.
|
void |
setShowTitle(boolean showTitle)
Sets showtitle value as an alias for notitle!
|
void |
setSkipFrontMatter(boolean skipFrontMatter)
Skips front matter.
|
void |
setSourceHighlighter(java.lang.String sourceHighlighter)
Sets the source highlighter to use for rendering source blocks.
|
void |
setSourceLanguage(java.lang.String sourceLanguage)
Globally sets the source language attribute when rendering source blocks.
|
void |
setStylesDir(java.lang.String stylesDir)
Sets the styles dir.
|
void |
setStyleSheetName(java.lang.String styleSheetName)
Sets stylesheet name.
|
void |
setTableOfContents(boolean toc)
Sets if a table of contents should be rendered or not.
|
void |
setTableOfContents(Placement placement)
Sets if a table of contents should be rendered or not.
|
void |
setTableOfContents2(Placement placement)
Sets table of contents 2 attribute.
|
void |
setTitle(java.lang.String title) |
void |
setTocLevels(int levels)
Sets the amount of levels which should be shown in the toc.
|
void |
setUntitledLabel(java.lang.String untitledLabel)
Sets the untitled label value.
|
static java.lang.String |
toAsciidoctorFlag(boolean flag) |
void |
unsetStyleSheet()
Unsets stylesheet name so document will be generated without style.
|
public static final java.lang.String TOC
public static final java.lang.String TOC_POSITION
public static final java.lang.String TOC_LEVELS
public static final java.lang.String TOC_2
public static final java.lang.String BACKEND
public static final java.lang.String TITLE
public static final java.lang.String DOCTYPE
public static final java.lang.String IMAGESDIR
public static final java.lang.String SOURCE_HIGHLIGHTER
public static final java.lang.String SOURCE_LANGUAGE
public static final java.lang.String LOCALDATE
public static final java.lang.String LOCALTIME
public static final java.lang.String DOCDATE
public static final java.lang.String DOCTIME
public static final java.lang.String STYLESHEET_NAME
public static final java.lang.String STYLES_DIR
public static final java.lang.String NOT_STYLESHEET_NAME
public static final java.lang.String LINK_CSS
public static final java.lang.String COPY_CSS
public static final java.lang.String ICONS
public static final java.lang.String ICONFONT_REMOTE
public static final java.lang.String ICONFONT_CDN
public static final java.lang.String ICONFONT_NAME
public static final java.lang.String ICONS_DIR
public static final java.lang.String DATA_URI
public static final java.lang.String SECTION_NUMBERS
public static final java.lang.String IMAGE_ICONS
public static final java.lang.String FONT_ICONS
public static final java.lang.String LINK_ATTRS
public static final java.lang.String EXPERIMENTAL
public static final java.lang.String SHOW_TITLE
public static final java.lang.String NOTITLE
public static final java.lang.String ALLOW_URI_READ
public static final java.lang.String IGNORE_UNDEFINED
public static final java.lang.String UNTITLED_LABEL
public static final java.lang.String SET_ANCHORS
public static final java.lang.String SKIP_FRONT_MATTER
public static final java.lang.String MAX_INCLUDE_DEPTH
public static final java.lang.String ATTRIBUTE_MISSING
public static final java.lang.String ATTRIBUTE_UNDEFINED
public static final java.lang.String NO_FOOTER
public static final java.lang.String HARDBREAKS
public static final java.lang.String SECT_NUM_LEVELS
public static final java.lang.String CACHE_URI
public static final java.lang.String MATH
public static final java.lang.String APPENDIX_CAPTION
public static final java.lang.String HIDE_URI_SCHEME
public static final java.lang.String COMPAT_MODE
@Deprecated public Attributes()
builder()
instead.@Deprecated public Attributes(java.util.Map<java.lang.String,java.lang.Object> attributes)
builder()
instead.@Deprecated public Attributes(java.lang.String[] attributes)
builder()
instead.@Deprecated public Attributes(java.lang.String attributes)
builder()
instead.public static AttributesBuilder builder()
public void setAllowUriRead(boolean allowUriRead)
SafeMode
must be less than SafeMode.SECURE
to enable inclusion of content from an URI.allowUriRead
- true
to enable inclusion of content from an URIpublic void setAttributeMissing(java.lang.String attributeMissing)
skip |
leave the reference in place (default setting) |
drop |
drop the reference, but not the line |
drop-line |
drop the line on which the reference occurs (compliant behavior) |
warn |
print a warning about the missing attribute |
attributeMissing
- One of the constants shown in the table above.public void setAttributeUndefined(java.lang.String attributeUndefined)
drop |
substitute the expression with an empty string after processing it |
drop-line |
drop the line that contains this expression (default setting and compliant behavior) |
attributeUndefined
- One of the constants shown in the table above.public void setBackend(java.lang.String backend)
backend
- The name of the backend, e.g. docbook
.public void setTitle(java.lang.String title)
public void setDocType(java.lang.String docType)
article
book
inline
manpage
docType
- One of the constants mentioned above.public void setImagesDir(java.lang.String imagesDir)
imagesDir
- The name of the directory.public void setSourceLanguage(java.lang.String sourceLanguage)
sourceLanguage
- The default source language to use, e.g. Java
.public void setSourceHighlighter(java.lang.String sourceHighlighter)
sourceHighlighter
- One of the constants mentioned above.public void setMaxIncludeDepth(int maxIncludeDepth)
maxIncludeDepth
- A positive integer.public void setSectNumLevels(int sectNumLevels)
sectNumLevels
- A positive integer.public void setHardbreaks(boolean hardbreaks)
hardbreaks
- true
to enable preserving of line breaks in paragraphspublic void setCacheUri(boolean cacheUri)
cacheUri
- true
to enable caching of content read from URIspublic void setHideUriScheme(boolean hideUriScheme)
hideUriScheme
- public void setAppendixCaption(java.lang.String appendixCaption)
Appendix
appendixCaption
- The string that is prefixed to the section name in the appendix.public void setMath(java.lang.String math)
math
- The name of the interpreter, i.e. either asciimath
or latexmath
.public void setSkipFrontMatter(boolean skipFrontMatter)
skipFrontMatter
- value.public void setAnchors(boolean setAnchors)
setAnchors
- value.public void setUntitledLabel(java.lang.String untitledLabel)
untitledLabel
- value.public void setIgnoreUndefinedAttributes(boolean ignoreUndefinedAttributes)
ignoreUndefinedAttributes
- value.public void setTableOfContents2(Placement placement)
placement
- where toc is rendered.public void setTableOfContents(Placement placement)
placement
- position of toc.public void setTocLevels(int levels)
levels
- number of levels which should be shown in the toc.public void setShowTitle(boolean showTitle)
showTitle
- value.public void setTableOfContents(boolean toc)
toc
- value.public void setLocalDate(java.util.Date localDate)
localDate
- object.public void setLocalTime(java.util.Date localTime)
localTime
- object.public void setDocDate(java.util.Date docDate)
docDate
- object.public void setDocTime(java.util.Date docTime)
docTime
- object.public void setStyleSheetName(java.lang.String styleSheetName)
styleSheetName
- of css file.public void unsetStyleSheet()
public void setStylesDir(java.lang.String stylesDir)
stylesDir
- directory.public void setLinkCss(boolean linkCss)
linkCss
- true if css is linked, false if css is embedded.public void setCopyCss(boolean copyCss)
copyCss
- true if css should be copied to the output location, false otherwise.public void setIcons(java.lang.String iconsName)
iconsName
- value.public void setIconFontRemote(boolean iconFontRemote)
iconFontRemote
- true if attribute enabled false otherwise.public void setIconFontCdn(java.net.URI cdnUri)
cdnUri
- uri where css is stored.public void setIconFontName(java.lang.String iconFontName)
iconFontName
- stylesheet name without .css extension.public void setDataUri(boolean dataUri)
dataUri
- true if images should be embedded, false otherwise.public void setIconsDir(java.lang.String iconsDir)
iconsDir
- public void setSectionNumbers(boolean sectionNumbers)
sectionNumbers
- public void setLinkAttrs(boolean linkAttrs)
linkAttrs
- true if Asciidoctor should parse link macro attributes, false otherwise.public void setExperimental(boolean experimental)
experimental
- true if experimental features should be enabled, false otherwise.public void setNoFooter(boolean noFooter)
noFooter
- true if the footer block should not be shown, false otherwise.public void setCompatMode(CompatMode compatMode)
compatMode
- value.public void setAttribute(java.lang.String attributeName, java.lang.Object attributeValue)
public void setAttributes(java.lang.String attributes)
attributes
- in string format.public void setAttributes(java.lang.String... attributes)
attributes
- in array format.public void setAttributes(java.util.Map<java.lang.String,java.lang.Object> attributes)
attributes
- to add.public static java.lang.String toAsciidoctorFlag(boolean flag)
@Deprecated public java.util.Map<java.lang.String,java.lang.Object> map()