Project

General

Profile

Download (1.31 KB) Statistics
| Branch: | Tag: | Revision:
1
// $Id$
2
/**
3
* Copyright (C) 2007 EDIT
4
* European Distributed Institute of Taxonomy
5
* http://www.e-taxonomy.eu
6
*
7
* The contents of this file are subject to the Mozilla Public License Version 1.1
8
* See LICENSE.TXT at the top of this package for the full license terms.
9
*/
10

    
11
package eu.etaxonomy.taxeditor.preference.matching;
12

    
13
import org.eclipse.ui.IWorkbench;
14

    
15
import eu.etaxonomy.cdm.model.agent.TeamOrPersonBase;
16
import eu.etaxonomy.cdm.strategy.match.IMatchStrategy;
17
import eu.etaxonomy.cdm.strategy.match.MatchException;
18
import eu.etaxonomy.cdm.strategy.match.MatchStrategyConfigurator;
19
import eu.etaxonomy.taxeditor.model.MessagingUtils;
20

    
21
/**
22
 * @author n.hoffmann
23
 * @created Jan 22, 2010
24
 * @version 1.0
25
 */
26
public class TeamOrPersonMatchingPreference extends
27
		AbstractMatchingPreferences<TeamOrPersonBase> {
28

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

    
35
		try {
36
			matchStrategy = MatchStrategyConfigurator.TeamOrPersonMatchStrategy();
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.getDefaultTeamOrPersonMatchStrategy();
47
	}
48
}
(4-4/4)