Package org.asciidoctor.jruby.ast.impl
Class ContentNodeImpl
- java.lang.Object
-
- org.asciidoctor.jruby.internal.RubyObjectWrapper
-
- org.asciidoctor.jruby.ast.impl.ContentNodeImpl
-
- All Implemented Interfaces:
ContentNode
- Direct Known Subclasses:
ColumnImpl
,PhraseNodeImpl
,StructuralNodeImpl
public abstract class ContentNodeImpl extends RubyObjectWrapper implements ContentNode
-
-
Field Summary
-
Fields inherited from class org.asciidoctor.jruby.internal.RubyObjectWrapper
rubyNode, runtime
-
-
Constructor Summary
Constructors Constructor Description ContentNodeImpl(org.jruby.runtime.builtin.IRubyObject rubyNode)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addRole(java.lang.String role)
java.lang.String
context()
Deprecated.Document
document()
Deprecated.java.lang.Object
getAttr(java.lang.Object name)
Deprecated.java.lang.Object
getAttr(java.lang.Object name, java.lang.Object defaultValue)
Deprecated.java.lang.Object
getAttr(java.lang.Object name, java.lang.Object defaultValue, boolean inherit)
Deprecated.java.lang.Object
getAttribute(java.lang.Object name)
java.lang.Object
getAttribute(java.lang.Object name, java.lang.Object defaultValue)
java.lang.Object
getAttribute(java.lang.Object name, java.lang.Object defaultValue, boolean inherit)
java.util.Map<java.lang.String,java.lang.Object>
getAttributes()
java.lang.String
getContext()
Document
getDocument()
java.lang.String
getId()
java.lang.String
getNodeName()
ContentNode
getParent()
java.lang.String
getReftext()
java.lang.String
getRole()
java.util.List<java.lang.String>
getRoles()
boolean
hasAttr(java.lang.Object name)
Deprecated.boolean
hasAttr(java.lang.Object name, boolean inherited)
Deprecated.boolean
hasAttribute(java.lang.Object name)
boolean
hasAttribute(java.lang.Object name, boolean inherited)
boolean
hasRole(java.lang.String role)
java.lang.String
iconUri(java.lang.String name)
java.lang.String
id()
Deprecated.java.lang.String
imageUri(java.lang.String targetImage)
java.lang.String
imageUri(java.lang.String targetImage, java.lang.String assetDirKey)
boolean
isAttr(java.lang.Object name, java.lang.Object expected)
Deprecated.boolean
isAttr(java.lang.Object name, java.lang.Object expected, boolean inherit)
Deprecated.boolean
isAttribute(java.lang.Object name, java.lang.Object expected)
boolean
isAttribute(java.lang.Object name, java.lang.Object expected, boolean inherit)
boolean
isBlock()
boolean
isInline()
boolean
isOption(java.lang.Object name)
boolean
isReftext()
boolean
isRole()
java.lang.String
mediaUri(java.lang.String target)
java.lang.String
normalizeWebPath(java.lang.String path, java.lang.String start, boolean preserveUriTarget)
ContentNode
parent()
Deprecated.java.lang.String
readAsset(java.lang.String path, java.util.Map<java.lang.Object,java.lang.Object> opts)
void
removeRole(java.lang.String role)
java.lang.String
role()
Deprecated.boolean
setAttr(java.lang.Object name, java.lang.Object value, boolean overwrite)
Deprecated.boolean
setAttribute(java.lang.Object name, java.lang.Object value, boolean overwrite)
void
setId(java.lang.String id)
-
Methods inherited from class org.asciidoctor.jruby.internal.RubyObjectWrapper
getBoolean, getInt, getList, getProperty, getRubyObject, getRubyProperty, getRuntime, getString, getSymbol, setBoolean, setInt, setRubyProperty, setString, setSymbol, toJava, toJava
-
-
-
-
Method Detail
-
id
@Deprecated public java.lang.String id()
Deprecated.- Specified by:
id
in interfaceContentNode
- Returns:
- A unique ID for this node
-
getId
public java.lang.String getId()
- Specified by:
getId
in interfaceContentNode
- Returns:
- A unique ID for this node
-
setId
public void setId(java.lang.String id)
- Specified by:
setId
in interfaceContentNode
-
context
@Deprecated public java.lang.String context()
Deprecated.- Specified by:
context
in interfaceContentNode
-
getContext
public java.lang.String getContext()
- Specified by:
getContext
in interfaceContentNode
-
parent
@Deprecated public ContentNode parent()
Deprecated.- Specified by:
parent
in interfaceContentNode
-
getParent
public ContentNode getParent()
- Specified by:
getParent
in interfaceContentNode
-
document
@Deprecated public Document document()
Deprecated.- Specified by:
document
in interfaceContentNode
-
getDocument
public Document getDocument()
- Specified by:
getDocument
in interfaceContentNode
-
getNodeName
public java.lang.String getNodeName()
- Specified by:
getNodeName
in interfaceContentNode
-
isInline
public boolean isInline()
- Specified by:
isInline
in interfaceContentNode
-
isBlock
public boolean isBlock()
- Specified by:
isBlock
in interfaceContentNode
-
getAttributes
public java.util.Map<java.lang.String,java.lang.Object> getAttributes()
- Specified by:
getAttributes
in interfaceContentNode
-
getAttr
@Deprecated public java.lang.Object getAttr(java.lang.Object name, java.lang.Object defaultValue, boolean inherit)
Deprecated.- Specified by:
getAttr
in interfaceContentNode
- Returns:
-
getAttr
@Deprecated public java.lang.Object getAttr(java.lang.Object name, java.lang.Object defaultValue)
Deprecated.- Specified by:
getAttr
in interfaceContentNode
- Returns:
-
getAttr
@Deprecated public java.lang.Object getAttr(java.lang.Object name)
Deprecated.- Specified by:
getAttr
in interfaceContentNode
- Returns:
-
getAttribute
public java.lang.Object getAttribute(java.lang.Object name, java.lang.Object defaultValue, boolean inherit)
- Specified by:
getAttribute
in interfaceContentNode
-
getAttribute
public java.lang.Object getAttribute(java.lang.Object name, java.lang.Object defaultValue)
- Specified by:
getAttribute
in interfaceContentNode
-
getAttribute
public java.lang.Object getAttribute(java.lang.Object name)
- Specified by:
getAttribute
in interfaceContentNode
-
isAttr
@Deprecated public boolean isAttr(java.lang.Object name, java.lang.Object expected, boolean inherit)
Deprecated.- Specified by:
isAttr
in interfaceContentNode
- Returns:
-
isAttr
@Deprecated public boolean isAttr(java.lang.Object name, java.lang.Object expected)
Deprecated.- Specified by:
isAttr
in interfaceContentNode
- Returns:
-
isAttribute
public boolean isAttribute(java.lang.Object name, java.lang.Object expected, boolean inherit)
- Specified by:
isAttribute
in interfaceContentNode
- Returns:
-
isAttribute
public boolean isAttribute(java.lang.Object name, java.lang.Object expected)
- Specified by:
isAttribute
in interfaceContentNode
- Returns:
-
hasAttr
@Deprecated public boolean hasAttr(java.lang.Object name)
Deprecated.- Specified by:
hasAttr
in interfaceContentNode
- Returns:
true
if this node or the document has an attribute with the given name
-
hasAttr
@Deprecated public boolean hasAttr(java.lang.Object name, boolean inherited)
Deprecated.- Specified by:
hasAttr
in interfaceContentNode
- Returns:
true
if the current node or depending on the inherited parameter the document has an attribute with the given name.
-
hasAttribute
public boolean hasAttribute(java.lang.Object name)
- Specified by:
hasAttribute
in interfaceContentNode
- Returns:
true
if this node or the document has an attribute with the given name
-
hasAttribute
public boolean hasAttribute(java.lang.Object name, boolean inherited)
- Specified by:
hasAttribute
in interfaceContentNode
- Returns:
true
if the current node or depending on the inherited parameter the document has an attribute with the given name.
-
setAttr
@Deprecated public boolean setAttr(java.lang.Object name, java.lang.Object value, boolean overwrite)
Deprecated.- Specified by:
setAttr
in interfaceContentNode
- Returns:
-
setAttribute
public boolean setAttribute(java.lang.Object name, java.lang.Object value, boolean overwrite)
- Specified by:
setAttribute
in interfaceContentNode
-
isOption
public boolean isOption(java.lang.Object name)
- Specified by:
isOption
in interfaceContentNode
-
isRole
public boolean isRole()
- Specified by:
isRole
in interfaceContentNode
-
getRole
public java.lang.String getRole()
- Specified by:
getRole
in interfaceContentNode
-
role
@Deprecated public java.lang.String role()
Deprecated.- Specified by:
role
in interfaceContentNode
-
getRoles
public java.util.List<java.lang.String> getRoles()
- Specified by:
getRoles
in interfaceContentNode
-
hasRole
public boolean hasRole(java.lang.String role)
- Specified by:
hasRole
in interfaceContentNode
-
addRole
public void addRole(java.lang.String role)
- Specified by:
addRole
in interfaceContentNode
-
removeRole
public void removeRole(java.lang.String role)
- Specified by:
removeRole
in interfaceContentNode
-
isReftext
public boolean isReftext()
- Specified by:
isReftext
in interfaceContentNode
-
getReftext
public java.lang.String getReftext()
- Specified by:
getReftext
in interfaceContentNode
-
iconUri
public java.lang.String iconUri(java.lang.String name)
- Specified by:
iconUri
in interfaceContentNode
-
mediaUri
public java.lang.String mediaUri(java.lang.String target)
- Specified by:
mediaUri
in interfaceContentNode
-
imageUri
public java.lang.String imageUri(java.lang.String targetImage)
- Specified by:
imageUri
in interfaceContentNode
-
imageUri
public java.lang.String imageUri(java.lang.String targetImage, java.lang.String assetDirKey)
- Specified by:
imageUri
in interfaceContentNode
-
readAsset
public java.lang.String readAsset(java.lang.String path, java.util.Map<java.lang.Object,java.lang.Object> opts)
- Specified by:
readAsset
in interfaceContentNode
-
normalizeWebPath
public java.lang.String normalizeWebPath(java.lang.String path, java.lang.String start, boolean preserveUriTarget)
- Specified by:
normalizeWebPath
in interfaceContentNode
-
-