Package org.asciidoctor.ast
Interface Section
-
- All Superinterfaces:
ContentNode
,StructuralNode
- All Known Implementing Classes:
SectionImpl
public interface Section 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
getIndex()
java.lang.String
getNumeral()
Section numeral.java.lang.String
getSectionName()
java.lang.String
getSectnum()
Get the section number for the current Section.java.lang.String
getSectnum(java.lang.String delimiter)
Get the section number for the current Section.boolean
isNumbered()
boolean
isSpecial()
-
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
-
getIndex
int getIndex()
- Returns:
- the 0-based index order of this section within the parent block
-
getNumeral
java.lang.String getNumeral()
Section numeral.This is a roman numeral for book parts, arabic numeral for regular sections, and a letter for special sections.
- Returns:
- the section numeral
-
getSectionName
java.lang.String getSectionName()
- Returns:
- the section name of this section
-
isSpecial
boolean isSpecial()
- Returns:
- Get the flag to indicate whether this is a special section or a child of one
-
isNumbered
boolean isNumbered()
- Returns:
- the state of the numbered attribute at this section (need to preserve for creating TOC)
-
getSectnum
java.lang.String getSectnum()
Get the section number for the current Section.The section number is a dot-separated String that uniquely describes the position of this Section in the document. Each entry represents a level of nesting. The value of each entry is the 1-based outline number of the Section amongst its numbered sibling Sections.
-
getSectnum
java.lang.String getSectnum(java.lang.String delimiter)
Get the section number for the current Section.The section number is a dot-separated String that uniquely describes the position of this Section in the document. Each entry represents a level of nesting. The value of each entry is the 1-based outline number of the Section amongst its numbered sibling Sections.
- Parameters:
delimiter
- the delimiter to separate the number for each level
-
-