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
- Alphabetic
- By Inheritance
- DocumentTreeRoot
- Serializable
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
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
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
lazy val
allDocuments: Seq[Document]
All documents contained in this tree, fetched recursively, depth-first.
-
def
applyTemplates(rules: RewriteRulesBuilder, context: OutputContext): Either[ConfigError, DocumentTreeRoot]
Selects and applies the templates contained in this document tree for the specified output format to all documents within this tree recursively.
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @HotSpotIntrinsicCandidate()
-
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.
- val coverDocument: Option[Document]
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- val includes: IncludeMap
-
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.
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
mapDocuments(f: (Document) ⇒ Document): DocumentTreeRoot
Creates a new tree by applying the specified function to all documents in this tree recursively.
-
def
modifyTree(f: (DocumentTree) ⇒ DocumentTree): DocumentTreeRoot
Creates a new instance by applying the specified function to the root tree.
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
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 returnsReplace
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.
- val staticDocuments: Seq[StaticDocument]
- val styles: Map[String, StyleDeclarationSet]
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
val
title: Option[SpanSequence]
The title of this tree, obtained from configuration.
-
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.
- val tree: DocumentTree
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
withConfig(config: Config): DocumentTreeRoot
Creates a new tree by replacing its root configuration with the specified config instance.
Deprecated Value Members
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] ) @Deprecated
- Deprecated