Class/Object

laika.ast

DocumentCursor

Related Docs: object DocumentCursor | package ast

Permalink

case class DocumentCursor(target: Document, parent: TreeCursor, resolver: ReferenceResolver, config: Config, position: TreePosition) extends Cursor with Product with Serializable

Cursor for a single document, its parent and root directories, its associated template and other context information that is required during a rewrite operation.

target

the document this cursor points to

parent

the parent document tree of the referred document

resolver

the resolver for references in templates

config

the configuration associated with the target document

position

the position of the target document inside a tree hierarchy

Self Type
DocumentCursor
Linear Supertypes
Serializable, Serializable, Product, Equals, Cursor, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. DocumentCursor
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. Cursor
  7. AnyRef
  8. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new DocumentCursor(target: Document, parent: TreeCursor, resolver: ReferenceResolver, config: Config, position: TreePosition)

    Permalink

    target

    the document this cursor points to

    parent

    the parent document tree of the referred document

    resolver

    the resolver for references in templates

    config

    the configuration associated with the target document

    position

    the position of the target document inside a tree hierarchy

Type Members

  1. type Target = Document

    Permalink

    The type of the target this cursor points to.

    The type of the target this cursor points to.

    Definition Classes
    DocumentCursorCursor

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. val config: Config

    Permalink

    the configuration associated with the target document

    the configuration associated with the target document

    Definition Classes
    DocumentCursorCursor
  7. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  8. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  10. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  11. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  12. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  13. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  14. val parent: TreeCursor

    Permalink

    the parent document tree of the referred document

  15. val position: TreePosition

    Permalink

    the position of the target document inside a tree hierarchy

    the position of the target document inside a tree hierarchy

    Definition Classes
    DocumentCursorCursor
  16. def resolveReference(path: String): Option[Any]

    Permalink

    Resolves the context reference with the specified path relative to this document.

    Resolves the context reference with the specified path relative to this document. A reference config.value for example will first look up the value in the configuration of this document and then, if not found, recursively look it up in parent trees until the root tree is reached. If the value is not found None will be returned.

  17. val resolver: ReferenceResolver

    Permalink

    the resolver for references in templates

  18. def rewriteTarget(rule: RewriteRule): Document

    Permalink

    Returns a new, rewritten document model based on the specified rewrite rule.

  19. lazy val root: TreeCursor

    Permalink

    The root cursor for this document tree.

    The root cursor for this document tree.

    Definition Classes
    DocumentCursorCursor
  20. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  21. val target: Document

    Permalink

    the document this cursor points to

    the document this cursor points to

    Definition Classes
    DocumentCursorCursor
  22. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  23. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  24. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  25. def withReferenceContext(refValue: Any): DocumentCursor

    Permalink

    Creates a copy of this cursor with a new root object for resolving references.

    Creates a copy of this cursor with a new root object for resolving references. This is useful for custom template directives which need to provide a new scope for a nested part inside the directive tags.

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from Cursor

Inherited from AnyRef

Inherited from Any

Ungrouped