Project

General

Profile

Download (1.64 KB) Statistics
| Branch: | Tag: | Revision:
1
// $Id$
2
/**
3
 * Copyright (C) 2007 EDIT
4
 * European Distributed Institute of Taxonomy 
5
 * http://www.e-taxonomy.eu
6
 * 
7
 * The contents of this file are subject to the Mozilla Public License Version 1.1
8
 * See LICENSE.TXT at the top of this package for the full license terms.
9
 */
10

    
11
package eu.etaxonomy.taxeditor.featuretree;
12

    
13
import java.util.UUID;
14

    
15
import eu.etaxonomy.cdm.api.service.IFeatureNodeService;
16
import eu.etaxonomy.cdm.model.description.FeatureNode;
17
import eu.etaxonomy.taxeditor.model.CdmObjectTransfer;
18
import eu.etaxonomy.taxeditor.store.CdmStore;
19

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

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

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

    
42
	private FeatureNodeTransfer() {}
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)