Project

General

Profile

Download (1.32 KB) Statistics
| Branch: | Tag: | Revision:
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.TaxonName;
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
 */
26
public class NonViralNameMatchingPreference extends AbstractMatchingPreferences<TaxonName>{
27

    
28
	/** {@inheritDoc} */
29
	@Override
30
    public void init(IWorkbench workbench) {
31
	    super.init(workbench);
32
		clazz = TaxonName.class;
33

    
34
		try {
35
			matchStrategy = MatchStrategyConfigurator.NonViralNameMatchStrategy();
36
		} catch (MatchException e) {
37
			MessagingUtils.error(this.getClass(), e);
38
			throw new RuntimeException(e);
39
		}
40
	}
41

    
42
	/** {@inheritDoc} */
43
	@Override
44
	protected IMatchStrategy getDefaultMatchStrategy() throws MatchException {
45
		return MatchStrategyConfigurator.getDefaultNonViralNameMatchStrategy();
46
	}
47
}
(2-2/4)