2 * Copyright (C) 2009 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
6 * The contents of this file are subject to the Mozilla Public License Version 1.1
7 * See LICENSE.TXT at the top of this package for the full license terms.
10 package eu
.etaxonomy
.cdm
.persistence
.dao
.hibernate
.taxon
;
13 import org
.apache
.lucene
.store
.Directory
;
14 import org
.springframework
.beans
.factory
.annotation
.Autowired
;
15 import org
.springframework
.beans
.factory
.annotation
.Qualifier
;
16 import org
.springframework
.stereotype
.Component
;
18 import eu
.etaxonomy
.cdm
.model
.taxon
.Synonym
;
19 import eu
.etaxonomy
.cdm
.model
.taxon
.Taxon
;
20 import eu
.etaxonomy
.cdm
.model
.taxon
.TaxonBase
;
21 import eu
.etaxonomy
.cdm
.persistence
.dao
.hibernate
.AlternativeSpellingSuggestionParser
;
23 //spelling support currently disabled in appcontext, see spelling.xml ... "
25 public class TaxonAlternativeSpellingSuggestionParser
extends AlternativeSpellingSuggestionParser
<TaxonBase
> {
27 public TaxonAlternativeSpellingSuggestionParser() {
28 super(TaxonBase
.class);
29 Class
<?
extends TaxonBase
> indexedClasses
[] = new Class
[2];
30 indexedClasses
[0] = Taxon
.class;
31 indexedClasses
[1] = Synonym
.class;
32 super.setIndexedClasses(indexedClasses
);
33 super.setDefaultField("name.titleCache_tokenized");
38 public void setDirectory(@Qualifier("taxonSpellingDirectory")Directory directory
) {
39 this.directory
= directory
;