Package org.asciidoctor.ast
Interface StructuralNode
- All Superinterfaces:
ContentNode
- All Known Implementing Classes:
BlockImpl,DescriptionListEntryImpl,DescriptionListImpl,DocumentImpl,ListImpl,ListItemImpl,SectionImpl,StructuralNodeImpl,TableImpl
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringConstant for attribute replacements like{foo}.static final StringConstant for macro replacements likemymacro:target[].static final StringConstant for post replacements like creating line breaks from a trailing+in a line.static final StringConstant for quote replacements like*bold*tobold.static final StringConstant for replacements like(C)to©.static final StringConstant for special character replacement substitution like<to&lt;. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddSubstitution(String substitution) Adds the given substitution to this node at the end of the substitution list.voidappend(StructuralNode block) Appends a new child block as the last block to this block.blocks()Deprecated.Please use getBlocks() insteadcontent()Deprecated.Please use getContent() insteadconvert()Returns the content model.intgetLevel()Returns the source location of this block.getStyle()Returns the list of enabled substitutions.getTitle()booleanisSubstitutionEnabled(String substitution) voidprependSubstitution(String substitution) Adds the given substitution to this node at the beginning of the substitution list.voidremoveSubstitution(String substitution) Removes the given substitution from this node.voidsetCaption(String caption) voidsetLevel(int level) voidvoidsetSubstitutions(String... substitution) Sets the given substitutions on this node overwriting all other substitutions.voidstyle()Deprecated.Please use getStyle() insteadtitle()Deprecated.Please use getTitle() insteadMethods inherited from interface org.asciidoctor.ast.ContentNode
addRole, context, document, getAttr, getAttr, getAttr, getAttribute, getAttribute, getAttribute, getAttributes, getContext, getDocument, getId, getNodeName, getParent, getReftext, getRole, getRoles, hasAttr, hasAttr, hasAttribute, hasAttribute, hasRole, iconUri, id, imageUri, imageUri, isAttr, isAttr, isAttribute, isAttribute, isBlock, isInline, isOption, isReftext, isRole, mediaUri, normalizeWebPath, parent, readAsset, removeRole, role, setAttr, setAttribute, setId
-
Field Details
-
SUBSTITUTION_SPECIAL_CHARACTERS
Constant for special character replacement substitution like<to&lt;.- See Also:
-
SUBSTITUTION_QUOTES
Constant for quote replacements like*bold*tobold.- See Also:
-
SUBSTITUTION_ATTRIBUTES
Constant for attribute replacements like{foo}.- See Also:
-
SUBSTITUTION_REPLACEMENTS
Constant for replacements like(C)to©.- See Also:
-
SUBSTITUTION_MACROS
Constant for macro replacements likemymacro:target[].- See Also:
-
SUBSTITUTION_POST_REPLACEMENTS
Constant for post replacements like creating line breaks from a trailing+in a line.- See Also:
-
-
Method Details
-
title
Deprecated.Please use getTitle() instead -
getTitle
String getTitle() -
setTitle
-
getCaption
String getCaption() -
setCaption
-
style
Deprecated.Please use getStyle() instead -
getStyle
String getStyle() -
setStyle
-
blocks
Deprecated.Please use getBlocks() instead- Returns:
- The list of child blocks of this block
-
getBlocks
List<StructuralNode> getBlocks()- Returns:
- The list of child blocks of this block
-
append
Appends a new child block as the last block to this block.- Parameters:
block- The new child block added as last child to this block.
-
content
Deprecated.Please use getContent() instead -
getContent
Object getContent() -
convert
String convert() -
findBy
-
getLevel
int getLevel() -
setLevel
void setLevel(int level) -
getContentModel
String getContentModel()Returns the content model.- Returns:
- the content model
- See Also:
-
getSourceLocation
Cursor getSourceLocation()Returns the source location of this block. This information is only available if thesourcemapoption is enabled when loading or rendering the document.- Returns:
- the source location of this block or
nullif thesourcemapoption is not enabled when loading the document.
-
getSubstitutions
Returns the list of enabled substitutions.- Returns:
- A list of substitutions enabled for this node, e.g.
["specialcharacters", "quotes", "attributes", "replacements", "macros", "post_replacements"]for paragraphs. - See Also:
-
isSubstitutionEnabled
- Parameters:
substitution- the name of a substitution, e.g.SUBSTITUTION_POST_REPLACEMENTS- Returns:
trueif the name of the given substitution is enabled.- See Also:
-
removeSubstitution
Removes the given substitution from this node.- Parameters:
substitution- the name of a substitution, e.g.SUBSTITUTION_QUOTES- See Also:
-
addSubstitution
Adds the given substitution to this node at the end of the substitution list.- Parameters:
substitution- the name of a substitution, e.g.SUBSTITUTION_MACROS- See Also:
-
prependSubstitution
Adds the given substitution to this node at the beginning of the substitution list.- Parameters:
substitution- the name of a substitution, e.g.SUBSTITUTION_ATTRIBUTES- See Also:
-
setSubstitutions
Sets the given substitutions on this node overwriting all other substitutions.- Parameters:
substitution- the name of a substitution, e.g.SUBSTITUTION_SPECIAL_CHARACTERS- See Also:
-