Merge branch 'release/5.18.0'
[taxeditor.git] / eu.etaxonomy.taxeditor.store / src / main / java / eu / etaxonomy / taxeditor / preference / matching / NonViralNameMatchingPreference.java
1 /**
2 * Copyright (C) 2007 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
5 *
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.
8 */
9 package eu.etaxonomy.taxeditor.preference.matching;
10
11 import eu.etaxonomy.cdm.model.name.TaxonName;
12 import eu.etaxonomy.cdm.strategy.match.IMatchStrategy;
13 import eu.etaxonomy.cdm.strategy.match.MatchException;
14 import eu.etaxonomy.cdm.strategy.match.MatchStrategyConfigurator;
15 import eu.etaxonomy.taxeditor.model.MessagingUtils;
16
17 /**
18 * <p>NonViralNameMatchingPreference class.</p>
19 *
20 * @author n.hoffmann
21 * @created Jan 22, 2010
22 */
23 public class NonViralNameMatchingPreference extends AbstractMatchingPreferences<TaxonName>{
24
25 @Override
26 public void init() {
27 super.init();
28 clazz = TaxonName.class;
29
30 try {
31 matchStrategy = MatchStrategyConfigurator.NonViralNameMatchStrategy();
32 } catch (MatchException e) {
33 MessagingUtils.error(this.getClass(), e);
34 throw new RuntimeException(e);
35 }
36 }
37
38 @Override
39 protected IMatchStrategy getDefaultMatchStrategy() throws MatchException {
40 return MatchStrategyConfigurator.getDefaultNonViralNameMatchStrategy();
41 }
42 }