Class IParseBase

  • All Implemented Interfaces:
    IParse

    public abstract class IParseBase
    extends java.lang.Object
    implements IParse
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      @Nullable DataHolder getOptions()
      Get Options for parsing
      @NotNull Node parse​(@NotNull java.lang.String input)
      Parse the specified input text into a tree of nodes.
      @NotNull Node parseReader​(@NotNull java.io.Reader input)
      Parse the specified reader into a tree of nodes.
      boolean transferReferences​(@NotNull Document document, @NotNull Document included, java.lang.Boolean onlyIfUndefined)
      Transfer reference definition between documents
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface com.vladsch.flexmark.util.ast.IParse

        parse
    • Field Detail

    • Constructor Detail

      • IParseBase

        public IParseBase()
      • IParseBase

        public IParseBase​(DataHolder options)
    • Method Detail

      • parse

        @NotNull
        public @NotNull Node parse​(@NotNull
                                   @NotNull java.lang.String input)
        Description copied from interface: IParse
        Parse the specified input text into a tree of nodes.

        Note that this method is thread-safe (a new parser state is used for each invocation).

        Specified by:
        parse in interface IParse
        Parameters:
        input - the text to parse
        Returns:
        the root node
      • transferReferences

        public boolean transferReferences​(@NotNull
                                          @NotNull Document document,
                                          @NotNull
                                          @NotNull Document included,
                                          java.lang.Boolean onlyIfUndefined)
        Description copied from interface: IParse
        Transfer reference definition between documents
        Specified by:
        transferReferences in interface IParse
        Parameters:
        document - destination document
        included - source document
        onlyIfUndefined - true if only should transfer references not already defined in the destination document, false to transfer all, null to use repository's KEEP_TYPE to make the determination (if KEEP_FIRST then only transfer if undefined,
        Returns:
        true if any references were transferred
      • parseReader

        @NotNull
        public @NotNull Node parseReader​(@NotNull
                                         @NotNull java.io.Reader input)
                                  throws java.io.IOException
        Description copied from interface: IParse
        Parse the specified reader into a tree of nodes. The caller is responsible for closing the reader.

        Note that this method is thread-safe (a new parser state is used for each invocation).

        Specified by:
        parseReader in interface IParse
        Parameters:
        input - the reader to parse
        Returns:
        the root node
        Throws:
        java.io.IOException - when reading throws an exception
      • getOptions

        @Nullable
        public @Nullable DataHolder getOptions()
        Description copied from interface: IParse
        Get Options for parsing
        Specified by:
        getOptions in interface IParse
        Returns:
        DataHolder for options