Class DocumentImpl

All Implemented Interfaces:
ContentNode, Document, StructuralNode

public class DocumentImpl extends StructuralNodeImpl implements Document
  • Constructor Details

    • DocumentImpl

      public DocumentImpl(org.jruby.runtime.builtin.IRubyObject document)
  • Method Details

    • isBasebackend

      public boolean isBasebackend(String backend)
      Specified by:
      isBasebackend in interface Document
      Returns:
      basebackend attribute value
    • basebackend

      @Deprecated public boolean basebackend(String backend)
      Deprecated.
      Specified by:
      basebackend in interface Document
      Returns:
      basebackend attribute value
    • getOptions

      public Map<Object,Object> getOptions()
      Specified by:
      getOptions in interface Document
      Returns:
      options defined in document.
    • getStructuredDoctitle

      public Title getStructuredDoctitle()
      Specified by:
      getStructuredDoctitle in interface Document
      Returns:
      The Title structure for this document.
      See Also:
    • getDoctitle

      public String getDoctitle()
      Specified by:
      getDoctitle in interface Document
      Returns:
      The title as a String.
      See Also:
    • doctitle

      @Deprecated public String doctitle()
      Deprecated.
      Specified by:
      doctitle in interface Document
      Returns:
      The title as a String.
      See Also:
    • getAuthors

      public List<Author> getAuthors()
      Description copied from interface: Document
      Gets the author(s) information as defined in the author line in the document header, or in author & email attributes.
      Specified by:
      getAuthors in interface Document
      Returns:
      authors information
    • getAndIncrementCounter

      public int getAndIncrementCounter(String name)
      Description copied from interface: Document
      Gets the current counter with the given name and increases its value. At the first invocation the counter will return 1. After the call the value of the counter is set to the returned value plus 1.
      Specified by:
      getAndIncrementCounter in interface Document
      Returns:
    • getAndIncrementCounter

      public int getAndIncrementCounter(String name, int initialValue)
      Description copied from interface: Document
      Gets the current counter with the given name and increases its value. At the first invocation the counter will return the given initial value. After the call the value of the counter is set to the returned value plus 1.
      Specified by:
      getAndIncrementCounter in interface Document
      Returns:
    • isSourcemap

      public boolean isSourcemap()
      Specified by:
      isSourcemap in interface Document
      Returns:
      Whether the sourcemap is enabled.
    • setSourcemap

      public void setSourcemap(boolean state)
      Description copied from interface: Document
      Toggles the sourcemap option. This method must be called before the document is parsed, such as from a Preprocessor extension. Otherwise, it has no effect.
      Specified by:
      setSourcemap in interface Document
      Parameters:
      state - The state in which to put the sourcemap (true = on, false = off).
    • getCatalog

      public Catalog getCatalog()
      Description copied from interface: Document
      The catalog contains data collected by asciidoctor that is useful to a converter. Note that the catalog is not part of the asciidoctor public API and is subject to change.
      Specified by:
      getCatalog in interface Document
      Returns:
      catalog
    • getRevisionInfo

      public RevisionInfo getRevisionInfo()
      Description copied from interface: Document
      The revision information with: date, number and remark.
      Specified by:
      getRevisionInfo in interface Document
      Returns:
      revisionInfo