Class TokenFilterFactory

    • Method Detail

      • forName

        public static TokenFilterFactory forName​(java.lang.String name,
                                                 java.util.Map<java.lang.String,​java.lang.String> args)
        looks up a tokenfilter by name from context classpath
      • lookupClass

        public static java.lang.Class<? extends TokenFilterFactory> lookupClass​(java.lang.String name)
        looks up a tokenfilter class by name from context classpath
      • availableTokenFilters

        public static java.util.Set<java.lang.String> availableTokenFilters()
        returns a list of all available tokenfilter names from context classpath
      • reloadTokenFilters

        public static void reloadTokenFilters​(java.lang.ClassLoader classloader)
        Reloads the factory list from the given ClassLoader. Changes to the factories are visible after the method ends, all iterators (availableTokenFilters(),...) stay consistent.

        NOTE: Only new factories are added, existing ones are never removed or replaced.

        This method is expensive and should only be called for discovery of new factories on the given classpath/classloader!

      • create

        public abstract TokenStream create​(TokenStream input)
        Transform the specified input TokenStream