@Test public void analyzerByComposition_CharFilter() throws Exception{ NodeBuilder nb = EMPTY_NODE.builder(); nb.child(ANL_TOKENIZER).setProperty(ANL_NAME, "whitespace"); NodeBuilder filters = nb.child(ANL_CHAR_FILTERS); filters.setProperty(OAK_CHILD_ORDER, ImmutableList.of("htmlStrip", "mapping"),NAMES); filters.child("mapping").setProperty(ANL_NAME, "mapping"); filters.child("htmlStrip"); TokenizerChain analyzer = (TokenizerChain) factory.createInstance(nb.getNodeState()); assertEquals(2, analyzer.getCharFilters().length); assertEquals(HTMLStripCharFilterFactory.class.getName(), analyzer.getCharFilters()[0].getClassArg()); assertEquals(MappingCharFilterFactory.class.getName(), analyzer.getCharFilters()[1].getClassArg()); }
public Analyzer createInstance(NodeState state) { if (state.hasProperty(LuceneIndexConstants.ANL_CLASS)){ return createAnalyzerViaReflection(state); } return composeAnalyzer(state); }
NodeStateAnalyzerFactory { public Analyzer createInstance(NodeState state) { if (state.hasProperty(LuceneIndexConstants.ANL_CLASS)){ return createAnalyzerViaReflection(state); } return composeAnalyzer(state); } }
NodeStateAnalyzerFactory { public Analyzer createInstance(NodeState state) { if (state.hasProperty(LuceneIndexConstants.ANL_CLASS)){ return createAnalyzerViaReflection(state); } return composeAnalyzer(state); } NodeStateAnalyzerFactory(Version defaultVersion);   NodeStateAnalyzerFactory(ResourceLoader defaultLoader, Version defaultVersion); }
NodeStateAnalyzerFactory { public Analyzer createInstance(NodeState state) { if (state.hasProperty(LuceneIndexConstants.ANL_CLASS)){ return createAnalyzerViaReflection(state); } return composeAnalyzer(state); } NodeStateAnalyzerFactory(Version defaultVersion);   NodeStateAnalyzerFactory(ResourceLoader defaultLoader, Version defaultVersion); Analyzer createInstance(NodeState state); }
NodeStateAnalyzerFactory { public Analyzer createInstance(NodeState state) { if (state.hasProperty(LuceneIndexConstants.ANL_CLASS)){ return createAnalyzerViaReflection(state); } return composeAnalyzer(state); } NodeStateAnalyzerFactory(Version defaultVersion);   NodeStateAnalyzerFactory(ResourceLoader defaultLoader, Version defaultVersion); Analyzer createInstance(NodeState state);  }