2 * Copyright (C) 2007 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
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.
10 package eu
.etaxonomy
.taxeditor
.editor
.view
.descriptive
;
12 import java
.util
.UUID
;
14 import eu
.etaxonomy
.cdm
.api
.service
.IDescriptionService
;
15 import eu
.etaxonomy
.cdm
.model
.description
.DescriptionElementBase
;
16 import eu
.etaxonomy
.taxeditor
.model
.CdmObjectTransfer
;
17 import eu
.etaxonomy
.taxeditor
.store
.CdmStore
;
21 * @created Feb 8, 2011
24 public class DescriptionElementTransfer
extends CdmObjectTransfer
<DescriptionElementBase
> {
26 private static DescriptionElementTransfer instance
= new DescriptionElementTransfer();
27 private static final String TYPE_NAME
= "descriptionElement-transfer-format"; //$NON-NLS-1$
28 private static final int TYPEID
= registerType(TYPE_NAME
);
30 public static synchronized DescriptionElementTransfer
getInstance(){
34 private DescriptionElementTransfer(){}
37 * @see org.eclipse.swt.dnd.Transfer#getTypeIds()
40 protected int[] getTypeIds() {
41 return new int[] { TYPEID
};
45 * @see org.eclipse.swt.dnd.Transfer#getTypeNames()
48 protected String
[] getTypeNames() {
49 return new String
[] { TYPE_NAME
};
53 * @see eu.etaxonomy.taxeditor.model.CdmObjectTransfer#loadElement(java.util.UUID)
56 public DescriptionElementBase
loadElement(UUID uuid
) {
57 return CdmStore
.getService(IDescriptionService
.class).loadDescriptionElement(uuid
, null);