Class DocumentImpl

    • Constructor Detail

      • DocumentImpl

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

      • getSource

        public java.lang.String getSource()
        Description copied from interface: Document
        Make the raw source for the Document available. Trailing white characters (spaces, line breaks, etc.) are removed.
        Specified by:
        getSource in interface Document
        Returns:
        Raw content as String
      • getSourceLines

        public java.util.List<java.lang.String> getSourceLines()
        Description copied from interface: Document
        Make the raw source lines for the Document available.
        Specified by:
        getSourceLines in interface Document
        Returns:
        Raw content as List
      • isBasebackend

        public boolean isBasebackend​(java.lang.String backend)
        Specified by:
        isBasebackend in interface Document
        Returns:
        'basebackend' attribute value
      • getOptions

        public java.util.Map<java.lang.Object,​java.lang.Object> getOptions()
        Specified by:
        getOptions in interface Document
        Returns:
        Options defined in the document
      • getDoctitle

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

        public java.util.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:
        The authors information
        See Also:
        Author
      • getAndIncrementCounter

        public int getAndIncrementCounter​(java.lang.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
        Parameters:
        name - name of the counter
        Returns:
        Value before increment plus 1
      • getAndIncrementCounter

        public int getAndIncrementCounter​(java.lang.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
        Parameters:
        name - name of the counter
        initialValue - value to start counter from
        Returns:
        Value before increment plus 1
      • 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 - 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.
        Specified by:
        getCatalog in interface Document
        Returns:
        Catalog assets
        See Also:
        Catalog