Project

General

Profile

Download (1.28 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.reference.Reference;
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
 * @author n.hoffmann
22
 * @created Jan 22, 2010
23
 * @version 1.0
24
 */
25
public class ReferenceMatchingPreference extends AbstractMatchingPreferences<Reference> {
26

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

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

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