Class TokenUtils


  • public final class TokenUtils
    extends java.lang.Object
    Utility methods for working with TokenList objects.
    • Constructor Summary

      Constructors 
      Constructor Description
      TokenUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.List<java.lang.String> extractScopes​(java.lang.String scopeName, IngestFieldValue value)
      Extract scopeName values from value.
      static java.util.List<java.lang.String> extractScopes​(java.lang.String scopeName, TokenList tokens, java.lang.String text)
      Extract substrings of text for scopeName from tokens.
      static TokenList filterTokens​(IngestFieldValue value, java.util.Locale locale)
      Get all tokens for locale.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TokenUtils

        public TokenUtils()
    • Method Detail

      • filterTokens

        public static TokenList filterTokens​(IngestFieldValue value,
                                             java.util.Locale locale)
        Get all tokens for locale.

        NOTE: all returned tokens will be cloned.

        Since:
        5.5.0 patch 95
      • extractScopes

        public static java.util.List<java.lang.String> extractScopes​(java.lang.String scopeName,
                                                                     IngestFieldValue value)
        Extract scopeName values from value.
      • extractScopes

        public static java.util.List<java.lang.String> extractScopes​(java.lang.String scopeName,
                                                                     TokenList tokens,
                                                                     java.lang.String text)
        Extract substrings of text for scopeName from tokens.