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
;
24 public class TaxonAlternativeSpellingSuggestionParser
extends AlternativeSpellingSuggestionParser
<TaxonBase
> {
26 public TaxonAlternativeSpellingSuggestionParser() {
27 super(TaxonBase
.class);
28 Class
<?
extends TaxonBase
> indexedClasses
[] = new Class
[2];
29 indexedClasses
[0] = Taxon
.class;
30 indexedClasses
[1] = Synonym
.class;
31 super.setIndexedClasses(indexedClasses
);
32 super.setDefaultField("name.titleCache_tokenized");
37 public void setDirectory(@Qualifier("taxonSpellingDirectory")Directory directory
) {
38 this.directory
= directory
;