public static Analyzer getAnalyzer ( ) throws EFapsException { IAnalyzerProvider provider = null ; if ( EFapsSystemConfiguration . get ( ) . containsAttributeValue ( KernelSettings . INDEXANALYZERPROVCLASS ) ) { final String clazzname = EFapsSystemConfiguration . get ( ) . getAttributeValue ( KernelSettings . INDEXANALYZERPROVCLASS ) ; try { final Class < ? > clazz = Class . forName ( clazzname , false , EFapsClassLoader . getInstance ( ) ) ; provider = ( IAnalyzerProvider ) clazz . newInstance ( ) ; } catch ( final ClassNotFoundException | InstantiationException | IllegalAccessException e ) { throw new EFapsException ( Index . class , "Could not instanciate IAnalyzerProvider" , e ) ; } } else { provider = new IAnalyzerProvider ( ) { @ Override public Analyzer getAnalyzer ( ) { return new StandardAnalyzer ( SpanishAnalyzer . getDefaultStopSet ( ) ) ; } } ; } return provider . getAnalyzer ( ) ; }
Gets the analyzer .