org.asciidoctor
Class AttributesBuilder

java.lang.Object
  extended by org.asciidoctor.AttributesBuilder

public class AttributesBuilder
extends Object


Method Summary
 Map<String,Object> asMap()
          Gets a map with configured options.
 AttributesBuilder attribute(String attributeName)
          Sets custom or unlisted attribute to the default value, empty string.
 AttributesBuilder attribute(String attributeName, Object attributeValue)
          Sets custom or unlisted attribute
static AttributesBuilder attributes()
          Creates attributes builder.
 AttributesBuilder attributes(Map<String,Object> attributes)
          Adds all attributes.
 AttributesBuilder attributes(String... attributes)
          Sets attributes in array form.
 AttributesBuilder attributes(String attributes)
          Sets attributes in string form.
 AttributesBuilder backend(String backend)
          Sets backend attribue.
 AttributesBuilder copyCss(boolean copyCss)
          Sets copy css attribute.
 AttributesBuilder dataUri(boolean dataUri)
          Sets data-uri attribute.
 AttributesBuilder docDate(Date date)
          Sets doc date for current document.
 AttributesBuilder docTime(Date time)
          Sets doc time for current document.
 AttributesBuilder docType(String docType)
          Sets doc type attribute.
 AttributesBuilder experimental(boolean experimental)
          Sets experimental attribute.
 Attributes get()
           
 AttributesBuilder icons(String icons)
          Sets which admonition icons to use.
 AttributesBuilder iconsDir(String iconsDir)
          Sets icons directory location.
 AttributesBuilder imagesDir(String imagesDir)
          Sets image directory.
 AttributesBuilder linkAttrs(boolean linkAttrs)
          Sets linkattrs attribute.
 AttributesBuilder linkCss(boolean linkCss)
          Sets link css attribute.
 AttributesBuilder localDate(Date date)
          Sets local date for document.
 AttributesBuilder localTime(Date time)
          Sets local time for document.
 AttributesBuilder sectionNumbers(boolean sectionNumbers)
          Auto-number section titles in the HTML backend.
 AttributesBuilder sourceHighlighter(String sourceHighlighter)
          Sets source highlighter processor.
 AttributesBuilder stylesDir(String stylesDir)
          Sets the styles dir.
 AttributesBuilder styleSheetName(String styleSheetName)
          Sets stylesheet name.
 AttributesBuilder tableOfContents(boolean toc)
          Sets if table of contents should be rendered or not
 AttributesBuilder title(String title)
          Sets title of document.
 AttributesBuilder unsetStyleSheet()
          Unsets stylesheet name so document will be generated without style.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

attributes

public static AttributesBuilder attributes()
Creates attributes builder.

Returns:
atributes builder.

backend

public AttributesBuilder backend(String backend)
Sets backend attribue.

Parameters:
backend - value.
Returns:
this instance.

title

public AttributesBuilder title(String title)
Sets title of document.

Parameters:
title - for document.
Returns:
this instance.

docType

public AttributesBuilder docType(String docType)
Sets doc type attribute.

Parameters:
docType - value.
Returns:
this instance.

imagesDir

public AttributesBuilder imagesDir(String imagesDir)
Sets image directory.

Parameters:
imagesDir - location.
Returns:
this instance.

sourceHighlighter

public AttributesBuilder sourceHighlighter(String sourceHighlighter)
Sets source highlighter processor. It should be supported by asciidoctor.

Parameters:
sourcehighlighter - processor.
Returns:
this instance.

localDate

public AttributesBuilder localDate(Date date)
Sets local date for document.

Parameters:
date -
Returns:
this instance.

localTime

public AttributesBuilder localTime(Date time)
Sets local time for document.

Parameters:
time -
Returns:
this instance.

docDate

public AttributesBuilder docDate(Date date)
Sets doc date for current document.

Parameters:
date -
Returns:
this instance.

docTime

public AttributesBuilder docTime(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(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(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(String icons)
Sets which admonition icons to use. Attributes.ORIGINAL_ADMONITION_ICONS_WITH_IMG constant can be used to use the original icons with images.

Parameters:
icons - value.
Returns:
this instance.

iconsDir

public AttributesBuilder iconsDir(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(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 in the HTML backend.

Parameters:
sectionNumbers - true if numbers should be autonumbered, false otherwise.
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.

attribute

public AttributesBuilder attribute(String attributeName,
                                   Object attributeValue)
Sets custom or unlisted attribute

Parameters:
attributeName -
attributeValue -
Returns:
this instance.

attributes

public AttributesBuilder attributes(Map<String,Object> attributes)
Adds all attributes.

Parameters:
attributes - map.
Returns:
this instance.

attributes

public AttributesBuilder attributes(String attributes)
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.
Returns:
this instance.

attributes

public AttributesBuilder attributes(String... attributes)
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.
Returns:
this instance.

asMap

public Map<String,Object> asMap()
Gets a map with configured options.

Returns:
map with all options. By default an empty map is returned.

get

public Attributes get()


Copyright © 2013. All Rights Reserved.