Project

General

Profile

Download (1.24 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 eu.etaxonomy.cdm.model.agent.TeamOrPersonBase;
13
import eu.etaxonomy.cdm.strategy.match.IMatchStrategy;
14
import eu.etaxonomy.cdm.strategy.match.MatchException;
15
import eu.etaxonomy.cdm.strategy.match.MatchStrategyConfigurator;
16
import eu.etaxonomy.taxeditor.model.MessagingUtils;
17

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

    
26
	/** {@inheritDoc} */
27
	@Override
28
    public void init() {
29
	    super.init();
30
		clazz = TeamOrPersonBase.class;
31

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

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