Class ParsedFrontMatter

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

public class ParsedFrontMatter
extends java.lang.Object
implements FrontMatterInfo
  • Field Summary

    Fields inherited from interface io.nosqlbench.nb.api.markdown.types.FrontMatterInfo

    AGGREGATE, FrontMatterKeyWords, INCLUDED, SCOPES, TITLE, TOPICS, WEIGHT
  • Constructor Summary

    Constructors 
    Constructor Description
    ParsedFrontMatter​(java.util.Map<java.lang.String,​java.util.List<java.lang.String>> data)  
  • Method Summary

    Modifier and Type Method Description
    boolean equals​(java.lang.Object o)  
    java.util.List<java.util.regex.Pattern> getAggregations()
    Aggregation patterns coalesce all the topics that they match into a seamless logical section of content.
    java.util.List<java.lang.String> getDiagnostics()  
    java.util.Set<DocScope> getDocScopes()
    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.
    java.util.List<java.lang.String> getIncluded()
    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.
    java.lang.String getTitle()  
    java.util.Set<java.lang.String> getTopics()
    Topics in this service are taxonomically hierarchical, and use the same naming convention as relative file paths.
    int getWeight()  
    int hashCode()  
    void setTopics​(java.util.Set<java.lang.String> newTopics)  
    java.lang.String toString()  
    ParsedFrontMatter withIncluded​(java.util.List<java.lang.String> included)  
    ParsedFrontMatter withTopics​(java.util.List<java.lang.String> assigning)  

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • ParsedFrontMatter

      public ParsedFrontMatter​(java.util.Map<java.lang.String,​java.util.List<java.lang.String>> data)
  • Method Details

    • getTitle

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

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

      public java.util.Set<java.lang.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 java.util.List<java.lang.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 java.util.List<java.util.regex.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 java.util.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 java.util.List<java.lang.String> getDiagnostics()
    • setTopics

      public void setTopics​(java.util.Set<java.lang.String> newTopics)
    • withTopics

      public ParsedFrontMatter withTopics​(java.util.List<java.lang.String> assigning)
    • withIncluded

      public ParsedFrontMatter withIncluded​(java.util.List<java.lang.String> included)
    • toString

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

      public boolean equals​(java.lang.Object o)
      Overrides:
      equals in class java.lang.Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class java.lang.Object