laika.tree.Documents

Document

case class Document(path: Path, content: RootElement, fragments: Map[String, Element] = ..., config: Config = ..., position: TreePosition = ...) extends DocumentStructure with TreeContent with Product with Serializable

Represents a single document and provides access to the document content and structure as well as hooks for triggering rewrite operations.

path

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

content

the tree model obtained from parsing the markup document

fragments

separate named fragments that had been extracted from the content

config

the configuration for this document

position

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

Linear Supertypes
Serializable, Serializable, Product, Equals, TreeContent, Navigatable, DocumentStructure, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Document
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. TreeContent
  7. Navigatable
  8. DocumentStructure
  9. AnyRef
  10. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Document(path: Path, content: RootElement, fragments: Map[String, Element] = ..., config: Config = ..., position: TreePosition = ...)

    path

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

    content

    the tree model obtained from parsing the markup document

    fragments

    separate named fragments that had been extracted from the content

    config

    the configuration for this document

    position

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

Value Members

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

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

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

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def clone(): AnyRef

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

    the configuration for this document

    the configuration for this document

    Definition Classes
    DocumentTreeContent
  9. val content: RootElement

    the tree model obtained from parsing the markup document

    the tree model obtained from parsing the markup document

    Definition Classes
    DocumentDocumentStructure
  10. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  11. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  12. val fragments: Map[String, Element]

    separate named fragments that had been extracted from the content

  13. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  14. lazy val globalLinkTargets: Map[Selector, TargetResolver]

    All link targets that can get referenced from anywhere in the document tree.

    All link targets that can get referenced from anywhere in the document tree.

    Definition Classes
    DocumentStructure
  15. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  16. lazy val linkTargets: LinkTargetProvider

    All link targets of this document, including global and local targets.

    All link targets of this document, including global and local targets.

    Definition Classes
    DocumentStructure
  17. lazy val name: String

    The local name of this navigatable.

    The local name of this navigatable.

    Definition Classes
    Navigatable
  18. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  19. final def notify(): Unit

    Definition Classes
    AnyRef
  20. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  21. val path: Path

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

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

    Definition Classes
    DocumentNavigatable
  22. val position: TreePosition

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

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

    Definition Classes
    DocumentTreeContent
  23. def rewrite(rule: RewriteRule): Document

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

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

    If the specified partial function is not defined for a specific element the old element remains in the tree unchanged. If it returns None then the node gets removed from the tree, if it returns an element it will replace the old one. Of course the function may also return the old element.

    The rewriting is performed in a way that only branches of the tree that contain new or removed elements will be replaced. It is processed bottom-up, therefore any element container passed to the rule only contains children which have already been processed.

  24. lazy val sections: Seq[SectionInfo]

    The section structure of this document based on the hierarchy of headers found in the original text markup.

    The section structure of this document based on the hierarchy of headers found in the original text markup.

    Definition Classes
    DocumentStructure
  25. def selectTarget(selector: Selector): Option[TargetResolver]

    Selects a link target by the specified selector if it is defined somewhere in a document inside this document tree.

    Selects a link target by the specified selector if it is defined somewhere in a document inside this document tree.

    Definition Classes
    TreeContent
  26. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  27. def title: Seq[Span]

    The title of this document, obtained from the document structure or from the configuration.

    The title of this document, obtained from the document structure or from the configuration. In case no title is defined in either of the two places the sequence will be empty.

    Definition Classes
    DocumentStructure
  28. def titleFromConfig: Option[Seq[Span]]

    Attributes
    protected
    Definition Classes
    TreeContent
  29. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from TreeContent

Inherited from Navigatable

Inherited from DocumentStructure

Inherited from AnyRef

Inherited from Any

Ungrouped