Project

General

Profile

Revision 03fb8280

ID03fb8280bdc5634709c767ebf6d81cf120d32c77
Parent 24fd1426
Child acebcf17

Added by Patrick Plitzner over 3 years ago

ref #7362 Import term description

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/featuretree/e4/FeatureNodeDropAdapter.java
22 22
import org.eclipse.swt.dnd.TransferData;
23 23

  
24 24
import eu.etaxonomy.cdm.api.service.IFeatureNodeService;
25
import eu.etaxonomy.cdm.model.common.OrderedTermVocabulary;
25 26
import eu.etaxonomy.cdm.model.common.TermVocabulary;
26 27
import eu.etaxonomy.cdm.model.description.Feature;
27 28
import eu.etaxonomy.cdm.model.description.FeatureNode;
......
103 104
		        OntologyTermWrapper wrapper = (OntologyTermWrapper)droppedObject;
104 105
		        TermVocabulary vocabulary = TermVocabularySelectionDialog.select(
105 106
		                "Choose vocabulary for import", viewer.getControl().getShell(), null);
107
		        if(vocabulary instanceof OrderedTermVocabulary){
108
		            MessagingUtils.warningDialog("Import not possible", this,
109
		                    "The chosen vocabulary is an ordered vocabulary.\n"
110
		                    + "Importing into ordered vocabularies is currently not supported.");
111
		            return false;
112
		        }
106 113
		        if(vocabulary!=null){
107
		            Feature feature = Feature.NewInstance(wrapper.getLabel(), wrapper.getLabel(), wrapper.getLabel());
114
		            Feature feature = Feature.NewInstance(wrapper.getDescription(), wrapper.getLabel(), null);
108 115
		            feature.setUri(URI.create(wrapper.getUri()));
109 116
		            vocabulary.addTerm(feature);
110 117
		            CdmStore.getService(IFeatureNodeService.class).createChildFeatureNode(target, feature);

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)