Package org.asciidoctor.ast
Interface Document
-
- All Superinterfaces:
ContentNode
,StructuralNode
- All Known Implementing Classes:
DocumentImpl
public interface Document extends StructuralNode
-
-
Field Summary
-
Fields inherited from interface org.asciidoctor.ast.StructuralNode
SUBSTITUTION_ATTRIBUTES, SUBSTITUTION_MACROS, SUBSTITUTION_POST_REPLACEMENTS, SUBSTITUTION_QUOTES, SUBSTITUTION_REPLACEMENTS, SUBSTITUTION_SPECIAL_CHARACTERS
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
getAndIncrementCounter(java.lang.String name)
Gets the current counter with the given name and increases its value.int
getAndIncrementCounter(java.lang.String name, int initialValue)
Gets the current counter with the given name and increases its value.java.util.List<Author>
getAuthors()
Gets the author(s) information as defined in the author line in the document header, or in author & email attributes.Catalog
getCatalog()
The catalog contains data collected by asciidoctor that is useful to a converter.java.lang.String
getDoctitle()
java.util.Map<java.lang.Object,java.lang.Object>
getOptions()
RevisionInfo
getRevisionInfo()
The revision information with: date, number and remark.java.lang.String
getSource()
Make the raw source for the Document available.java.util.List<java.lang.String>
getSourceLines()
Make the raw source lines for the Document available.Title
getStructuredDoctitle()
boolean
isBasebackend(java.lang.String backend)
boolean
isSourcemap()
void
setSourcemap(boolean state)
Toggles the sourcemap option.-
Methods inherited from interface org.asciidoctor.ast.ContentNode
addRole, getAttribute, getAttribute, getAttribute, getAttributes, getContext, getDocument, getId, getNodeName, getParent, getReftext, getRole, getRoles, hasAttribute, hasAttribute, hasRole, iconUri, imageUri, imageUri, isAttribute, isAttribute, isBlock, isInline, isOption, isReftext, isRole, mediaUri, normalizeWebPath, readAsset, removeRole, setAttribute, setContext, setId
-
Methods inherited from interface org.asciidoctor.ast.StructuralNode
addSubstitution, append, convert, findBy, getBlocks, getCaption, getContent, getContentModel, getLevel, getSourceLocation, getStyle, getSubstitutions, getTitle, isSubstitutionEnabled, prependSubstitution, removeSubstitution, setCaption, setLevel, setStyle, setSubstitutions, setTitle
-
-
-
-
Method Detail
-
getStructuredDoctitle
Title getStructuredDoctitle()
- Returns:
- The Title structure for this document.
- See Also:
Title
-
getDoctitle
java.lang.String getDoctitle()
- Returns:
- The title as a String.
- See Also:
Title
-
getAuthors
java.util.List<Author> getAuthors()
Gets the author(s) information as defined in the author line in the document header, or in author & email attributes.- Returns:
- The authors information
- See Also:
Author
-
getSource
java.lang.String getSource()
Make the raw source for the Document available. Trailing white characters (spaces, line breaks, etc.) are removed.- Returns:
- Raw content as String
-
getSourceLines
java.util.List<java.lang.String> getSourceLines()
Make the raw source lines for the Document available.- Returns:
- Raw content as List
-
isBasebackend
boolean isBasebackend(java.lang.String backend)
- Returns:
- 'basebackend' attribute value
-
getOptions
java.util.Map<java.lang.Object,java.lang.Object> getOptions()
- Returns:
- Options defined in the document
-
getAndIncrementCounter
int getAndIncrementCounter(java.lang.String name)
Gets the current counter with the given name and increases its value. At the first invocation the counter will return 1. After the call the value of the counter is set to the returned value plus 1.- Parameters:
name
- name of the counter- Returns:
- Value before increment plus 1
-
getAndIncrementCounter
int getAndIncrementCounter(java.lang.String name, int initialValue)
Gets the current counter with the given name and increases its value. At the first invocation the counter will return the given initial value. After the call the value of the counter is set to the returned value plus 1.- Parameters:
name
- name of the counterinitialValue
- value to start counter from- Returns:
- Value before increment plus 1
-
isSourcemap
boolean isSourcemap()
- Returns:
- Whether the sourcemap is enabled
-
setSourcemap
void setSourcemap(boolean state)
Toggles the sourcemap option.This method must be called before the document is parsed, such as from a Preprocessor extension. Otherwise, it has no effect.
- Parameters:
state
- State in which to put the sourcemap (true = on, false = off)
-
getCatalog
Catalog getCatalog()
The catalog contains data collected by asciidoctor that is useful to a converter.- Returns:
- Catalog assets
- See Also:
Catalog
-
getRevisionInfo
RevisionInfo getRevisionInfo()
The revision information with: date, number and remark.- Returns:
- revisionInfo
- See Also:
RevisionInfo
-
-