ref #6190 removing svn property place holder in first line of code - java files
[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
10 package eu.etaxonomy.taxeditor.preference.matching;
11
12 import org.eclipse.ui.IWorkbench;
13
14 import eu.etaxonomy.cdm.model.name.NonViralName;
15 import eu.etaxonomy.cdm.strategy.match.IMatchStrategy;
16 import eu.etaxonomy.cdm.strategy.match.MatchException;
17 import eu.etaxonomy.cdm.strategy.match.MatchStrategyConfigurator;
18 import eu.etaxonomy.taxeditor.model.MessagingUtils;
19
20 /**
21 * <p>NonViralNameMatchingPreference class.</p>
22 *
23 * @author n.hoffmann
24 * @created Jan 22, 2010
25 * @version 1.0
26 */
27 public class NonViralNameMatchingPreference extends AbstractMatchingPreferences<NonViralName>{
28
29 /** {@inheritDoc} */
30 @Override
31 public void init(IWorkbench workbench) {
32 super.init(workbench);
33 clazz = NonViralName.class;
34
35 try {
36 matchStrategy = MatchStrategyConfigurator.NonViralNameMatchStrategy();
37 } catch (MatchException e) {
38 MessagingUtils.error(this.getClass(), e);
39 throw new RuntimeException(e);
40 }
41 }
42
43 /** {@inheritDoc} */
44 @Override
45 protected IMatchStrategy getDefaultMatchStrategy() throws MatchException {
46 return MatchStrategyConfigurator.getDefaultNonViralNameMatchStrategy();
47 }
48 }