Package org.asciidoctor.jruby.ast.impl
Class StructuralNodeImpl
java.lang.Object
org.asciidoctor.jruby.internal.RubyObjectWrapper
org.asciidoctor.jruby.ast.impl.ContentNodeImpl
org.asciidoctor.jruby.ast.impl.StructuralNodeImpl
- All Implemented Interfaces:
ContentNode,StructuralNode
- Direct Known Subclasses:
BlockImpl,DescriptionListEntryImpl,DescriptionListImpl,DocumentImpl,ListImpl,ListItemImpl,SectionImpl,TableImpl
-
Field Summary
Fields inherited from class org.asciidoctor.jruby.internal.RubyObjectWrapper
rubyNode, runtimeFields inherited from interface org.asciidoctor.ast.StructuralNode
SUBSTITUTION_ATTRIBUTES, SUBSTITUTION_MACROS, SUBSTITUTION_POST_REPLACEMENTS, SUBSTITUTION_QUOTES, SUBSTITUTION_REPLACEMENTS, SUBSTITUTION_SPECIAL_CHARACTERS -
Constructor Summary
Constructors -
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.content()Deprecated.convert()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... substitutions) Sets the given substitutions on this node overwriting all other substitutions.voidstyle()Deprecated.title()Deprecated.Methods inherited from class org.asciidoctor.jruby.ast.impl.ContentNodeImpl
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, setIdMethods inherited from class org.asciidoctor.jruby.internal.RubyObjectWrapper
getBoolean, getInt, getList, getProperty, getRubyObject, getRubyProperty, getRuntime, getString, getSymbol, setBoolean, setInt, setRubyProperty, setString, setSymbol, toJava, toJavaMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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
-
Constructor Details
-
StructuralNodeImpl
public StructuralNodeImpl(org.jruby.runtime.builtin.IRubyObject blockDelegate)
-
-
Method Details
-
title
Deprecated.- Specified by:
titlein interfaceStructuralNode
-
getTitle
- Specified by:
getTitlein interfaceStructuralNode
-
setTitle
- Specified by:
setTitlein interfaceStructuralNode
-
getCaption
- Specified by:
getCaptionin interfaceStructuralNode
-
setCaption
- Specified by:
setCaptionin interfaceStructuralNode
-
style
Deprecated.- Specified by:
stylein interfaceStructuralNode
-
getStyle
- Specified by:
getStylein interfaceStructuralNode
-
setStyle
- Specified by:
setStylein interfaceStructuralNode
-
blocks
Deprecated.- Specified by:
blocksin interfaceStructuralNode- Returns:
- The list of child blocks of this block
-
getBlocks
- Specified by:
getBlocksin interfaceStructuralNode- Returns:
- The list of child blocks of this block
-
append
Description copied from interface:StructuralNodeAppends a new child block as the last block to this block.- Specified by:
appendin interfaceStructuralNode- Parameters:
block- The new child block added as last child to this block.
-
content
Deprecated.- Specified by:
contentin interfaceStructuralNode
-
getContent
- Specified by:
getContentin interfaceStructuralNode
-
convert
- Specified by:
convertin interfaceStructuralNode
-
getLevel
public int getLevel()- Specified by:
getLevelin interfaceStructuralNode
-
setLevel
public void setLevel(int level) - Specified by:
setLevelin interfaceStructuralNode
-
getSourceLocation
Description copied from interface:StructuralNodeReturns the source location of this block. This information is only available if thesourcemapoption is enabled when loading or rendering the document.- Specified by:
getSourceLocationin interfaceStructuralNode- Returns:
- the source location of this block or
nullif thesourcemapoption is not enabled when loading the document.
-
getContentModel
Description copied from interface:StructuralNodeReturns the content model.- Specified by:
getContentModelin interfaceStructuralNode- Returns:
- the content model
- See Also:
-
getSubstitutions
Description copied from interface:StructuralNodeReturns the list of enabled substitutions.- Specified by:
getSubstitutionsin interfaceStructuralNode- Returns:
- A list of substitutions enabled for this node, e.g.
["specialcharacters", "quotes", "attributes", "replacements", "macros", "post_replacements"]for paragraphs. - See Also:
-
isSubstitutionEnabled
- Specified by:
isSubstitutionEnabledin interfaceStructuralNode- Parameters:
substitution- the name of a substitution, e.g.StructuralNode.SUBSTITUTION_POST_REPLACEMENTS- Returns:
trueif the name of the given substitution is enabled.- See Also:
-
removeSubstitution
Description copied from interface:StructuralNodeRemoves the given substitution from this node.- Specified by:
removeSubstitutionin interfaceStructuralNode- Parameters:
substitution- the name of a substitution, e.g.StructuralNode.SUBSTITUTION_QUOTES- See Also:
-
addSubstitution
Description copied from interface:StructuralNodeAdds the given substitution to this node at the end of the substitution list.- Specified by:
addSubstitutionin interfaceStructuralNode- Parameters:
substitution- the name of a substitution, e.g.StructuralNode.SUBSTITUTION_MACROS- See Also:
-
prependSubstitution
Description copied from interface:StructuralNodeAdds the given substitution to this node at the beginning of the substitution list.- Specified by:
prependSubstitutionin interfaceStructuralNode- Parameters:
substitution- the name of a substitution, e.g.StructuralNode.SUBSTITUTION_ATTRIBUTES- See Also:
-
setSubstitutions
Description copied from interface:StructuralNodeSets the given substitutions on this node overwriting all other substitutions.- Specified by:
setSubstitutionsin interfaceStructuralNode- Parameters:
substitutions- the name of a substitution, e.g.StructuralNode.SUBSTITUTION_SPECIAL_CHARACTERS- See Also:
-
findBy
- Specified by:
findByin interfaceStructuralNode
-