Packages

c

laika.ast

Document

case class Document(path: Path, content: RootElement, fragments: Map[String, Element] = Map.empty, config: Config = Config.empty, position: TreePosition = TreePosition.orphan) 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, DocumentStructure, DocumentNavigation, Navigatable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Document
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. TreeContent
  7. DocumentStructure
  8. DocumentNavigation
  9. Navigatable
  10. AnyRef
  11. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

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

    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: 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 asNavigationItem(context: NavigationBuilderContext = NavigationBuilderContext()): NavigationItem

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

    Creates the navigation structure for this document 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
    DocumentNavigation
  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  7. val config: Config

    The configuration associated with this element.

    The configuration associated with this element.

    Definition Classes
    DocumentTreeContent
  8. val configScope: Scope
    Attributes
    protected
    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[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  12. val fragments: Map[String, Element]
  13. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  14. def invalidElements(filter: MessageFilter): Seq[Invalid]
    Definition Classes
    DocumentStructure
  15. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  16. lazy val name: String

    The local name of this navigatable.

    The local name of this navigatable.

    Definition Classes
    Navigatable
  17. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  18. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  19. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  20. val path: Path
    Definition Classes
    DocumentNavigatable
  21. val position: TreePosition

    The position of this element within the document tree.

    The position of this element within the document tree.

    Definition Classes
    DocumentTreeContent
  22. def rewrite(rules: RewriteRules): Either[ConfigError, Document]

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

    Returns a new, rewritten document model 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.

  23. def runtimeMessages(filter: MessageFilter): Seq[RuntimeMessage]
    Definition Classes
    DocumentStructure
  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
    DocumentStructureDocumentNavigation
  25. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  26. def targetFormats: TargetFormats

    The formats this tree content should be rendered to.

    The formats this tree content should be rendered to.

    Definition Classes
    TreeContent
  27. def title: Option[SpanSequence]

    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 result will be None.

    Definition Classes
    DocumentStructureDocumentNavigation
  28. def titleFromConfig: Option[SpanSequence]
    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( ... ) @native()

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from TreeContent

Inherited from DocumentStructure

Inherited from DocumentNavigation

Inherited from Navigatable

Inherited from AnyRef

Inherited from Any

Ungrouped