Project

General

Profile

Download (1.5 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.featuretree;
11

    
12
import java.util.UUID;
13

    
14
import eu.etaxonomy.cdm.api.service.IFeatureNodeService;
15
import eu.etaxonomy.cdm.model.term.TermNode;
16
import eu.etaxonomy.taxeditor.model.CdmObjectTransfer;
17
import eu.etaxonomy.taxeditor.store.CdmStore;
18

    
19
/**
20
 * <p>FeatureNodeTransfer class.</p>
21
 *
22
 * @author n.hoffmann
23
 * @created Aug 5, 2010
24
 */
25
public class FeatureNodeTransfer extends CdmObjectTransfer<TermNode> {
26

    
27
	private static FeatureNodeTransfer instance = new FeatureNodeTransfer();
28
	private static final String TYPE_NAME = "featureNode-transfer-format";
29
	private static final int TYPEID = registerType(TYPE_NAME);
30

    
31
	/**
32
	 * <p>Getter for the field <code>instance</code>.</p>
33
	 *
34
	 * @return a {@link eu.etaxonomy.taxeditor.featuretree.FeatureNodeTransfer} object.
35
	 */
36
	public static synchronized FeatureNodeTransfer getInstance() {
37
		return instance;
38
	}
39

    
40
	private FeatureNodeTransfer() {
41
	}
42

    
43
	/** {@inheritDoc} */
44
	@Override
45
	protected int[] getTypeIds() {
46
		return new int[] { TYPEID };
47
	}
48

    
49
	/** {@inheritDoc} */
50
	@Override
51
	protected String[] getTypeNames() {
52
		return new String[] { TYPE_NAME };
53
	}
54

    
55
	@Override
56
	public TermNode loadElement(UUID uuid) {
57
		return  CdmStore.getService(IFeatureNodeService.class).load(uuid);
58
	}
59
}
(4-4/9)