Packages

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

Cursor for a single document, its parent, siblings 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

templatePath

the path of the template that has been applied to this document

position

the position of the target document inside a tree hierarchy

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

Instance Constructors

  1. new DocumentCursor(target: Document, parent: TreeCursor, resolver: ReferenceResolver, config: Config, templatePath: Option[Path], position: TreePosition)

    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

    templatePath

    the path of the template that has been applied to this document

    position

    the position of the target document inside a tree hierarchy

Type Members

  1. class Siblings extends AnyRef
  2. type Target = Document

    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
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  6. val config: Config

    The configuration associated with this node.

    The configuration associated with this node.

    Definition Classes
    DocumentCursorCursor
  7. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  8. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  9. def flattenedSiblings: Siblings

    Provides navigation capabilities to the siblings of this document where the entire hierarchical tree view is flattened into a single book-like list of documents.

  10. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  11. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  12. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. def nextDocument: Option[DocumentCursor]

    The next document in a hierarchical tree view or None if this cursor points to the last document in the current sub-tree.

    The next document in a hierarchical tree view or None if this cursor points to the last document in the current sub-tree. Use flattenedSiblings.nextDocument for navigation beyond the current sub-tree in a book-like flattened view.

  14. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  15. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  16. val parent: TreeCursor
  17. 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

    Definition Classes
    DocumentCursorCursor
  18. val position: TreePosition

    The position of this node within the document tree.

    The position of this node within the document tree.

    Definition Classes
    DocumentCursorCursor
  19. def previousDocument: Option[DocumentCursor]

    The previous document in a hierarchical tree view or None if this cursor points to the first document in the current sub-tree.

    The previous document in a hierarchical tree view or None if this cursor points to the first document in the current sub-tree. Use flattenedSiblings.previousDocument for navigation beyond the current sub-tree in a book-like flattened view.

  20. def productElementNames: Iterator[String]
    Definition Classes
    Product
  21. def resolveReference(key: Key): ConfigResult[Option[ConfigValue]]

    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.

  22. val resolver: ReferenceResolver
  23. def rewriteTarget(rules: RewriteRules): Document

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

  24. def rewriteTarget(rules: RewriteRulesBuilder): Either[DocumentConfigErrors, Document]

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

  25. lazy val root: RootCursor

    The root cursor for this document tree.

    The root cursor for this document tree.

    Definition Classes
    DocumentCursorCursor
  26. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  27. val target: Document

    The target within the document tree this cursor points to (a markup document or a sub-tree).

    The target within the document tree this cursor points to (a markup document or a sub-tree).

    Definition Classes
    DocumentCursorCursor
  28. val templatePath: Option[Path]
  29. def validate[L <: Link](link: L): Either[String, L]

    Validates the specified link, verifying that the target exists and supports a matching set of target formats.

    Validates the specified link, verifying that the target exists and supports a matching set of target formats. The returned link in case of successful validation might be a modified link with enhanced information for the renderer, which might translate internal links to external links for some output formats.

  30. def validate(target: InternalTarget): TargetValidation

    Validates the specified link, verifying that the target exists and supports a matching set of target formats.

    Validates the specified link, verifying that the target exists and supports a matching set of target formats. The returned ADT provides one of three possible outcomes, apart from a valid or invalid result, a target may also be a RecoveredTarget where the link target exists, but does not support all the output formats of the link source. In such a case some link types can switch to an external link, pointing to the location of the hosted html result of this document tree.

  31. def validateAndRecover(link: Link, source: SourceFragment): Span

    Validates the specified link, verifying that the target exists and supports a matching set of target formats.

    Validates the specified link, verifying that the target exists and supports a matching set of target formats. Performs the same checks as the validate method, but instead of returning potential errors in an Either it replaces invalid links with instances of InvalidSpan. Those types of AST nodes require access to the original source that produced the element which is either obtained from a parser or from a directive combinator.

  32. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  33. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  34. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  35. def withReferenceContext[T](refValue: T)(implicit arg0: ConfigEncoder[T]): DocumentCursor

    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 Product

Inherited from Equals

Inherited from Cursor

Inherited from AnyRef

Inherited from Any

Ungrouped