TreeCursor

laika.ast.TreeCursor
See theTreeCursor companion object
case class TreeCursor(target: DocumentTree, parent: Option[TreeCursor], root: RootCursor, config: Config, position: TreePosition) extends Cursor

Cursor for an entire document tree, providing access to all child cursors of this tree and allowing to trigger rewrite operations.

Value parameters

config

the configuration associated with this tree

parent

the immediate parent of this tree or None if this is the root

position

the position of this tree within the document tree

root

the root of this tree

target

the document tree this cursor points to

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait Cursor
class Object
trait Matchable
class Any
Show all

Members list

Type members

Types

The type of the target this cursor points to.

The type of the target this cursor points to.

Attributes

Value members

Concrete methods

Returns a new tree, with all the document models contained in it rewritten based on the specified rewrite rule.

Returns a new tree, with all the document models contained in it rewritten based on the specified rewrite rule.

Attributes

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product

Concrete fields

lazy val allDocuments: Seq[DocumentCursor]

All documents contained in this tree, fetched recursively, depth-first. This method behaves differently than the children method which only returns the cursors on this level of the tree hierarchy.

All documents contained in this tree, fetched recursively, depth-first. This method behaves differently than the children method which only returns the cursors on this level of the tree hierarchy.

Attributes

lazy val children: Seq[Cursor]

The cursors for all children of this node in the document tree.

The cursors for all children of this node in the document tree.

Attributes

val path: Path

The full, absolute path of the target of this cursor in the (virtual) document tree

The full, absolute path of the target of this cursor in the (virtual) document tree

Attributes

lazy val titleDocument: Option[DocumentCursor]

The cursor for the title document of this tree.

The cursor for the title document of this tree.

Attributes