Interface DomNode
- All Known Subinterfaces:
DefaultDomNode
,LinkDomNode
,ListDomNode
,TableCell
,TableDomNode
,TableRowDomNode
,TextDomNode
public interface DomNode
Node of
DomElement
content.- Since:
- 4.2.15
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionReturns all direct child nodes.getChildren
(boolean recursive) Returns children, maybe recursivly.@Nullable DomNode
Returns the first child node ornull
if there is no such node.@Nullable FormatTemplate
Returns node'sFormatTemplate
.@Nullable DomNode
Returns the next sibling node ornull
if there is no such node.Returns the node type.@Nullable DomNode
Returns the parent node ornull
if this node is a root node.getReferences
(boolean release) Returns all references, including reference to node'sFormatTemplate
.@Nullable String
Returns element's tag name.boolean
Returnstrue
if this element has children,false
otherwise.boolean
ReturnsFormatTemplate.isSystem()
.void
removeChild
(@NotNull DomNode child) Removes a child of the child list.@Nullable DomNode
replaceChild
(DomNode child, @NotNull String text) Replace a child with a new one at the same position the child list.
-
Method Details
-
getChildren
Returns all direct child nodes.- Returns:
- children.
- Since:
- 4.2.17
-
getChildren
Returns children, maybe recursivly.- Parameters:
recursive
-true
to include all nodes recursivly in depth-first-order.- Returns:
- children, maybe recursivly.
- Since:
- 4.2.17
-
getNodeType
DomNodeType getNodeType()Returns the node type.- Since:
- 4.2.17
-
getNextSibling
Returns the next sibling node ornull
if there is no such node.- Since:
- 4.2.17
-
getFirstChild
Returns the first child node ornull
if there is no such node.- Since:
- 4.2.17
-
removeChild
Removes a child of the child list.- Since:
- 4.2.17
-
replaceChild
Replace a child with a new one at the same position the child list.- Since:
- 5.0.104
-
getParent
Returns the parent node ornull
if this node is a root node.- Returns:
- Parent node or
null
if this node is a root node. - Since:
- 4.2.15
-
getTagName
Returns element's tag name. For text nodes it returns parent's tag name.- Returns:
- element's tag name.
- Since:
- 4.2.15
-
hasChildren
boolean hasChildren()Returnstrue
if this element has children,false
otherwise.- Returns:
true
if this element has children,false
otherwise.- Since:
- 4.2.15
-
isSystemTemplate
boolean isSystemTemplate()ReturnsFormatTemplate.isSystem()
.- Returns:
FormatTemplate.isSystem()
- Since:
- 4.2.15
-
getFormatTemplate
Returns node'sFormatTemplate
. For text nodes it returns parent'sFormatTemplate
.
Maybenull
in case of missing format templates or if this node is the root node.- Returns:
- node's
FormatTemplate
. - Since:
- 4.2.15
-
getReferences
Returns all references, including reference to node'sFormatTemplate
.- Parameters:
release
-true
to return release references,false
to return references of current store.- Returns:
- all references
- Since:
- 4.2.15
-