Class ParsedFrontMatter

java.lang.Object
io.nosqlbench.nb.api.markdown.aggregator.ParsedFrontMatter
All Implemented Interfaces:
BasicFrontMatterInfo, FrontMatterInfo, HasDiagnostics

public class ParsedFrontMatter extends Object implements FrontMatterInfo
  • Constructor Details

  • Method Details

    • getTitle

      public String getTitle()
      Specified by:
      getTitle in interface BasicFrontMatterInfo
      Specified by:
      getTitle in interface FrontMatterInfo
      Returns:
      A title for the given markdown source file.
    • getWeight

      public int getWeight()
      Specified by:
      getWeight in interface BasicFrontMatterInfo
      Specified by:
      getWeight in interface FrontMatterInfo
      Returns:
      A weight for the given markdown source file.
    • getTopics

      public Set<String> getTopics()
      Description copied from interface: FrontMatterInfo

      Topics in this service are taxonomically hierarchical, and use the same naming convention as relative file paths. (In a *NIX system, meaning forward slashes as path separators).

      The end name on a topic is considered the local topic name. The leading names before this local topic name are considered nested categories. Taken together, these categories (in hierarchic ordered form) are the general category.

      A topic and the location of the markdown content it is part of are NOT bound together.

      Specified by:
      getTopics in interface FrontMatterInfo
      Returns:
      A list of categories
    • getIncluded

      public List<String> getIncluded()
      Description copied from interface: FrontMatterInfo

      If content is included in an item from another topic, then the topic name with which the additional content was added is in the inclueded list of topics.

      This is distinct from FrontMatterInfo.getTopics(), which is not modified by the included topic names.

      Specified by:
      getIncluded in interface FrontMatterInfo
      Returns:
      A list of included topics.
    • getAggregations

      public List<Pattern> getAggregations()
      Description copied from interface: FrontMatterInfo

      Aggregation patterns coalesce all the topics that they match into a seamless logical section of content. All source markdown files which have a topic which is matched by at least one of the aggregation patterns is included in the order of their weight.

      Aggregation patterns are simple regexes. It is possible to have multiple patterns as well as content that is referenced by multiple aggregations, from the same or different source aggregating topics.

      Specified by:
      getAggregations in interface FrontMatterInfo
      Returns:
      A list of aggregation patterns
    • getDocScopes

      public Set<DocScope> getDocScopes()
      Description copied from interface: FrontMatterInfo
      If a markdown source is flagged for use in a specific doc scope, then you can filter for that scope when you ask for markdown.

      Markdown content which contains zero scopes should explicitly return DocScope.NONE. Markdown content which contains one or more scopes should explicitly add DocScope.ANY to the returned set. Markdown should never be tagged with ANY or NONE in the source content. Readers should throw an error if this is detected.

      Specified by:
      getDocScopes in interface FrontMatterInfo
      Returns:
      A list of DocScopes for which this markdown should be used.
    • getDiagnostics

      public List<String> getDiagnostics(List<String> buffer)
      Specified by:
      getDiagnostics in interface HasDiagnostics
    • getDiagnostics

      public List<String> getDiagnostics()
      Specified by:
      getDiagnostics in interface HasDiagnostics
    • withTopics

      public ParsedFrontMatter withTopics(List<String> assigning)
    • withIncluded

      public ParsedFrontMatter withIncluded(List<String> included)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • setTitle

      public void setTitle(String title)
    • setWeight

      public void setWeight(int weight)