Class WikiText.WikiContent

java.lang.Object
org.getalp.dbnary.wiki.WikiText.Token
org.getalp.dbnary.wiki.WikiText.WikiContent
All Implemented Interfaces:
Visitable
Enclosing class:
WikiText

public final class WikiText.WikiContent extends WikiText.Token
Upper element containing text/links/templates and comments interleaved
  • Method Details

    • addToken

      protected void addToken(WikiText.Token t)
      Specified by:
      addToken in class WikiText.Token
    • wikiTokensStream

      public Stream<WikiText.Token> wikiTokensStream()
      returns a stream serving all wikiTokens in the wikiText, that is all special media wiki constructs, excluding html comments. This does not return the text tokens that are intertwined between the wiki tokens.
      Returns:
      a Stream of Tokens
    • wikiTokens

      public List<WikiText.Token> wikiTokens()
      returns all wikiTokens in the wikiText, that is all special media wiki constructs, excluding html comments. This does not return the text tokens that are intertwined between the wiki tokens.
      Returns:
      a sequence of Tokens
    • wikiTokensStreamWithHtmlComments

      public Stream<WikiText.Token> wikiTokensStreamWithHtmlComments()
      returns a stream serving all wikiTokens in the wikiText, that is all special media wiki constructs, excluding html comments. This does not return the text tokens that are intertwined between the wiki tokens.
      Returns:
      a Stream of Tokens
    • wikiTokensWithHtmlComments

      public List<WikiText.Token> wikiTokensWithHtmlComments()
      returns all wikiTokens in the wikiText, that is all special media wiki constructs, including html comments. This does not return the text tokens that are intertwined between the wiki tokens.
      Returns:
      a sequence of all Wiki Tokens
    • tokens

      public List<WikiText.Token> tokens()
      returns a List of wikiTokens including Text tokens that may be intertwined. HTML comments are ignored. Two successive Texts may be found if a comment was present in the wiki source.
      Returns:
      a list of tokens (either text or wikiTokens)
    • tokensWithHtmlComments

      public List<WikiText.Token> tokensWithHtmlComments()
      returns a List of wikiTokens including Text tokens that may be intertwined. HTML comments are included in the list.
      Returns:
      a list of tokens (either text or wikiTokens)
    • fillText

      public void fillText(StringBuilder r)
      Specified by:
      fillText in class WikiText.Token
    • filteredTokens

      public WikiEventsSequence filteredTokens(WikiEventFilter filter)
    • sections

      public WikiSectionsSequence sections(int level)
    • endOfContent

      public WikiText.Text endOfContent()
    • links

      public WikiEventsSequence links()
    • templatesOnUpperLevel

      public WikiEventsSequence templatesOnUpperLevel()
    • templates

      public WikiEventsSequence templates()
    • headers

      public WikiEventsSequence headers()
    • sections

      public WikiEventsSequence sections()
    • headers

      public WikiEventsSequence headers(int level)
    • headersMatching

      public WikiEventsSequence headersMatching(Pattern pattern)
    • headersMatching

      public WikiEventsSequence headersMatching(int level, Pattern pattern)
    • accept

      public <T> T accept(Visitor<T> visitor)
    • asWikiContent

      public WikiText.WikiContent asWikiContent()
      Overrides:
      asWikiContent in class WikiText.Token