Package org.asciidoctor.ast
Interface StructuralNode
-
- All Superinterfaces:
ContentNode
- All Known Implementing Classes:
BlockImpl
,DescriptionListEntryImpl
,DescriptionListImpl
,DocumentImpl
,ListImpl
,ListItemImpl
,SectionImpl
,StructuralNodeImpl
,TableImpl
public interface StructuralNode extends ContentNode
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
SUBSTITUTION_ATTRIBUTES
Constant for attribute replacements like{foo}
.static java.lang.String
SUBSTITUTION_MACROS
Constant for macro replacements likemymacro:target[]
.static java.lang.String
SUBSTITUTION_POST_REPLACEMENTS
Constant for post replacements like creating line breaks from a trailing+
in a line.static java.lang.String
SUBSTITUTION_QUOTES
Constant for quote replacements like*bold*
tobold
.static java.lang.String
SUBSTITUTION_REPLACEMENTS
Constant for replacements like(C)
to©
.static java.lang.String
SUBSTITUTION_SPECIAL_CHARACTERS
Constant for special character replacement substitution like<
to&lt;
.
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description void
addSubstitution(java.lang.String substitution)
Adds the given substitution to this node at the end of the substitution list.void
append(StructuralNode block)
Appends a new child block as the last block to this block.java.util.List<StructuralNode>
blocks()
Deprecated.Please use getBlocks() insteadjava.lang.Object
content()
Deprecated.Please use getContent() insteadjava.lang.String
convert()
java.util.List<StructuralNode>
findBy(java.util.Map<java.lang.Object,java.lang.Object> selector)
java.util.List<StructuralNode>
getBlocks()
java.lang.String
getCaption()
java.lang.Object
getContent()
java.lang.String
getContentModel()
Returns the content model.int
getLevel()
Cursor
getSourceLocation()
Returns the source location of this block.java.lang.String
getStyle()
java.util.List<java.lang.String>
getSubstitutions()
Returns the list of enabled substitutions.java.lang.String
getTitle()
boolean
isSubstitutionEnabled(java.lang.String substitution)
void
prependSubstitution(java.lang.String substitution)
Adds the given substitution to this node at the beginning of the substitution list.void
removeSubstitution(java.lang.String substitution)
Removes the given substitution from this node.void
setCaption(java.lang.String caption)
void
setLevel(int level)
void
setStyle(java.lang.String style)
void
setSubstitutions(java.lang.String... substitution)
Sets the given substitutions on this node overwriting all other substitutions.void
setTitle(java.lang.String title)
java.lang.String
style()
Deprecated.Please use getStyle() insteadjava.lang.String
title()
Deprecated.Please use getTitle() instead-
Methods 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 Detail
-
SUBSTITUTION_SPECIAL_CHARACTERS
static final java.lang.String SUBSTITUTION_SPECIAL_CHARACTERS
Constant for special character replacement substitution like<
to&lt;
.- See Also:
- Asciidoctor User Manual, Constant Field Values
-
SUBSTITUTION_QUOTES
static final java.lang.String SUBSTITUTION_QUOTES
Constant for quote replacements like*bold*
tobold
.- See Also:
- Asciidoctor User Manual, Constant Field Values
-
SUBSTITUTION_ATTRIBUTES
static final java.lang.String SUBSTITUTION_ATTRIBUTES
Constant for attribute replacements like{foo}
.- See Also:
- Asciidoctor User Manual, Constant Field Values
-
SUBSTITUTION_REPLACEMENTS
static final java.lang.String SUBSTITUTION_REPLACEMENTS
Constant for replacements like(C)
to©
.- See Also:
- Asciidoctor User Manual, Constant Field Values
-
SUBSTITUTION_MACROS
static final java.lang.String SUBSTITUTION_MACROS
Constant for macro replacements likemymacro:target[]
.- See Also:
- Asciidoctor User Manual, Constant Field Values
-
SUBSTITUTION_POST_REPLACEMENTS
static final java.lang.String SUBSTITUTION_POST_REPLACEMENTS
Constant for post replacements like creating line breaks from a trailing+
in a line.- See Also:
- Asciidoctor User Manual, Constant Field Values
-
-
Method Detail
-
title
@Deprecated java.lang.String title()
Deprecated.Please use getTitle() instead
-
getTitle
java.lang.String getTitle()
-
setTitle
void setTitle(java.lang.String title)
-
getCaption
java.lang.String getCaption()
-
setCaption
void setCaption(java.lang.String caption)
-
style
@Deprecated java.lang.String style()
Deprecated.Please use getStyle() instead
-
getStyle
java.lang.String getStyle()
-
setStyle
void setStyle(java.lang.String style)
-
blocks
@Deprecated java.util.List<StructuralNode> blocks()
Deprecated.Please use getBlocks() instead- Returns:
- The list of child blocks of this block
-
getBlocks
java.util.List<StructuralNode> getBlocks()
- Returns:
- The list of child blocks of this block
-
append
void append(StructuralNode block)
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 java.lang.Object content()
Deprecated.Please use getContent() instead
-
getContent
java.lang.Object getContent()
-
convert
java.lang.String convert()
-
findBy
java.util.List<StructuralNode> findBy(java.util.Map<java.lang.Object,java.lang.Object> selector)
-
getLevel
int getLevel()
-
setLevel
void setLevel(int level)
-
getContentModel
java.lang.String getContentModel()
Returns the content model.- Returns:
- the content model
- See Also:
ContentModel
-
getSourceLocation
Cursor getSourceLocation()
Returns the source location of this block. This information is only available if thesourcemap
option is enabled when loading or rendering the document.- Returns:
- the source location of this block or
null
if thesourcemap
option is not enabled when loading the document.
-
getSubstitutions
java.util.List<java.lang.String> 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:
- Asciidoctor User Manual
-
isSubstitutionEnabled
boolean isSubstitutionEnabled(java.lang.String substitution)
- Parameters:
substitution
- the name of a substitution, e.g.SUBSTITUTION_POST_REPLACEMENTS
- Returns:
true
if the name of the given substitution is enabled.- See Also:
- Asciidoctor User Manual
-
removeSubstitution
void removeSubstitution(java.lang.String substitution)
Removes the given substitution from this node.- Parameters:
substitution
- the name of a substitution, e.g.SUBSTITUTION_QUOTES
- See Also:
- Asciidoctor User Manual
-
addSubstitution
void addSubstitution(java.lang.String substitution)
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:
- Asciidoctor User Manual
-
prependSubstitution
void prependSubstitution(java.lang.String substitution)
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:
- Asciidoctor User Manual
-
setSubstitutions
void setSubstitutions(java.lang.String... substitution)
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:
- Asciidoctor User Manual
-
-