Project

General

Profile

Download (1.28 KB) Statistics
| Branch: | Tag: | Revision:
1
/**
2
* Copyright (C) 2009 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
package eu.etaxonomy.taxeditor.editor.definedterm;
10

    
11
import java.util.UUID;
12

    
13
import eu.etaxonomy.cdm.api.service.ITermService;
14
import eu.etaxonomy.cdm.model.term.DefinedTermBase;
15
import eu.etaxonomy.taxeditor.model.CdmObjectTransfer;
16
import eu.etaxonomy.taxeditor.store.CdmStore;
17

    
18
/**
19
 * @author l.morris
20
 * @date 10 Jan 2012
21
 *
22
 */
23
public class TermTransfer extends CdmObjectTransfer<DefinedTermBase> {
24

    
25
	private static TermTransfer instance = new TermTransfer();
26
	private static final String TYPE_NAME = "termElement-transfer-format";
27
	private static final int TYPEID = registerType(TYPE_NAME);
28

    
29
	public static synchronized TermTransfer getInstance(){
30
		return instance;
31
	}
32

    
33
	private TermTransfer() {}
34

    
35
	@Override
36
	public DefinedTermBase loadElement(UUID uuid) {
37
		return CdmStore.getService(ITermService.class).load(uuid);
38
	}
39

    
40
	@Override
41
	protected int[] getTypeIds() {
42
		return new int[] { TYPEID };
43
	}
44

    
45
	@Override
46
	protected String[] getTypeNames() {
47
		return new String[] { TYPE_NAME };
48
	}
49

    
50
}
(6-6/6)