Project

General

Profile

Download (1.63 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.description.FeatureNode;
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
 * @version 1.0
25
 */
26
public class FeatureNodeTransfer extends CdmObjectTransfer<FeatureNode> {
27

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

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

    
41
	private FeatureNodeTransfer() {
42
	}
43

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

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

    
56
	/* (non-Javadoc)
57
	 * @see eu.etaxonomy.taxeditor.model.CdmObjectTransfer#loadElement(java.util.UUID)
58
	 */
59
	@Override
60
	public FeatureNode loadElement(UUID uuid) {
61
		return  CdmStore.getService(IFeatureNodeService.class).load(uuid);
62
	}
63
}
(4-4/9)