Revision 008ebe8f
Added by Patrick Plitzner over 6 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/matching/NonViralNameMatchingPreference.java | ||
---|---|---|
9 | 9 |
|
10 | 10 |
package eu.etaxonomy.taxeditor.preference.matching; |
11 | 11 |
|
12 |
import org.eclipse.ui.IWorkbench; |
|
13 |
|
|
14 |
import eu.etaxonomy.cdm.model.name.INonViralName; |
|
12 |
import eu.etaxonomy.cdm.model.common.CdmBase; |
|
15 | 13 |
import eu.etaxonomy.cdm.model.name.TaxonName; |
16 | 14 |
import eu.etaxonomy.cdm.strategy.match.IMatchStrategy; |
17 | 15 |
import eu.etaxonomy.cdm.strategy.match.MatchException; |
18 | 16 |
import eu.etaxonomy.cdm.strategy.match.MatchStrategyConfigurator; |
19 |
import eu.etaxonomy.taxeditor.model.MessagingUtils; |
|
20 | 17 |
|
21 | 18 |
/** |
22 | 19 |
* <p>NonViralNameMatchingPreference class.</p> |
... | ... | |
26 | 23 |
*/ |
27 | 24 |
public class NonViralNameMatchingPreference extends AbstractMatchingPreferences<TaxonName>{ |
28 | 25 |
|
29 |
/** {@inheritDoc} */ |
|
30 |
@Override |
|
31 |
public void init(IWorkbench workbench) { |
|
32 |
super.init(workbench); |
|
33 |
clazz = TaxonName.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 |
} |
|
26 |
@Override |
|
27 |
public Class<? extends CdmBase> getType(){ |
|
28 |
return TaxonName.class; |
|
29 |
} |
|
42 | 30 |
|
43 | 31 |
/** {@inheritDoc} */ |
44 | 32 |
@Override |
Also available in: Unified diff
ref #7006 Migrate store preferences