Class PluginLocaleEntry


  • public class PluginLocaleEntry
    extends Object
    The Locale entry on the plugin has a localeTag (e.g. en, en-US, or *) and an associated set of Header Entries. These Header entries are used to match against the stream name and indicate a confidence in the value of the match.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      LocaleEntry[] headerRegExps  
      boolean isRegExpComplete
      Is the returned Regular Expression a complete representation of the Logical Type.
      String localeTag  
      String regExpReturned
      RegExp plugins: the RegExp to be returned for this Logical Type.
    • Constructor Summary

      Constructors 
      Constructor Description
      PluginLocaleEntry()  
      PluginLocaleEntry​(String localeTag)
      Simple Constructor for use when have a single Language tag and no header information.
      PluginLocaleEntry​(String localeTag, String headerRegExp, int confidence, String regExpReturned)
      Simple Constructor for use when have a single Language tag and a single header (regular expression, confidence pair).
    • Field Detail

      • localeTag

        public String localeTag
      • headerRegExps

        public LocaleEntry[] headerRegExps
      • regExpReturned

        public String regExpReturned
        RegExp plugins: the RegExp to be returned for this Logical Type.
      • isRegExpComplete

        public boolean isRegExpComplete
        Is the returned Regular Expression a complete representation of the Logical Type.
    • Constructor Detail

      • PluginLocaleEntry

        public PluginLocaleEntry()
      • PluginLocaleEntry

        public PluginLocaleEntry​(String localeTag,
                                 String headerRegExp,
                                 int confidence,
                                 String regExpReturned)
        Simple Constructor for use when have a single Language tag and a single header (regular expression, confidence pair).
        Parameters:
        localeTag - The localeTag we are using to construct the Locale Entry.
        headerRegExp - The Regular Expression used to match against the stream name.
        confidence - The confidence in our assessment that this is the Semantic Type if the regular expression matches.
        regExpReturned - The Regular Expressed returned in the case of a successful match.
      • PluginLocaleEntry

        public PluginLocaleEntry​(String localeTag)
        Simple Constructor for use when have a single Language tag and no header information.
        Parameters:
        localeTag - The localeTag we are using to construct the Locale Entry.
    • Method Detail

      • getRegExpsToMatch

        public String[] getRegExpsToMatch()
      • simple

        public static PluginLocaleEntry[] simple​(String[] localeTags)
        Parameters:
        localeTags - Construct an array of simple Locale Entries based on a set of locale tags.
        Returns:
        An array of Locale Entries with only the tag set - no header information.
      • toString

        public String toString()
        Overrides:
        toString in class Object