Packages

c

laika.ast

DocumentTreeRoot

case class DocumentTreeRoot(tree: DocumentTree, coverDocument: Option[Document] = None, styles: Map[String, StyleDeclarationSet] = ..., staticDocuments: Seq[StaticDocument] = Nil, includes: IncludeMap = Map.empty) extends Product with Serializable

Represents the root of a tree of documents. In addition to the recursive structure of documents, usually obtained by parsing text markup, it holds additional items like styles and static documents, which may contribute to the rendering of a site or an e-book.

The styles property of this type is currently only populated and processed when rendering PDF or XSL-FO. Styles for HTML or EPUB documents are part of the staticDocuments property instead and will be integrated into the final output, but not interpreted.

tree

the recursive structure of documents, usually obtained from parsing text markup

coverDocument

the cover document (usually used with e-book formats like EPUB and PDF)

styles

the styles to apply when rendering this tree, only populated for PDF or XSL-FO output

staticDocuments

the descriptors for documents that were neither identified as text markup, config or templates, and will be copied as is to the final output

includes

the map of configuration includes that may be needed when resolving template configuration

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

Instance Constructors

  1. new DocumentTreeRoot(tree: DocumentTree, coverDocument: Option[Document] = None, styles: Map[String, StyleDeclarationSet] = ..., staticDocuments: Seq[StaticDocument] = Nil, includes: IncludeMap = Map.empty)

    tree

    the recursive structure of documents, usually obtained from parsing text markup

    coverDocument

    the cover document (usually used with e-book formats like EPUB and PDF)

    styles

    the styles to apply when rendering this tree, only populated for PDF or XSL-FO output

    staticDocuments

    the descriptors for documents that were neither identified as text markup, config or templates, and will be copied as is to the final output

    includes

    the map of configuration includes that may be needed when resolving template configuration

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.

  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  7. val config: Config

    The configuration associated with the root of the tree.

    The configuration associated with the root of the tree.

    Like text markup documents and templates, configurations form a tree structure and sub-trees may override and/or add properties that have only an effect in that sub-tree.

  8. val coverDocument: Option[Document]
  9. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  10. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  12. val includes: IncludeMap
  13. 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.

  14. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  15. def mapDocuments(f: (Document) ⇒ Document): DocumentTreeRoot

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

  16. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  17. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  18. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  19. def rewrite(rules: RewriteRulesBuilder): Either[TreeConfigErrors, DocumentTreeRoot]

    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.

  20. val staticDocuments: Seq[StaticDocument]
  21. val styles: Map[String, StyleDeclarationSet]
  22. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  23. val title: Option[SpanSequence]

    The title of this tree, obtained from configuration.

  24. val titleDocument: Option[Document]

    The title document for this tree, if present.

    The title document for this tree, if present.

    At the root level the title document, if present, will be rendered after the cover document.

  25. val tree: DocumentTree
  26. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  27. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  29. def withConfig(config: Config): DocumentTreeRoot

    Creates a new tree by replacing its root configuration with the specified config instance.

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped