Packages

c

laika.ast

DocumentTree

case class DocumentTree(path: Path, content: Seq[TreeContent], titleDocument: Option[Document] = None, templates: Seq[TemplateDocument] = Nil, config: Config = Config.empty, position: TreePosition = TreePosition.root) extends TreeStructure with TreeContent with Product with Serializable

Represents a tree with all its documents, templates, configurations and subtrees.

path

the full, absolute path of this (virtual) document tree

content

the markup documents and subtrees

titleDocument

the optional title document of this tree

templates

all templates on this level of the tree hierarchy that might get applied to a document when it gets rendered

config

the configuration associated with this tree

position

the position of this tree inside a document ast hierarchy, expressed as a list of Ints

Linear Supertypes
Serializable, Serializable, Product, Equals, TreeContent, Navigatable, TreeStructure, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. DocumentTree
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. TreeContent
  7. Navigatable
  8. TreeStructure
  9. AnyRef
  10. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new DocumentTree(path: Path, content: Seq[TreeContent], titleDocument: Option[Document] = None, templates: Seq[TemplateDocument] = Nil, config: Config = Config.empty, position: TreePosition = TreePosition.root)

    path

    the full, absolute path of this (virtual) document tree

    content

    the markup documents and subtrees

    titleDocument

    the optional title document of this tree

    templates

    all templates on this level of the tree hierarchy that might get applied to a document when it gets rendered

    config

    the configuration associated with this tree

    position

    the position of this tree inside a document ast hierarchy, expressed as a list of Ints

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. lazy val allDocuments: Seq[Document]

    All documents contained in this tree, fetched recursively, depth-first.

    All documents contained in this tree, fetched recursively, depth-first.

    Definition Classes
    TreeStructure
  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def asNavigationItem(context: NavigationBuilderContext = NavigationBuilderContext()): NavigationItem

    Creates the navigation structure for this tree up to the specified depth.

    Creates the navigation structure for this tree up to the specified depth. The returned instance can be used as part of a bigger navigation structure comprising of trees, documents and their sections.

    context

    captures the navigation depth, reference path and styles for the navigation tree being built

    returns

    a navigation item that can be used as part of a bigger navigation structure comprising of trees, documents and their sections

    Definition Classes
    TreeStructure
  7. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  8. val config: Config

    The configuration associated with this element.

    The configuration associated with this element.

    Definition Classes
    DocumentTreeTreeContent
  9. val configScope: Scope
    Attributes
    protected
    Definition Classes
    DocumentTreeTreeContent
  10. val content: Seq[TreeContent]

    The content of this tree structure, containing all markup documents and subtrees, except for the (optional) title document.

    The content of this tree structure, containing all markup documents and subtrees, except for the (optional) title document.

    Definition Classes
    DocumentTreeTreeStructure
  11. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  12. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  14. def getDefaultTemplate(formatSuffix: String): Option[TemplateDocument]

    Selects the template with the name default.template.<suffix> for the specified format suffix from this level of the document tree.

    Selects the template with the name default.template.<suffix> for the specified format suffix from this level of the document tree.

    Definition Classes
    TreeStructure
  15. def invalidElements(filter: MessageFilter): Seq[Invalid]
    Definition Classes
    TreeStructure
  16. lazy val isEmpty: Boolean

    Indicates whether this tree does not contain any markup document.

    Indicates whether this tree does not contain any markup document. Template documents do not count, as they would be ignored in rendering when there is no markup document.

    Definition Classes
    TreeStructure
  17. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  18. def mapDocuments(f: (Document) ⇒ Document): DocumentTree

    Creates a new tree by applying the specified function to all documents in this tree recursively.

  19. lazy val name: String

    The local name of this navigatable.

    The local name of this navigatable.

    Definition Classes
    Navigatable
  20. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  21. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  22. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  23. val path: Path
    Definition Classes
    DocumentTreeNavigatable
  24. val position: TreePosition

    The position of this element within the document tree.

    The position of this element within the document tree.

    Definition Classes
    DocumentTreeTreeContent
  25. def rewrite(rules: RewriteRulesBuilder): Either[TreeConfigErrors, DocumentTree]

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

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

    If the rule is not defined for a specific element or the rule returns a Retain action as a result the old element remains in the tree unchanged.

    If it returns Remove then the node gets removed from the ast, if it returns Replace with a new element it will replace the old one.

    The rewriting is performed bottom-up (depth-first), therefore any element container passed to the rule only contains children which have already been processed.

    The specified factory function will be invoked for each document contained in this tree and must return the rewrite rules for that particular document.

  26. def runtimeMessages(filter: MessageFilter): Seq[RuntimeMessage]
    Definition Classes
    TreeStructure
  27. def selectDocument(path: RelativePath): Option[Document]

    Selects a document from this tree or one of its subtrees by the specified path.

    Selects a document from this tree or one of its subtrees by the specified path. The path must not point to a parent tree (start with ../) as this instance is not aware of its parents.

    Definition Classes
    TreeStructure
  28. def selectDocument(path: String): Option[Document]

    Selects a document from this tree or one of its subtrees by the specified path.

    Selects a document from this tree or one of its subtrees by the specified path. The path needs to be relative and not point to a parent tree (neither start with / nor with ..).

    Definition Classes
    TreeStructure
  29. def selectSubtree(path: RelativePath): Option[DocumentTree]

    Selects a subtree of this tree by the specified path.

    Selects a subtree of this tree by the specified path. The path must not point to a parent tree (start with ../) as this instance is not aware of its parents.

    Definition Classes
    TreeStructure
  30. def selectSubtree(path: String): Option[DocumentTree]

    Selects a subtree of this tree by the specified path.

    Selects a subtree of this tree by the specified path. The path needs to be relative and it may point to a deeply nested subtree, not just immediate children.

    Definition Classes
    TreeStructure
  31. def selectTemplate(path: RelativePath): Option[TemplateDocument]

    Selects a template from this tree or one of its subtrees by the specified path.

    Selects a template from this tree or one of its subtrees by the specified path. The path must not point to a parent tree (start with ../) as this instance is not aware of its parents.

    Definition Classes
    TreeStructure
  32. def selectTemplate(path: String): Option[TemplateDocument]

    Selects a template from this tree or one of its subtrees by the specified path.

    Selects a template from this tree or one of its subtrees by the specified path. The path needs to be relative.

    Definition Classes
    TreeStructure
  33. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  34. def targetFormats: TargetFormats

    The formats this tree content should be rendered to.

    The formats this tree content should be rendered to.

    Definition Classes
    TreeContent
  35. val targetTree: DocumentTree

    The actual document tree that this ast structure represents.

    The actual document tree that this ast structure represents.

    Definition Classes
    DocumentTreeTreeStructure
  36. val templates: Seq[TemplateDocument]

    All templates on this level of the tree hierarchy that might get applied to a document when it gets rendered.

    All templates on this level of the tree hierarchy that might get applied to a document when it gets rendered.

    Definition Classes
    DocumentTreeTreeStructure
  37. lazy val title: Option[SpanSequence]

    The title of this tree, obtained from configuration.

    The title of this tree, obtained from configuration.

    Definition Classes
    TreeStructure
  38. val titleDocument: Option[Document]

    The title document for this tree, if present.

    The title document for this tree, if present.

    A document with the base name title and the corresponding suffix for the input markup, e.g. title.md for Markdown, can be used as an introductory section for a chapter represented by a directory tree.

    Definition Classes
    DocumentTreeTreeStructure
  39. def titleFromConfig: Option[SpanSequence]
    Attributes
    protected
    Definition Classes
    TreeContent
  40. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  41. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  42. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  43. def withDefaultTemplate(template: TemplateRoot, formatSuffix: String): DocumentTree

    Create a new document tree that contains the specified template as the default.

    Create a new document tree that contains the specified template as the default.

    Definition Classes
    TreeStructure

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from TreeContent

Inherited from Navigatable

Inherited from TreeStructure

Inherited from AnyRef

Inherited from Any

Ungrouped