laika.tree.Documents

Document

class Document extends Navigatable

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

Linear Supertypes
Navigatable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Document
  2. Navigatable
  3. AnyRef
  4. 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 = ..., docNumber: List[Int] = immutable.this.Nil, rewriteRules: Seq[(DocumentContext) ⇒ PartialFunction[Element, Option[Element]]] = immutable.this.Nil)

    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

    docNumber

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

    rewriteRules

    a list of rewrite rules that have not yet been applied to the document

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

  9. val content: RootElement

    the tree model obtained from parsing the markup document

  10. lazy val defaultRules: Seq[(DocumentContext) ⇒ PartialFunction[Element, Option[Element]]]

    Attributes
    protected
  11. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  12. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  13. def finalize(): Unit

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

    separate named fragments that had been extracted from the content

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

    Definition Classes
    AnyRef → Any
  16. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  17. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  18. val isRewritten: Boolean

    Indicates whether all rewrite rules have already been applied to this document.

  19. val name: String

    The local name of this document.

  20. final def ne(arg0: AnyRef): Boolean

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

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

    Definition Classes
    AnyRef
  23. 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
  24. def removeRules: Document

    Removes all rewrite rules that have not yet been applied from this document.

  25. def rewrite(customRule: PartialFunction[Element, Option[Element]]): 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 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.

  26. def rewrite: Document

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

  27. def rewriteWith(customRules: Seq[PartialFunction[Element, Option[Element]]]): 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 none of the specified partial functions is defined for a specific element the old element remains in the tree unchanged. If one of them returns None then the node gets removed from the tree, if one of them 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.

  28. lazy val sections: Seq[SectionInfo]

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

  29. final def synchronized[T0](arg0: ⇒ T0): T0

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

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

  31. def toString(): String

    Definition Classes
    AnyRef → Any
  32. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Navigatable

Inherited from AnyRef

Inherited from Any

Ungrouped